unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Matt Armstrong via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 70824@debbugs.gnu.org
Subject: bug#70824: 29.3; Run time error in `dabbrev-completion'
Date: Tue, 7 May 2024 12:52:56 -0700	[thread overview]
Message-ID: <43a0c058-b4f8-4875-a935-e1e33df5885b@rfc20.org> (raw)
In-Reply-To: <handler.70824.B.171510968110138.ack@debbugs.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.

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.





  parent reply	other threads:[~2024-05-07 19:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 19:19 bug#70824: 29.3; Run time error in `dabbrev-completion' Matt Armstrong via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found] ` <handler.70824.B.171510968110138.ack@debbugs.gnu.org>
2024-05-07 19:52   ` Matt Armstrong via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-05-08 13:24     ` Eli Zaretskii
2024-05-25  7:34 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43a0c058-b4f8-4875-a935-e1e33df5885b@rfc20.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=70824@debbugs.gnu.org \
    --cc=matt@rfc20.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).