summaryrefslogtreecommitdiffstats
path: root/blog/blog-2012-05-03-1004.org
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-06-21 21:24:54 +0200
committerGravatar Tom Willemsen2012-06-21 21:24:54 +0200
commitc90daec5f4a91cf1041a5a61411d860ea4329ece (patch)
treecd8932e1dd5dacdc183a91b55ca4d5c7580e9d36 /blog/blog-2012-05-03-1004.org
downloadorgweb-c90daec5f4a91cf1041a5a61411d860ea4329ece.tar.gz
orgweb-c90daec5f4a91cf1041a5a61411d860ea4329ece.zip
Initial commit
Diffstat (limited to 'blog/blog-2012-05-03-1004.org')
-rw-r--r--blog/blog-2012-05-03-1004.org25
1 files changed, 25 insertions, 0 deletions
diff --git a/blog/blog-2012-05-03-1004.org b/blog/blog-2012-05-03-1004.org
new file mode 100644
index 0000000..3e10b00
--- /dev/null
+++ b/blog/blog-2012-05-03-1004.org
@@ -0,0 +1,25 @@
+#+TITLE: Another way to get a selection
+#+DESCRIPTION: Another thing I came across
+
+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.