GNU bug report logs -
#70824
29.3; Run time error in `dabbrev-completion'
Previous Next
Reported by: Matt Armstrong <matt <at> rfc20.org>
Date: Tue, 7 May 2024 19:22:01 UTC
Severity: normal
Found in version 29.3
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 70824 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 7 May 2024 12:52:56 -0700
> From: Matt Armstrong via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Debugging this further (sorry, still no repro so I'm debugging my live
> image), I think this was introduced a few years ago in commit
> 2d0085f756572856a2ed8d1bf043b59195a3e3f3 and partially fixed in commit
> d0975d7db03c231a3db5a1cd0edaf41094d43f0d.
>
> Those commits introduced a feature where `dabbrev--find-expansion'
> considers the components of a buffer's file name as completion
> candidates. It does this by creating a temp buffer containing the
> components.
>
> The problem is that this temp buffer is immediately killed, yet dabbrev
> variables still hold references to it. The second commit above correctly
> removes the killed buffer from `dabbrev--friend-buffer-list', but did
> not handle the case where `dabbrev--last-buffer' or
> `dabbrev--last-buffer-found' happened to be the just-killed buffer.
Thanks for the analysis.
> I can think of two approaches:
>
> - continual with the "manual GC" approach and scrub more dabbrev vars
> of this killed buffer.
> - handle the killed buffer gracefully by using buffer-live-p
> consistently, instead using checks against nil.
I think we should do both.
Can you suggest a patch along these lines?
This bug report was last modified 1 year and 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.