From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70824: 29.3; Run time error in `dabbrev-completion' Date: Tue, 7 May 2024 12:52:56 -0700 Message-ID: <43a0c058-b4f8-4875-a935-e1e33df5885b@rfc20.org> References: Reply-To: Matt Armstrong Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7229"; mail-complaints-to="usenet@ciao.gmane.io" To: 70824@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 07 21:54:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4Qt5-0001cz-Rr for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 May 2024 21:54:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4Qsh-0004S0-Ug; Tue, 07 May 2024 15:53:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4Qsf-0004PK-Ai for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 15:53:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4Qsc-0004Kv-FG for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 15:53:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4Qt0-0002yC-BY for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 15:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 May 2024 19:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70824 X-GNU-PR-Package: emacs Original-Received: via spool by 70824-submit@debbugs.gnu.org id=B70824.171511161711408 (code B ref 70824); Tue, 07 May 2024 19:54:02 +0000 Original-Received: (at 70824) by debbugs.gnu.org; 7 May 2024 19:53:37 +0000 Original-Received: from localhost ([127.0.0.1]:44400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4Qsa-0002xw-Ru for submit@debbugs.gnu.org; Tue, 07 May 2024 15:53:37 -0400 Original-Received: from out-184.mta1.migadu.com ([2001:41d0:203:375::b8]:31981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4QsY-0002xq-5Q for 70824@debbugs.gnu.org; Tue, 07 May 2024 15:53:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=key1; t=1715111581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=psT+wUl3s5uA7Cdkbe/t/5cKGpA2+eo1a3zDiXbt8r0=; b=jfz8eSf2UESwecpbVGP75agecai6722YwqZitsaLcRJXHkr7JxqwQzZblnUys/3+G/uoBH PFx+O4cjWa9eHgyM/mGcduKBYx83tJmPnJpvSXL2ek9ucejuoHKoGuNseJER23E8hl1Ubc CwIQ/UOcWi2LOIx97lOPCXCzSLZmS5qUDdQa30t8oy0tOGIrjK61GP6ZaBNom9obk6XhVw NkWKXWE8TDtm7qRSJf68t4ewJ5XzHLWRNzkv1YW5YObGukyNAVTtrzUR13VF3z4wOCygom a4yTGVZWA7kiq2IZNWQq0o/x9aApLKomy+jUkpaXmL4V4gAlf32ATQoC129hWQ== Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284657 Archived-At: 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.