[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like
From: |
Juri Linkov |
Subject: |
Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings |
Date: |
Wed, 03 Mar 2021 22:38:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> This is very welcome functionality (and the highlighting as well).
> I wonder if we really need the new minor modes, tho, instead of just
> sticking to the new `outline-minor-mode-cycle` and
> `outline-minor-mode-highlight` variables (which we could make into
> `defcustom`s).
One example (mostly for demonstration purposes) currently is
in etc/compilation.txt. whose Local Variables contains just:
;;; eval: (outline-cycle-highlight-minor-mode)
Initially I implemented this only with variables and without modes
like you suggested:
;;; outline-minor-mode-cycle: t
;;; outline-minor-mode-highlight: t
;;; eval: (outline-minor-mode 1)
But then thought that maybe with a mode would be more concise and convenient.
I'm fine with removing these modes after analyzing more use cases.
> IOW, I wonder if there are many use cases where users will want to have
> some `outline-minor-mode` buffers with cycling and others without.
Here's is a list of use cases where I tried to use outline-minor-mode
with cycling, and somewhere also with highlighting.
1. (add-hook 'Man-cooked-hook 'outline-cycle-highlight-minor-mode)
where manual page sections could be highlighted with outline faces.
2. (add-hook 'diff-mode-hook 'outline-cycle-minor-mode)
3. (add-hook 'emacs-lisp-mode-hook 'outline-cycle-minor-mode)
without outline highlighting to not overwrite major mode faces
4. (advice-add 'xref--insert-xrefs :after
(lambda (&rest _args)
(setq-local outline-regexp "/")
(outline-cycle-minor-mode +1)))
using file names as headings where S-TAB could provide
an overview of all found files
But none of them require to disable cycling. I don't know where
outline-minor-mode without cycling would be needed. Maybe in
external packages that implement own cycling in outline-minor-mode
like in https://debbugs.gnu.org/41198#99
- Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings, Stefan Monnier, 2021/03/03
- Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings,
Juri Linkov <=
- Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings, Daniele Nicolodi, 2021/03/04
- Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings, Stefan Monnier, 2021/03/04
- Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings, Juri Linkov, 2021/03/04
- Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings, Juri Linkov, 2021/03/04
- Re: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings, Daniele Nicolodi, 2021/03/04