emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* speed-keys access tweak
@ 2018-01-12 16:53 Michael Ax
  2018-01-14  9:05 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ax @ 2018-01-12 16:53 UTC (permalink / raw)
  To: Org-mode

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

With the (bolp) check snipped, org-speed-commands
work up to the end of org-outline-regexp.


   (defun org-speed-command-activate (keys)
     (when (or (looking-at org-outline-regexp)
               (and (functionp org-use-speed-commands)
                    (funcall org-use-speed-commands)))
       (cdr (assoc keys (append org-speed-commands-user
org-speed-commands-default)))))

Works for me. Could this be legit --- or safer?

Thanks. m


[-- Attachment #2: Type: text/html, Size: 997 bytes --]

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

* Re: speed-keys access tweak
  2018-01-12 16:53 speed-keys access tweak Michael Ax
@ 2018-01-14  9:05 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-01-14  9:05 UTC (permalink / raw)
  To: Michael Ax; +Cc: Org-mode

Hello,

Michael Ax <michaelax@gmail.com> writes:

> With the (bolp) check snipped, org-speed-commands
> work up to the end of org-outline-regexp.
>
>   (defun org-speed-command-activate (keys)
>     (when (or (looking-at org-outline-regexp)
>               (and (functionp org-use-speed-commands)
>                    (funcall org-use-speed-commands)))
>       (cdr (assoc keys (append org-speed-commands-user
> org-speed-commands-default)))))
>
> Works for me. Could this be legit --- or safer?

It would also work in the non-desirable following case, where X is
point:

  *** Headline x*** Text

Besides, according the manual,

    Single keys can be made to execute commands when the cursor is at the
    beginning of a headline, i.e., before the first star.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-01-14  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-12 16:53 speed-keys access tweak Michael Ax
2018-01-14  9:05 ` Nicolas Goaziou

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).