summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-11-06 00:12:42 +0100
committerGravatar Tom Willemsen2012-11-06 00:12:42 +0100
commit03b1cb67ec523fba5102075e17d8d1030df3ff6a (patch)
treea243b6e51d40c3e88aca6a13c638c22d4be0040b
parent31ef1b6faa8a342b16e6d494306eff8e5b38ac49 (diff)
downloadsite-03b1cb67ec523fba5102075e17d8d1030df3ff6a.tar.gz
site-03b1cb67ec523fba5102075e17d8d1030df3ff6a.zip
Add "Another way to get a selection" archive post
-rw-r--r--posts/Another_way_to_get_a_selection.mdwn25
1 files changed, 25 insertions, 0 deletions
diff --git a/posts/Another_way_to_get_a_selection.mdwn b/posts/Another_way_to_get_a_selection.mdwn
new file mode 100644
index 0000000..ebdc186
--- /dev/null
+++ b/posts/Another_way_to_get_a_selection.mdwn
@@ -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]]