emacs-devel
[Top][All Lists]
Advanced

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

Re: Tweaking the output of `C-h b'


From: Kévin Le Gouguec
Subject: Re: Tweaking the output of `C-h b'
Date: Mon, 01 Nov 2021 15:26:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> > Don't we have similar stuff in Customize buffers?
>> 
>> The UI elements (chevrons) are similar, yes; IIUC the main difference is
>> that magit-section uses fringe bitmaps, while Customize uses SVG
>> buttons.
>> 
>> As for features, AFAICT:
>> 
>> - magit-section is a reimplementation of outline-minor-mode which does
>>   not rely on regexps to delimit sections: it supports arbitrary nesting
>>   of subsections, and provides commands for visibility cycling and node
>>   navigation (see magit-section-mode-map).
>> 
>> - Meanwhile, Customize buffers "merely" provide ways to (un)fold single
>>   entities (user options) and jump to the previous/next buttons (which
>>   could be enough for the purposes of C-h b).
>> 
>> (I hope my comparison is accurate; if I'm being unfair to either library
>> I'd love to stand corrected)
>
> I'm not sure we are talking about the same thing: I meant the
> Customize Group buffers, where you can expand and collapse individual
> options that belong to the group.

Mmm, I think we are?  See attached screenshot, with UI elements circled
in red:

- on the left, a Customize group buffer, with "Outline 1" expanded, and
  other options collapsed;

- on the right, a magit-revision buffer, with most sections expanded,
  except for lisp/help.el's subsections (diff hunks), which are
  collapsed.

  (Note that nothing indicates visually that the collapsed hunks are
  subsections of the "modified lisp/help.el" section, unfortunately)

Visually they look similar (full arrow heads in column 0 vs fringe
chevrons); functionally, Customize options can be expanded or collapsed
with RET; Magit's sections can be manipulated like outline.el's sections
(toggle node visibility with TAB, toggle children visibility C-TAB, go
up with ^, go forward node with n, skip over sibling nodes with M-n).

Apologies if I've misunderstood.

Attachment: customize-vs-magit-section.png
Description: PNG image


reply via email to

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