简体   繁体   English

显示elisp中的选项列表

[英]show list of options in elisp

HI, HI,

I have the following problem: 我有以下问题:

Provided a list of values, and using a formatting function passed as argument, display all its elements in a helper buffer. 提供值列表,并使用作为参数传递的格式化函数,在辅助缓冲区中显示其所有元素。 The user would then select one of them using the arrow keys. 然后,用户将使用箭头键选择其中一个。 The returned value must be the chosen entry. 返回的值必须是所选条目。

If you have ever used reftex to insert citations, or browse-kill-ring, you know what I'm talking about. 如果您曾经使用过reftex来插入引文或者浏览杀死响铃,那么您就知道我在说什么。 Those two examples use custom code to achieve the desired results, but perhaps there is a library that could do that. 这两个示例使用自定义代码来实现所需的结果,但也许有一个库可以做到这一点。

(with-output-to-temp-buffer "*Name of buffer*"
  (display-completion-list '("foo" "bar" "baz" "qux")))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM