Add "Another way to get a selection" archive post
This commit is contained in:
parent
31ef1b6faa
commit
03b1cb67ec
1 changed files with 25 additions and 0 deletions
25
posts/Another_way_to_get_a_selection.mdwn
Normal file
25
posts/Another_way_to_get_a_selection.mdwn
Normal file
|
@ -0,0 +1,25 @@
|
|||
When I was first looking into improving my mailbox selection function
|
||||
I was looking at how to just ask the user for input with
|
||||
completions. Though now that I came across `tmm-prompt` I really
|
||||
prefer this way of working, at least in this case.
|
||||
|
||||
However, today another function was mentioned, in response to someone
|
||||
pointing out `org-completing-read`: `completing-read`. Wow that's a
|
||||
far leap.
|
||||
|
||||
Anyway:
|
||||
|
||||
[[!format el """
|
||||
(completing-read "Your favorite color: "
|
||||
'("red" "green" "blue" "yellow"))
|
||||
"""]]
|
||||
|
||||
This will ask for user input and provide these options as completions,
|
||||
but it won't show a list of options, of provide shortcuts, like
|
||||
`tmm-prompt` does.
|
||||
|
||||
It's good to know these things, and I really should read both the
|
||||
emacs manual and the emacs lisp reference manual at some point.
|
||||
|
||||
[[!meta date="2012-05-03 10:04:00"]]
|
||||
[[!tag emacs elisp org-mode coding]]
|
Loading…
Reference in a new issue