Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

show list of options in elisp

Tags:

emacs

elisp

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. Those two examples use custom code to achieve the desired results, but perhaps there is a library that could do that.

like image 645
rlazo Avatar asked Apr 22 '11 04:04

rlazo


1 Answers

(with-output-to-temp-buffer "*Name of buffer*"
  (display-completion-list '("foo" "bar" "baz" "qux")))
like image 129
AProgrammer Avatar answered Oct 16 '22 04:10

AProgrammer