bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43955: two friendlier org-speed default commands


From: Boruch Baum
Subject: bug#43955: two friendlier org-speed default commands
Date: Mon, 12 Oct 2020 09:40:20 -0400
User-agent: NeoMutt/20180716

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 via email to

[Prev in Thread] Current Thread [Next in Thread]