From: Boruch Baum <boruch_baum@gmx.com>
To: 43955@debbugs.gnu.org
Subject: bug#43955: two friendlier org-speed default commands
Date: Mon, 12 Oct 2020 09:40:20 -0400 [thread overview]
Message-ID: <20201012134020.m3dny3n7njbwdfhh@E15-2016.optimum.net> (raw)
When POINT is on the first column of an org-heading, org-mode makes
available a set of 'speed-commands'. However, some of those commands
have exit/undo methods that are unintuitive. The following code offers
examples of how to improve two of those situations. If you want me to
re-submit the code as a patch with associated NEWS entries, let me know,
along with any changes you need.
Case #1: S - org-narrow-to-subtree
#+BEGIN_SRC emacs-lisp
(push '("s" . org-speed-narrow-widen-subtree) org-speed-commands-default)
(defun org-speed-narrow-widen-subtree ()
(if (/= (point-min) (point))
(call-interactively 'org-narrow-to-subtree)
(widen)
(message "Pro tip: Use M-x widen, %s"
(key-description (where-is-internal 'widen nil t)))))
#+END_SRC
Case #2: = org-columns
#+BEGIN_SRC emacs-lisp
(push '("=" . org-speed-columns) org-speed-commands-default)
(defun org-speed-columns ()
(if org-columns-overlays
(org-columns-quit)
(org-columns)))
#+END_SRC
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
reply other threads:[~2020-10-12 13:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201012134020.m3dny3n7njbwdfhh@E15-2016.optimum.net \
--to=boruch_baum@gmx.com \
--cc=43955@debbugs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.