emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Oleh <ohwoeowho@gmail.com>
To: org mode <emacs-orgmode@gnu.org>
Subject: [PATCH] improve doc for org-use-speed-commands
Date: Wed, 23 Oct 2013 11:08:19 +0200	[thread overview]
Message-ID: <CAA01p3o4tUcUnO7wDPA_B9m_om4UfHf0=DM8+E51re5zLpM1NQ@mail.gmail.com> (raw)

[-- 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


             reply	other threads:[~2013-10-23  9:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23  9:08 Oleh [this message]
2013-11-05 16:34 ` [PATCH] improve doc for org-use-speed-commands Bastien
2013-11-05 17:44   ` Oleh
2013-11-05 18:15     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA01p3o4tUcUnO7wDPA_B9m_om4UfHf0=DM8+E51re5zLpM1NQ@mail.gmail.com' \
    --to=ohwoeowho@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).