emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] improve doc for org-use-speed-commands
@ 2013-10-23  9:08 Oleh
  2013-11-05 16:34 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Oleh @ 2013-10-23  9:08 UTC (permalink / raw)
  To: org mode

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

Hi all,

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.

regards
Oleh

[-- Attachment #2: 0001-lisp-org.el-add-an-example-for-org-use-speed-command.patch --]
[-- Type: application/octet-stream, Size: 974 bytes --]

From 91b82c7ecb1ed5f32a46dc8510118e386a8077d6 Mon Sep 17 00:00:00 2001
From: Oleh Krehel <ohwoeowho@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 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 55fdd3c..3467646 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1002,7 +1002,11 @@ 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:
+  (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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-05 18:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-23  9:08 [PATCH] improve doc for org-use-speed-commands Oleh
2013-11-05 16:34 ` Bastien
2013-11-05 17:44   ` Oleh
2013-11-05 18:15     ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).