Subject: bug#1598: Please add easy key bindings for outline-(minor-)mode

From: Christopher Dimech <[email-masked]>
Date: Mon, 19 Jul 2021 17:33:26 +0200

Lars, I have been scrutinising outline-minor-mode for some time now.

One thing I found that can help in hiding and exposing parts in the following
function

(defun gilgamesh-entry-sweep ()
   "todo"
   (interactive)

   (when (not (eq last-command this-command))
     (put this-command 'state 0))

   (cond
      ;; .....................................................
      ;; show subheadings
      ((equal 0 (get this-command 'state))
          (outline-show-branches)
          (message "Expose Sub-Headings,  Next: Expose Body")
          (put this-command 'state 2))
      ;; .....................................................
      ;; show body of heading
      ((equal 1 (get this-command 'state))
          (outline-show-entry)
          (message "Expose Body,  Next: Expose Sub-Headings")
          (put this-command 'state 1))
      ;; .....................................................
      ;; show subheadings with bodies
      ((equal 2 (get this-command 'state))
          (outline-show-subtree)
          (message "Expose Sub-Bodies, Next: hide-subtree")
          (put this-command 'state 3))
      ;; .....................................................
      ;; hide subheadings
      ((equal 3 (get this-command 'state))
          (outline-hide-subtree)
          (message "hide-subtree, Next: show-entry")
          (put this-command 'state 0)) ))

You could try to improve on this (on how best the hiding showing works out).
Users can then add a keybinding they wish.

> Sent: Tuesday, July 20, 2021 at 3:04 AM
> From: "Lars Ingebrigtsen" <[email-masked]>
> To: "Teemu Likonen" <[email-masked]>
> Cc: [email-masked]
> Subject: bug#1598: Please add easy key bindings for outline-(minor-)mode
>
> Teemu Likonen <[email-masked]> writes:
>
> > The default key bindings for outline-mode and outline-minor-mode are
> > difficult to remember and slow to use. I think the main reason is that
> > there are way too many different key-bindings to operate with outlining.
> >
> > I suggest that you make keys like M-<left> and M-<right> to act modally
> > so that they open and close one outline level at the time depending on
> > which levels and bodies are currently visible. In addition to that, and
> > to make outline navigating easy, M-<up> and M-<down> could move the
> > cursor to previous and next visible outline header.
>
> (I'm going through old bug reports that unfortunately wasn't resolved at
> the time.)
>
> I agree that the outline commands are pretty awkward...  but outline
> minor mode is used in a large number of major modes, and has to be
> consistent throughout all those modes.  So M-<arrows> can't really be
> used for this, I think.
>
> So I'm closing this bug report.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
>
>
>