GNU bug report logs - #71107
29.3; eshell-hist/Incorrect history handling with eshell-hist-ignoredups 'erase

Previous Next

Package: emacs;

Reported by: Robin Campbell Joy <emacs <at> robinjoy.net>

Date: Wed, 22 May 2024 08:22:02 UTC

Severity: minor

Tags: patch

Found in version 29.3

Done: Jim Porter <jporterbugs <at> gmail.com>

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 71107 in the body.
You can then email your comments to 71107 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#71107; Package emacs. (Wed, 22 May 2024 08:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robin Campbell Joy <emacs <at> robinjoy.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 22 May 2024 08:22:02 GMT) Full text and rfc822 format available.

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

From: Robin Campbell Joy <emacs <at> robinjoy.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.3;
 eshell-hist/Incorrect history handling with eshell-hist-ignoredups
 'erase
Date: Wed, 22 May 2024 10:21:12 +0200
[Message part 1 (text/plain, inline)]
Severity: minor
Tags: patch

In case of eshell-hist-ingoredups set to 'erase, history handling isn't
working correctly.

1) If the input ring is empty, no elements are added to the ring.
2) If elements are on the ring, but the element added to the ring is not
yet in the ring, the last element is deleted.
3) When switching to 'erase with multiple duplicates in the ring, only
the last equal element is removed.

emacs -Q
(require 'eshell)
(setq eshell-hist-ignoredups 'erase)
(eshell)
$ echo foo
foo
M-p -> Empty input ring
[Message part 2 (text/html, inline)]
[eshell-hist-ignoredups.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71107; Package emacs. (Thu, 23 May 2024 04:37:01 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Robin Campbell Joy <emacs <at> robinjoy.net>, 71107 <at> debbugs.gnu.org
Subject: Re: bug#71107: 29.3; eshell-hist/Incorrect history handling with
 eshell-hist-ignoredups 'erase
Date: Wed, 22 May 2024 21:35:29 -0700
On 5/22/2024 1:21 AM, Robin Campbell Joy wrote:
> Severity: minor
> Tags: patch
> 
> In case of eshell-hist-ingoredups set to 'erase, history handling isn't
> working correctly.

I believe this should already be fixed by commit 7b0f24ab1f9 from bug#63360.

However, I didn't bother to account for the case where there may be 
multiple entries to remove (I just added a FIXME note since it seemed 
like a low priority). If removing multiple duplicates is important to 
you, would you be willing to rebase your patch on top of the master 
branch? Thanks either way.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71107; Package emacs. (Thu, 23 May 2024 06:24:02 GMT) Full text and rfc822 format available.

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

From: Robin Campbell Joy <emacs <at> robinjoy.net>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: 71107 <at> debbugs.gnu.org
Subject: Re: bug#71107: 29.3; eshell-hist/Incorrect history handling with
 eshell-hist-ignoredups 'erase
Date: Thu, 23 May 2024 08:22:37 +0200
[Message part 1 (text/plain, inline)]
On Thu, 23 May 2024 at 06:35, Jim Porter <jporterbugs <at> gmail.com> wrote:

> I believe this should already be fixed by commit 7b0f24ab1f9 from
> bug#63360.
>
> However, I didn't bother to account for the case where there may be
> multiple entries to remove (I just added a FIXME note since it seemed
> like a low priority). If removing multiple duplicates is important to
> you, would you be willing to rebase your patch on top of the master
> branch? Thanks either way.
>

Thanks, not sure why I didn't find this when looking for an existing bug,
should have checked master first though.

Attached the rebased patch. Thanks for fixing this.
[Message part 2 (text/html, inline)]
[eshell-hist-ignoredups.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71107; Package emacs. (Thu, 23 May 2024 23:36:02 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Robin Campbell Joy <emacs <at> robinjoy.net>
Cc: 71107 <at> debbugs.gnu.org, eli <at> gnu.org
Subject: Re: bug#71107: 29.3; eshell-hist/Incorrect history handling with
 eshell-hist-ignoredups 'erase
Date: Thu, 23 May 2024 16:33:51 -0700
On 5/22/2024 11:22 PM, Robin Campbell Joy wrote:
> Thanks, not sure why I didn't find this when looking for an existing 
> bug, should have checked master first though.
> 
> Attached the rebased patch. Thanks for fixing this.

Thanks for the updated patch. From a visual inspection, this all looks 
good to me.

Just two small things and then I think this is good to merge:

1) Could you add a commit message in the usual style (you can look at 
the other Emacs commits to get an idea of what these look like), and 
then generate the patch file with `git format-patch master`? This'll 
make it easier for me to apply the patch without having to write up a 
commit message myself.

2) Have you filled out copyright assignment paperwork with the FSF? 
While the code changes are below the maximum (15 lines) for no 
paperwork, the tests push it over. (I'm not 100% sure if we count test 
code for the copyright stuff.) I don't think I can check the paperwork 
status for people myself, but hopefully Eli (CCed) can help if needed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71107; Package emacs. (Fri, 24 May 2024 05:59:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: emacs <at> robinjoy.net, 71107 <at> debbugs.gnu.org
Subject: Re: bug#71107: 29.3;
 eshell-hist/Incorrect history handling with eshell-hist-ignoredups
 'erase
Date: Fri, 24 May 2024 08:55:47 +0300
> Cc: 71107 <at> debbugs.gnu.org, eli <at> gnu.org
> Date: Thu, 23 May 2024 16:33:51 -0700
> From: Jim Porter <jporterbugs <at> gmail.com>
> 
> 2) Have you filled out copyright assignment paperwork with the FSF? 
> While the code changes are below the maximum (15 lines) for no 
> paperwork, the tests push it over. (I'm not 100% sure if we count test 
> code for the copyright stuff.) I don't think I can check the paperwork 
> status for people myself, but hopefully Eli (CCed) can help if needed.

Robin's assignment is on file, so we can accept this and other
contributions without limitations.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71107; Package emacs. (Fri, 24 May 2024 12:31:01 GMT) Full text and rfc822 format available.

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

From: Robin Campbell Joy <emacs <at> robinjoy.net>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: 71107 <at> debbugs.gnu.org, eli <at> gnu.org
Subject: Re: bug#71107: 29.3; eshell-hist/Incorrect history handling with
 eshell-hist-ignoredups 'erase
Date: Fri, 24 May 2024 14:29:59 +0200
[Message part 1 (text/plain, inline)]
On Fri, 24 May 2024 at 01:33, Jim Porter <jporterbugs <at> gmail.com> wrote:

> On 5/22/2024 11:22 PM, Robin Campbell Joy wrote:
> > Thanks, not sure why I didn't find this when looking for an existing
> > bug, should have checked master first though.
> >
> > Attached the rebased patch. Thanks for fixing this.
>
> Thanks for the updated patch. From a visual inspection, this all looks
> good to me.
>
> Just two small things and then I think this is good to merge:
>
> 1) Could you add a commit message in the usual style (you can look at
> the other Emacs commits to get an idea of what these look like), and
> then generate the patch file with `git format-patch master`? This'll
> make it easier for me to apply the patch without having to write up a
> commit message myself.
>

Sure, hope this will do.
[Message part 2 (text/html, inline)]
[0001-Erase-existing-duplicates-in-eshell-history-ring.patch (application/octet-stream, attachment)]

Reply sent to Jim Porter <jporterbugs <at> gmail.com>:
You have taken responsibility. (Sat, 25 May 2024 02:38:01 GMT) Full text and rfc822 format available.

Notification sent to Robin Campbell Joy <emacs <at> robinjoy.net>:
bug acknowledged by developer. (Sat, 25 May 2024 02:38:02 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Robin Campbell Joy <emacs <at> robinjoy.net>
Cc: eli <at> gnu.org, 71107-done <at> debbugs.gnu.org
Subject: Re: bug#71107: 29.3; eshell-hist/Incorrect history handling with
 eshell-hist-ignoredups 'erase
Date: Fri, 24 May 2024 19:35:48 -0700
On 5/24/2024 5:29 AM, Robin Campbell Joy wrote:
> Sure, hope this will do.

Thanks, that looks good to me. I've merged your patch to the master 
branch as 984fb346fdf. Closing this bug now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71107; Package emacs. (Sat, 25 May 2024 02:40:02 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: emacs <at> robinjoy.net, 71107 <at> debbugs.gnu.org
Subject: Re: bug#71107: 29.3; eshell-hist/Incorrect history handling with
 eshell-hist-ignoredups 'erase
Date: Fri, 24 May 2024 19:38:16 -0700
On 5/23/2024 10:55 PM, Eli Zaretskii wrote:
> Robin's assignment is on file, so we can accept this and other
> contributions without limitations.

Thanks for checking.





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

This bug report was last modified 1 year and 55 days ago.

Previous Next


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