Hi Bastien,

Here's the updated patch.

regards,
Oleh

On Tue, Nov 5, 2013 at 5:34 PM, Bastien <b...@gnu.org> wrote:
> Hi Oleh,
>
> Oleh <ohwoeo...@gmail.com> writes:
>
>> I have my headings abbreviated to one star and often
>> instead of executing org-speed-command, I get a letter inserted
>> because the point isn't exactly at the beginning of line.
>>
>> Problem is solved by setting `org-use-speed-commands' to an appropriate
>> lambda. I attach a patch to add this lambda to the docstring.
>
> I think having an example is fine, but it'd be nice to tell the users
> what the lambda is exactly doing.  Can you add a line about this and
> resend the patch?
>
> Thanks!
>
> --
>  Bastien
From d57aa803e80995b0f74c9aba63903447a6df7382 Mon Sep 17 00:00:00 2001
From: Oleh Krehel <ohwoeo...@gmail.com>
Date: Wed, 23 Oct 2013 11:00:53 +0200
Subject: [PATCH] lisp/org.el: add an example for `org-use-speed-commands'
 docstring.

---
 lisp/org.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 647ed33..04f12de 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1010,7 +1010,13 @@ new-frame        Make a new frame each time.  Note that in this case
 (defcustom org-use-speed-commands nil
   "Non-nil means activate single letter commands at beginning of a headline.
 This may also be a function to test for appropriate locations where speed
-commands should be active."
+commands should be active.
+
+For example, to make the speed commands active whenever point is on
+any star which is part of the headline:
+
+  (setq org-use-speed-commands
+      (lambda () (and (looking-at org-outline-regexp) (looking-back \"^\\**\"))))"
   :group 'org-structure
   :type '(choice
 	  (const :tag "Never" nil)
-- 
1.8.4

Reply via email to