GNU bug report logs - #6419
A suggestion for easier editing of lists in Custom buffers

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Mon, 14 Jun 2010 05:48:01 UTC

Severity: wishlist

Tags: fixed

Merged with 38401

Found in version 27.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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 6419 in the body.
You can then email your comments to 6419 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Mon, 14 Jun 2010 05:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 14 Jun 2010 05:48:02 GMT) Full text and rfc822 format available.

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

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: A suggestion for easier editing of lists in Custom buffers
Date: Mon, 14 Jun 2010 07:47:04 +0200
Moving things in a list in a custom buffer is not very easy currently,
especially not if it contains nested lists. I have been thinking of
implementing some up/down arrows to permit moving of subtrees, but
that is also rather clumsy so I have refrained from it.


Here is another idea which perhaps both is more useful and easier to implement:

A) When clicking on a [-] do delete a subtree save (a print
representation) of it to the clipboard/kill ring (beside deleting the
subtree, of course ;-)

B) When on a [+] do add a new subtree give the possibility to paste
the deleted subtree in this position.


A is of course no problem to implement. B is probably not that hard to
implement either if one has the (sub)type for the subtree available on
the [+] button.




Merged 6419 38401. Request was from Mauro Aranda <maurooaranda <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 14 Oct 2020 12:10:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Wed, 14 Oct 2020 12:15:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6419 <at> debbugs.gnu.org
Subject: Re: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Wed, 14 Oct 2020 09:14:26 -0300
[Message part 1 (text/plain, inline)]
Lennart Borgman <lennart.borgman <at> gmail.com> writes:

> Moving things in a list in a custom buffer is not very easy currently,
> especially not if it contains nested lists. I have been thinking of
> implementing some up/down arrows to permit moving of subtrees, but
> that is also rather clumsy so I have refrained from it.
>
>
> Here is another idea which perhaps both is more useful and easier to
implement:
>
> A) When clicking on a [-] do delete a subtree save (a print
> representation) of it to the clipboard/kill ring (beside deleting the
> subtree, of course ;-)
>
> B) When on a [+] do add a new subtree give the possibility to paste
> the deleted subtree in this position.
>
>
> A is of course no problem to implement. B is probably not that hard to
> implement either if one has the (sub)type for the subtree available on
> the [+] button.

This idea didn't get any feedback back then, but I think there might be
value in it.  I'd tweak it to delete/insert widgets, rather than using
the kill ring.

Any opinions?
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Fri, 16 Oct 2020 05:11:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org
Subject: Re: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Fri, 16 Oct 2020 07:09:53 +0200
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> This idea didn't get any feedback back then, but I think there might be
> value in it.  I'd tweak it to delete/insert widgets, rather than using
> the kill ring.
>
> Any opinions?

I think it sounds like a good idea.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Wed, 21 Oct 2020 15:38:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org
Subject: Re: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Wed, 21 Oct 2020 12:37:15 -0300
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> This idea didn't get any feedback back then, but I think there might be
>> value in it.  I'd tweak it to delete/insert widgets, rather than using
>> the kill ring.
>>
>> Any opinions?
>
> I think it sounds like a good idea.

Thanks.

Here's my shot at it, please review.
[Message part 2 (text/html, inline)]
[0001-Allow-moving-members-of-editable-list-widget-via-del.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Wed, 21 Oct 2020 17:04:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Mauro Aranda <maurooaranda <at> gmail.com>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org
Subject: RE: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Wed, 21 Oct 2020 10:03:10 -0700 (PDT)
"Insert a new item (or a previously deleted one) into the list at this position."

Should "a previously deleted one" be "the last-deleted one"?

If you use INS in one customize buffer after using
DEL in another, or after using DEL in another part
of the same buffer (but not part of the same sequence),
is that last-deleted item inserted?  Or is it only the
last-deleted (if any) from the same sequence?

"If there is a recently deleted child, the new widget
is that deleted child."

Same question/problem.  Any recently deleted child?
What if there are several?  Is it the last-deleted
that's used?  (I see that the code says "last-deleted".)

"from the known childrens" -> "from the known children"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Wed, 21 Oct 2020 17:33:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org
Subject: Re: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Wed, 21 Oct 2020 14:32:24 -0300
[Message part 1 (text/plain, inline)]
Drew Adams <drew.adams <at> oracle.com> writes:

> "Insert a new item (or a previously deleted one) into the list at this
> position."
>
> Should "a previously deleted one" be "the last-deleted one"?

Not necessarily.  It works like a stack.

> If you use INS in one customize buffer after using
> DEL in another, or after using DEL in another part
> of the same buffer (but not part of the same sequence),
> is that last-deleted item inserted?  Or is it only the
> last-deleted (if any) from the same sequence?

The latter.  This only implements moving items within the same
sequence.

> "If there is a recently deleted child, the new widget
> is that deleted child."
>
> Same question/problem.  Any recently deleted child?
> What if there are several?  Is it the last-deleted
> that's used?  (I see that the code says "last-deleted".)

Hopefully what I said above made it clearer.  I guess it's clear that I
had trouble with making it clear and keeping the help-echo short at the
same time, so I'll be glad if someone can improve the wording, or
suggest improvements.

> "from the known childrens" -> "from the known children"

I'll fix that.

Thanks.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Wed, 21 Oct 2020 17:49:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org
Subject: RE: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Wed, 21 Oct 2020 10:48:26 -0700 (PDT)
>> Should "a previously deleted one" be "the last-deleted one"?
>
> Not necessarily.  It works like a stack.

How is that different - LIFO, no?
In any case, how it works needs to be made clear
somewhere.

>> If you use INS in one customize buffer after using
>> DEL in another, or after using DEL in another part
>> of the same buffer (but not part of the same sequence),
>> is that last-deleted item inserted?  Or is it only the
>> last-deleted (if any) from the same sequence?
>
> The latter.  This only implements moving items within the same
sequence.

So maybe make that clear somehow.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Wed, 21 Oct 2020 18:06:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org
Subject: Re: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Wed, 21 Oct 2020 15:05:36 -0300
[Message part 1 (text/plain, inline)]
Drew Adams <drew.adams <at> oracle.com> writes:

>>> Should "a previously deleted one" be "the last-deleted one"?
>>
>> Not necessarily.  It works like a stack.
>
> How is that different - LIFO, no?
> In any case, how it works needs to be made clear
> somewhere.

Yes, of course.  But in that case I think the help-echo should say
explicitly: "the last-deleted one not yet reinserted", or something like
that.

>>> If you use INS in one customize buffer after using
>>> DEL in another, or after using DEL in another part
>>> of the same buffer (but not part of the same sequence),
>>> is that last-deleted item inserted?  Or is it only the
>>> last-deleted (if any) from the same sequence?
>>
>> The latter.  This only implements moving items within the same
> sequence.
>
> So maybe make that clear somehow.

Will try.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Thu, 22 Oct 2020 11:39:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Thu, 22 Oct 2020 13:38:12 +0200
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> Will try.

OK, so you're sending a new version of the patch?  Then I won't apply
the one you've already posted (which seemed clear enough to me, really).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Thu, 22 Oct 2020 11:49:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Thu, 22 Oct 2020 08:48:14 -0300
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> Will try.
>
> OK, so you're sending a new version of the patch?  Then I won't apply
> the one you've already posted (which seemed clear enough to me, really).

Yes, here it is.  I fixed the typo, and tried to improve
the help-echo of the INS button.
[Message part 2 (text/html, inline)]
[0001-Allow-moving-members-of-editable-list-widget-via-del.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Thu, 22 Oct 2020 11:55:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Thu, 22 Oct 2020 13:54:08 +0200
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> Yes, here it is.  I fixed the typo, and tried to improve
> the help-echo of the INS button.

Thanks, applied to Emacs 28 with one super-minor tweak:

> +          (last-deleted (let ((lst (widget-get widget :last-deleted)))
> +                          (and lst (prog1 (pop lst)
> +                                     (widget-put widget :last-deleted lst))))

I made this into a `when-let' instead of the let+and.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 22 Oct 2020 11:55:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 6419 <at> debbugs.gnu.org and Lennart Borgman <lennart.borgman <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 22 Oct 2020 11:55:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6419; Package emacs. (Thu, 22 Oct 2020 12:05:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6419 <at> debbugs.gnu.org,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#6419: A suggestion for easier editing of lists in Custom
 buffers
Date: Thu, 22 Oct 2020 09:03:45 -0300
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> Yes, here it is.  I fixed the typo, and tried to improve
>> the help-echo of the INS button.
>
> Thanks, applied to Emacs 28 with one super-minor tweak:
>
>> +          (last-deleted (let ((lst (widget-get widget :last-deleted)))
>> +                          (and lst (prog1 (pop lst)
>> +                                     (widget-put widget :last-deleted
lst))))
>
> I made this into a `when-let' instead of the let+and.

Noticed.  Thanks!
[Message part 2 (text/html, inline)]

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

This bug report was last modified 3 years and 159 days ago.

Previous Next


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