GNU bug report logs - #74090
31.0.50; Problems with dabbrev-expand

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Tue, 29 Oct 2024 17:07:02 UTC

Severity: normal

Found in version 31.0.50

Done: Stephen Berman <stephen.berman <at> gmx.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 74090 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#74090: 31.0.50; Problems with dabbrev-expand
Date: Sat, 30 Nov 2024 23:30:21 +0100
On Sat, 30 Nov 2024 22:07:27 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Juri Linkov <juri <at> linkov.net>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  74090 <at> debbugs.gnu.org
>> Date: Sat, 30 Nov 2024 19:51:38 +0200
>> 
>> >>> 1. C-x b foo RET
>> >>> 2. Type: abc SPC abd
>> >>> 3. C-x b *scratch* RET
>> >>> 4. Type: ab M-/
>> >>> 5. C-x k foo RET
>> >>> 6. Type: SPC ab M-/
>> >>
>> >> Sorry, I meant emacs-30, not emacs-29.
>> >
>> > Thanks, I can reproduce it.  With the attached patch (against emacs-30)
>> > I don't get the error; instead, at step 6 "ab" expands to "abc", which I
>> > suppose is what's expected, and then typing `M-/' again shows the
>> > message "No further dynamic expansion for ‘ab’ found", which also seems
>> > as expected.  And with the patch, all current dabbrev regression tests
>> > pass with ert-run-tests-batch-and-exit.  Does anyone see a problem with
>> > the patch?
>> 
>> Thanks, I confirm it works now.

Thanks!

> Thanks for testing.  Stephen, you have green light for installing this
> on the emacs-30 branch.

Thanks, done in commit bd8a6f70fb9.

>> Would it be nice to have a new test that covers this case?
>
> Definitely.  But it is less urgent than fixing the bug itself.

I've added a test but I'm somewhat dissatisfied with it.  I wanted to
essentially reproduce the behavior I see with the patch, described
above.  However, after killing buffer "foo", the message about no
further expansion is from a user-error in dabbrev-expand, and on hitting
this in the test run, the test immediately finishes.  So I used
should-error with :type 'user-error and the test succeeds, but I cannot
test for the final buffer content nor the message displayed by
user-error.  If anyone has an idea how to do that or otherwise improve
the test, please chime in.

Steve Berman




This bug report was last modified 229 days ago.

Previous Next


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