GNU bug report logs - #41130
outline-mode: Add new commands like org-cycle and org-global-cycle

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Thu, 7 May 2020 20:55:02 UTC

Severity: wishlist

Tags: patch

Merged with 41198

Found in version 27.0.60

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #45 received at 41130 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 41130 <at> debbugs.gnu.org, 41198 <at> debbugs.gnu.org
Subject: Re: bug#41198: 27.0.60; [PATCH] heading cycling command for outline
Date: Tue, 19 May 2020 21:37:26 -0400
[Message part 1 (text/plain, inline)]

> On May 19, 2020, at 6:36 PM, Stefan Kangas <stefan <at> marxist.se> wrote:
> 
> Yuan Fu <casouri <at> gmail.com> writes:
> 
>>> In Bug#41130, I also suggest to add the same keybinding as in org-mode:
>>> TAB and S-TAB.  Could you add such keybindings to outline-mode-map in
>>> your patch?
>> 
>> It seems that the outline-mode bindings all live under C-c. Maybe C-c
>> TAB and C-c S-TAB? Should I ask on emacs-devel for for suggestions?
> 
> I think it is better to use the same keys as org-mode, since one
> important motivation for this feature is precisely to align the
> outline-mode keybindings with org-mode.  This aspect would be
> significantly diminished by using other keys, IMHO.
> 
> My impression was that also there was consensus around (or at least no
> objections to) that idea the last time we discussed it.  I would
> therefore propose to just add TAB and S-TAB to the patch, but allow a
> week or two before pushing to give others a chance to comment here.
> 
> But, if you really want to, of course you could also ask on emacs-devel.
> Worst case, we get to have another round of bikeshedding. ;-)

I added TAB and S-TAB bindings. Though S-TAB appears to be <backtab> on my machine (Mac) for both terminal and GUI so I bound that instead. Is that so for other machines? To reduce the possible allergy, I made the TAB binding conditional—only invokes outline-cycle when point is on a heading.

A minor thing: if the motivation is to align with Org mode, should I change the text message to align with Org mode? It prints “show all”, “hide all”, etc (because they make sense), but Org mode prints stuff like “CHILDREN”, “SUBTREE”, etc.

> 
>>> I think we also need ChangeLog in the commit message, an entry in NEWS,
>>> and updates to the manual.
>> 
>> I updated NEWS and the manual. For ChangeLog, I thought that’s
>> automatically generated from commit messages?
> 
> That is my understanding too.
> 
> But I only saw a diff attached, not a patch with a commit message.  That
> is what I tried to say, but I could've been more clear.
> 
> (CONTRIBUTE suggests using `git format-patch -1' to email a patch, which
> includes the commit message.)

Ah sorry, I switched to a new way to generate patches and didn’t notice that the commit message is gone. It is included this time.

> 
>> +@findex outline-cycle
>> +@findex outline-cycle-buffer
>> +  Outline also provides two convenience commands to cycle the
>> +visibility of each heading and the whole buffer.  @code{outline-cycle}
>> +cycles the current heading between "hide all", "subheadings", and
>> +"show all" state.  @code{outline-cycle-buffer} cycles the whole buffer
>> +between "only top-level headings", "all headings and subheadings", and
>> +"show all" states.
> [...]
>> +*** New commands to cycle heading visibility.
>> +'outline-cycle' cycles the current heading between "hide all",
>> +"subheadings", and "show all" state. 'outline-cycle-buffer' cycles the
>> +whole buffer between "only top-level headings", "all headings and
>> +subheadings", and "show all" states.
> 
> Looks good to me (but should refer to the above keybindings if they're
> added).

Yuan

[outline.patch (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]



This bug report was last modified 4 years and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.