emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 04 Mar 2021 11:05:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> This is a great feature, thank you!  I could replace all my custom elisp
> code that handles outline cycle/highlight on my init.el with the new
> minor-modes, and everything has been working fine so far.
>
> I think that having only the variables is fine, I can't see any special
> need for the minor-modes.
>
>> 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
>
> The use of outline-minor-mode + cycle on xref buffers is one of my main
> use cases. However, having to setup the outline-regexp and to add a
> defadvice seems a dirty hack.  Should Emacs provide better defaults for
> xref and other modes (like Gnus) for an easier integration with
> outline-minor-mode ?

Gnus has own outline-like commands like 'T H' that hides all threads.
But in xref it should be easy to set the outline-regexp by default,
and to add a hook to call when the xref output buffer is ready.

> As another suggestion, would be nice to add more keybidings, for
> example, to navigate between headers.

Maybe bind more org-like bindings in outline-mode-cycle-map,
e.g. ‘C-c C-n’ like ‘org-next-visible-heading’
and ‘C-c C-p’ like ‘org-previous-visible-heading’.

> The name 'cycle', however, maybe not be a good choice in case Emacs
> offers more keybidings for outline-minor-mode.

Indeed, after adding more keybindings it's not only about cycling anymore.



reply via email to

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