diff options
author | Tom Willemsen | 2012-12-10 02:22:18 +0100 |
---|---|---|
committer | Tom Willemsen | 2012-12-10 02:22:18 +0100 |
commit | a2f077cf13d307c4d9d862028f459b783ede53cc (patch) | |
tree | 48d67b2e218cc5f97b52e412f5b45d3bff545c16 /site/blog/Another_way_to_get_a_selection.org | |
parent | 210460d177a9a4bdd5f2e8cfe08abe3277681aec (diff) | |
download | orgweb-a2f077cf13d307c4d9d862028f459b783ede53cc.tar.gz orgweb-a2f077cf13d307c4d9d862028f459b783ede53cc.zip |
Add some blog posts
Also an index page that automatically generates a list of all the
posts available.
Diffstat (limited to 'site/blog/Another_way_to_get_a_selection.org')
-rw-r--r-- | site/blog/Another_way_to_get_a_selection.org | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/site/blog/Another_way_to_get_a_selection.org b/site/blog/Another_way_to_get_a_selection.org new file mode 100644 index 0000000..29df13b --- /dev/null +++ b/site/blog/Another_way_to_get_a_selection.org @@ -0,0 +1,26 @@ +#+TITLE: Another way to get a selection +#+DATE: 2012-05-03 10:04:00 +#+TAGS: emacs elisp org-mode coding + +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: + +#+BEGIN_SRC emacs-lisp + (completing-read "Your favorite color: " + '("red" "green" "blue" "yellow")) +#+END_SRC + +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. |