GNU bug report logs - #73286
[PATCH] Add foldout command for widening to current fold

Previous Next

Package: emacs;

Reported by: Paul Nelson <ultrono <at> gmail.com>

Date: Sun, 15 Sep 2024 23:40:01 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73286 in the body.
You can then email your comments to 73286 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#73286; Package emacs. (Sun, 15 Sep 2024 23:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Nelson <ultrono <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 15 Sep 2024 23:40:01 GMT) Full text and rfc822 format available.

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

From: Paul Nelson <ultrono <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add foldout command for widening to current fold
Date: Mon, 16 Sep 2024 01:38:35 +0200
[Message part 1 (text/plain, inline)]
The foldout package, which "zooms in" on document sections by
narrowing the buffer, doesn't play well with Emacs's other narrowing
features: after narrowing further within a fold, there's no easy way
to widen back to the fold's boundaries.

This patch introduces foldout-widen-to-current-fold, a command that
widens to the current fold level (or to the whole buffer if not in a
fold).

Example usage:
- Use foldout-zoom-subtree to zoom in on some section.
- Use narrow-to-defun to edit some function.
- Use foldout-widen-to-current-fold to return to the scope of the
zoomed-in section.

Any feedback welcome.

Thanks, best,

Paul
[0001-Add-foldout-command-for-widening-to-current-fold.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73286; Package emacs. (Sat, 28 Sep 2024 09:03:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Nelson <ultrono <at> gmail.com>, Stefan Kangas <stefankangas <at> gmail.com>,
 Andrea Corallo <acorallo <at> gnu.org>
Cc: 73286 <at> debbugs.gnu.org
Subject: Re: bug#73286: [PATCH] Add foldout command for widening to current
 fold
Date: Sat, 28 Sep 2024 12:01:53 +0300
> From: Paul Nelson <ultrono <at> gmail.com>
> Date: Mon, 16 Sep 2024 01:38:35 +0200
> 
> The foldout package, which "zooms in" on document sections by
> narrowing the buffer, doesn't play well with Emacs's other narrowing
> features: after narrowing further within a fold, there's no easy way
> to widen back to the fold's boundaries.
> 
> This patch introduces foldout-widen-to-current-fold, a command that
> widens to the current fold level (or to the whole buffer if not in a
> fold).
> 
> Example usage:
> - Use foldout-zoom-subtree to zoom in on some section.
> - Use narrow-to-defun to edit some function.
> - Use foldout-widen-to-current-fold to return to the scope of the
> zoomed-in section.
> 
> Any feedback welcome.

Thanks.  This new feature LGTM, but I'm not convinced we should have a
separate key binding for this new command by default.  If we want to
have a default key binding at all, maybe we should make "C-c C-x"
invoke this command when given a negative argument.

Stefan and Andrea, WDYT?




Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 30 Sep 2024 01:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73286; Package emacs. (Tue, 01 Oct 2024 14:13:02 GMT) Full text and rfc822 format available.

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

From: Paul Nelson <ultrono <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73286 <at> debbugs.gnu.org, Andrea Corallo <acorallo <at> gnu.org>,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#73286: [PATCH] Add foldout command for widening to current
 fold
Date: Tue, 1 Oct 2024 10:46:14 +0100
> Thanks.  This new feature LGTM, but I'm not convinced we should have a
> separate key binding for this new command by default.  If we want to
> have a default key binding at all, maybe we should make "C-c C-x"
> invoke this command when given a negative argument.

Thanks.  Two quick comments:

1. I'm happy leaving the key unbound by default -- in my own config, I
rebind "C-x n w" from widen to foldout-widen-to-current-fold and never
use the proposed "C-c @ C-w" bind.

2. "C-c @ C-x" already treats negative arguments specially ("...with
ARG < 0, -ARG folds are exited and text is left visible")




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73286; Package emacs. (Tue, 01 Oct 2024 18:51:02 GMT) Full text and rfc822 format available.

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

From: Andrea Corallo <acorallo <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73286 <at> debbugs.gnu.org, Stefan Kangas <stefankangas <at> gmail.com>,
 Paul Nelson <ultrono <at> gmail.com>
Subject: Re: bug#73286: [PATCH] Add foldout command for widening to current
 fold
Date: Tue, 01 Oct 2024 14:50:24 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Paul Nelson <ultrono <at> gmail.com>
>> Date: Mon, 16 Sep 2024 01:38:35 +0200
>> 
>> The foldout package, which "zooms in" on document sections by
>> narrowing the buffer, doesn't play well with Emacs's other narrowing
>> features: after narrowing further within a fold, there's no easy way
>> to widen back to the fold's boundaries.
>> 
>> This patch introduces foldout-widen-to-current-fold, a command that
>> widens to the current fold level (or to the whole buffer if not in a
>> fold).
>> 
>> Example usage:
>> - Use foldout-zoom-subtree to zoom in on some section.
>> - Use narrow-to-defun to edit some function.
>> - Use foldout-widen-to-current-fold to return to the scope of the
>> zoomed-in section.
>> 
>> Any feedback welcome.
>
> Thanks.  This new feature LGTM, but I'm not convinced we should have a
> separate key binding for this new command by default.  If we want to
> have a default key binding at all, maybe we should make "C-c C-x"
> invoke this command when given a negative argument.
>
> Stefan and Andrea, WDYT?

I'm happy to have the feature in.  I guess we can introduce the
keybinding later in case it's requested.

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73286; Package emacs. (Tue, 01 Oct 2024 19:35:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Andrea Corallo <acorallo <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 73286 <at> debbugs.gnu.org, Paul Nelson <ultrono <at> gmail.com>
Subject: Re: bug#73286: [PATCH] Add foldout command for widening to current
 fold
Date: Tue, 1 Oct 2024 21:33:32 +0200
Andrea Corallo <acorallo <at> gnu.org> writes:

> I'm happy to have the feature in.  I guess we can introduce the
> keybinding later in case it's requested.

Agreed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73286; Package emacs. (Sat, 05 Oct 2024 10:21:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: ultrono <at> gmail.com, Stefan Kangas <stefankangas <at> gmail.com>
Cc: 73286 <at> debbugs.gnu.org, acorallo <at> gnu.org
Subject: Re: bug#73286: [PATCH] Add foldout command for widening to current
 fold
Date: Sat, 05 Oct 2024 13:20:14 +0300
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Tue, 1 Oct 2024 21:33:32 +0200
> Cc: Paul Nelson <ultrono <at> gmail.com>, 73286 <at> debbugs.gnu.org
> 
> Andrea Corallo <acorallo <at> gnu.org> writes:
> 
> > I'm happy to have the feature in.  I guess we can introduce the
> > keybinding later in case it's requested.
> 
> Agreed.

There seems to be a consensus to leave the command unbound, so Paul,
would you please submit a modified patch with that change?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73286; Package emacs. (Sat, 05 Oct 2024 11:17:02 GMT) Full text and rfc822 format available.

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

From: Paul Nelson <ultrono <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73286 <at> debbugs.gnu.org, acorallo <at> gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#73286: [PATCH] Add foldout command for widening to current
 fold
Date: Sat, 5 Oct 2024 12:14:57 +0100
[Message part 1 (text/plain, inline)]
> There seems to be a consensus to leave the command unbound, so Paul,
> would you please submit a modified patch with that change?
>
> Thanks.

Sure, please find attached.  Thanks for the feedback!  Paul
[0001-Add-foldout-command-for-widening-to-current-fold.patch (application/octet-stream, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 12 Oct 2024 12:10:04 GMT) Full text and rfc822 format available.

Notification sent to Paul Nelson <ultrono <at> gmail.com>:
bug acknowledged by developer. (Sat, 12 Oct 2024 12:10:05 GMT) Full text and rfc822 format available.

Message #30 received at 73286-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Nelson <ultrono <at> gmail.com>
Cc: acorallo <at> gnu.org, stefankangas <at> gmail.com, 73286-done <at> debbugs.gnu.org
Subject: Re: bug#73286: [PATCH] Add foldout command for widening to current
 fold
Date: Sat, 12 Oct 2024 14:53:25 +0300
> From: Paul Nelson <ultrono <at> gmail.com>
> Date: Sat, 5 Oct 2024 12:14:57 +0100
> Cc: Stefan Kangas <stefankangas <at> gmail.com>, acorallo <at> gnu.org, 73286 <at> debbugs.gnu.org
> 
> > There seems to be a consensus to leave the command unbound, so Paul,
> > would you please submit a modified patch with that change?
> >
> > Thanks.
> 
> Sure, please find attached.  Thanks for the feedback!  Paul

Thanks, installed on master, and closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 09 Nov 2024 12:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 222 days ago.

Previous Next


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