From unknown Sun Jun 22 00:03:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#17899 <17899@debbugs.gnu.org> To: bug#17899 <17899@debbugs.gnu.org> Subject: Status: 24.3.92.1; dabbrev-completion incorrectly searches all buffers Reply-To: bug#17899 <17899@debbugs.gnu.org> Date: Sun, 22 Jun 2025 07:03:31 +0000 retitle 17899 24.3.92.1; dabbrev-completion incorrectly searches all buffers reassign 17899 emacs submitter 17899 Stefan Guath severity 17899 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 02 09:55:27 2014 Received: (at submit) by debbugs.gnu.org; 2 Jul 2014 13:55:27 +0000 Received: from localhost ([127.0.0.1]:40125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2L0P-0002bn-LW for submit@debbugs.gnu.org; Wed, 02 Jul 2014 09:55:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55168) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2L0J-0002aQ-NI for submit@debbugs.gnu.org; Wed, 02 Jul 2014 09:55:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2L05-0003mR-EJ for submit@debbugs.gnu.org; Wed, 02 Jul 2014 09:55:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2L05-0003mG-Be for submit@debbugs.gnu.org; Wed, 02 Jul 2014 09:55:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Kzw-0004wJ-Ak for bug-gnu-emacs@gnu.org; Wed, 02 Jul 2014 09:55:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2Kzn-0003b6-9b for bug-gnu-emacs@gnu.org; Wed, 02 Jul 2014 09:54:56 -0400 Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:59819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Kzn-0003au-0j for bug-gnu-emacs@gnu.org; Wed, 02 Jul 2014 09:54:47 -0400 Received: by mail-la0-f44.google.com with SMTP id ty20so7100070lab.31 for ; Wed, 02 Jul 2014 06:54:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:content-type:content-transfer-encoding:subject :message-id:date:to:mime-version; bh=fJpklCXLNdNyRGzJQ4soQRFxexB2CkhhEOdeLiS6OvU=; b=QgKTHAATr6AsWZ+UmSfdTH7b4+EHxajixSPGPl8vwOiVaXMn+sJPCmQ4duOkDGB6xV BuR7MTo27p1PYCh8pfC3tRATTfm8nvqr/UEuF+hPigazms2fcRAoTdFduKOzrSamPsIQ K/EH2AzTBAucZa2pfZW9LsUrbJ34yFcNysR5wNhFEA2qVEGBMYKX4RL5D1s1HL0Pq3Sw kIrTJZZAP/ueXafN6UPx8w2ivYsDe4rKk6FjXBEkg2lJun0MbK5xnGKUTQqVPvoYIkJI 7msFlSFS71sL8oC2EN/DWfKWXibrDCt+AS2BGBR4iLpTIlbX6KrcgBe+X4RiBKXFjmC8 YdCg== X-Received: by 10.152.37.99 with SMTP id x3mr2448020laj.55.1404309284806; Wed, 02 Jul 2014 06:54:44 -0700 (PDT) Received: from [192.168.0.11] (c213-89-126-209.bredband.comhem.se. [213.89.126.209]) by mx.google.com with ESMTPSA id j13sm11878070lab.39.2014.07.02.06.54.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Jul 2014 06:54:44 -0700 (PDT) From: Stefan Guath Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: 24.3.92.1; dabbrev-completion incorrectly searches all buffers Message-Id: Date: Wed, 2 Jul 2014 15:54:43 +0200 To: bug-gnu-emacs@gnu.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) X-Mailer: Apple Mail (2.1878.2) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) VERSION: GNU Emacs 24.3.92.1 (x86_64-apple-darwin13.2.0, NS apple-appkit-1265.20) TO REPRODUCE BUG: * emacs -Q * Create two buffers (C-x b) with the following contents: foo.el: "idris0 idris1" bar.el: "ideal0 ideal1" * Go to end of foo.el, write "id" and execute dabbrev-completion (C-M-/) EXPECTED RESULT "id" should complete to "idris". The doc of dabbrev-completion is very = clear on this: "Like M-/ but finds all expansions in the current buffer and presents suggestions for completion. With a prefix argument ARG, it searches all buffers accepted by the function pointed out by `dabbrev-friend-buffer-function' to find the completions. If the prefix argument is 16 (which comes from C-u C-u), then it searches *all* buffers." No prefix was given here, so it should just look in the current buffer. ACTUAL RESULT A new buffer opens with the text: "In this buffer, type RET to select the completion near point. Possible completions are: ideal0 ideal1 idris0 idris1" Apparently, the buffer bar.el was incorrectly taken into account. After = killing buffer bar.el, dabbrev-completion completes as expected in = foo.el.= From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 02 13:52:07 2014 Received: (at control) by debbugs.gnu.org; 2 Jul 2014 17:52:07 +0000 Received: from localhost ([127.0.0.1]:40680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2OhO-0003qx-EB for submit@debbugs.gnu.org; Wed, 02 Jul 2014 13:52:07 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:47401 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2OhI-0003qN-0c for control@debbugs.gnu.org; Wed, 02 Jul 2014 13:52:01 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X2OhH-0005KE-Fn for control@debbugs.gnu.org; Wed, 02 Jul 2014 13:51:55 -0400 Date: Wed, 02 Jul 2014 13:51:55 -0400 Message-Id: Subject: control message for bug 17899 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) found 17899 23.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 03 07:43:50 2014 Received: (at 17899) by debbugs.gnu.org; 3 Jul 2014 11:43:50 +0000 Received: from localhost ([127.0.0.1]:41138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2fQb-0004Vf-Gb for submit@debbugs.gnu.org; Thu, 03 Jul 2014 07:43:50 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:51603) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2fQU-0004V9-I5 for 17899@debbugs.gnu.org; Thu, 03 Jul 2014 07:43:47 -0400 Received: by mail-wg0-f43.google.com with SMTP id b13so91742wgh.26 for <17899@debbugs.gnu.org>; Thu, 03 Jul 2014 04:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:content-type:content-transfer-encoding:subject :message-id:date:to:mime-version; bh=csNgUyIZh3zrQxZYPpXL16a35xUp2XVSPMoWvF41QqE=; b=JhK+aQLqTQjfmkj/zNJFOiR7nMrnKqV/aPbayZjbxBrMC69PHKNRrmC36doXdCXEJg Hzj9RLw4KaJyzFLEUzBqt/TjSUTWc4TT1dupw51XDgSDDfl//NafYyzSTvSO2p9gKmd+ TdP9bcnR+tuL/LLmiMKSsurG084D97G3V1PYL/N7Dy/No0T5tfL7SO6wwOrhA7yF06Z7 fAhOIi8uv5OFyJ9elam7pFFjHYiR1cj/CvXjIRbJUF8r3baXlnwfsv/g/mm/owDhiT0Z inIc/mhydO6Y9ly6gAxdySpHaLey76QOVpPnCDwNRZWbUq1AIjcarUvY+ZjkN518tpVh I56w== X-Received: by 10.194.82.106 with SMTP id h10mr2443812wjy.115.1404387816638; Thu, 03 Jul 2014 04:43:36 -0700 (PDT) Received: from [10.157.59.192] ([64.208.157.250]) by mx.google.com with ESMTPSA id cx5sm61541676wjb.8.2014.07.03.04.43.35 for <17899@debbugs.gnu.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Jul 2014 04:43:35 -0700 (PDT) From: Stefan Guath Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Source of bug? Message-Id: Date: Thu, 3 Jul 2014 13:43:34 +0200 To: 17899@debbugs.gnu.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) X-Mailer: Apple Mail (2.1878.2) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17899 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) `dabbrev-completion' dynamically binds `dabbrev-check-other-buffers' to = the correct value, but later down the call chain (i.e. = `dabbrev--find-all-expansions' -> `dabbrev--find-expansion' -> = `dabbrev--make-friend-buffer-list'), `dabbrev--make-friend-buffer-list' = instead uses the internal `dabbrev--check-other-buffers' which is not = updated accordingly. Could this be the source of the error? /Stefan Guath= From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 05 08:19:26 2019 Received: (at 17899) by debbugs.gnu.org; 5 Dec 2019 13:19:26 +0000 Received: from localhost ([127.0.0.1]:43301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1icr2U-0006GO-8b for submit@debbugs.gnu.org; Thu, 05 Dec 2019 08:19:26 -0500 Received: from mail-wr1-f51.google.com ([209.85.221.51]:36795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1icr2R-0006GB-QJ for 17899@debbugs.gnu.org; Thu, 05 Dec 2019 08:19:25 -0500 Received: by mail-wr1-f51.google.com with SMTP id z3so3576418wru.3 for <17899@debbugs.gnu.org>; Thu, 05 Dec 2019 05:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=noHB3tHsVHQCfGnchHqsrfiu2bzaP6guuIDXmZyfvjM=; b=jvPsxOqY2WzonoNYrfddbeKF3ifpe08K84/t9L6NCeMncSyp35f6+3r8apwgBYseMw Hwz0T4C6M+M81LhRZuGaifeEKRyRWkubJlTU6fCkltnr7yAULTLjBH8TNlRf6ogbtuzj IzBYyCNgCyf0FohXjYQJrjyk0cnTwDk/wlrS0rpcQNgEeGmxb5heQPREPZjtSd21ux3x rFW84IABCnZSJmxL6B6FK/YFJxlp8hsckQ1/dKakG9iTqsbuN0Ds7s9yUCAbvjK0gQgE XUCmYuSDEJiNdCsHSBmw/vMKkFDm6KaMXEVyiOEDTXmJh11BHz8Oza+q7eUkULv1Z3mU YRIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=noHB3tHsVHQCfGnchHqsrfiu2bzaP6guuIDXmZyfvjM=; b=PVMxfGf8100ouG87zHMt0ah2jaoPdFjFY5AtFeIiBFWCXFlvg8y27VOOUMQBxF892U uX0tmQpesuWBraIJs1eHP+HV8l7gxZNNxU4M8UJzsv+45vLHeUWcaDEsC6t5jNjJ4h5Y ToIK8E6QcW767M6OAuEY7hhrml4s4Dw+lIdYxb45/W5XmLSilYo41isSnzU3D0T05A1k bRsY1cw++p7zpTTyOGyvF6xaWnbyFjwUkVUp131qm2rsZ5JwZ7aXjF4/kgSySsjIlBRp kIH+kxdT0JO4krtG0O+OpVRS8FJzFQrP634bee4gK2gsfwzKlPryI6AxR0hLPdg7u6H2 6Mbg== X-Gm-Message-State: APjAAAWN1S1Vdi8ohanvx3Gl7FfD2sHf/GfOyGLtjbhHXZDfU4sk21QL ccqjTgVUC44pCeAc27hVhtuTsgESkvo= X-Google-Smtp-Source: APXvYqzm/d9zyL7BqOLX7YRpIyJFdhshFx3ePg3vzEPiJxZs7l3iNx8CAIuzHaRMzqU/w+dU2z5PLw== X-Received: by 2002:a5d:4692:: with SMTP id u18mr10443627wrq.206.1575551956614; Thu, 05 Dec 2019 05:19:16 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-8586-a56f-eccc-754e.holly.idiocy.org. [2001:8b0:3f8:8129:8586:a56f:eccc:754e]) by smtp.gmail.com with ESMTPSA id y10sm1779443wmm.3.2019.12.05.05.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2019 05:19:14 -0800 (PST) From: Alan Third To: Stefan Guath Subject: Re: bug#17899: 24.3.92.1; dabbrev-completion incorrectly searches all buffers References: Date: Thu, 05 Dec 2019 13:19:13 +0000 In-Reply-To: (Stefan Guath's message of "Wed, 2 Jul 2014 15:54:43 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 17899 Cc: 17899@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --=-=-= Content-Type: text/plain Stefan Guath writes: > TO REPRODUCE BUG: > * emacs -Q > * Create two buffers (C-x b) with the following contents: > foo.el: "idris0 idris1" > bar.el: "ideal0 ideal1" > * Go to end of foo.el, write "id" and execute dabbrev-completion (C-M-/) > > EXPECTED RESULT > "id" should complete to "idris". Hi, sorry it took so long for someone to look at this. I believe the attached patch fixes it. The problem seems to have been switching dabbrev.el over to using lexical scoping. It was previously using let* to temporarily override a couple of global variables, which works with dynamic scoping, but not lexical. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-dabbrev-completion-bug-17899.patch >From 40946b12d9583e87b89a3c942ed418990cc35355 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Thu, 5 Dec 2019 13:14:00 +0000 Subject: [PATCH] Fix dabbrev-completion (bug#17899) * lisp/dabbrev.el (dabbrev--check-all-buffers): Add new variable. (dabbrev-completion): Lexical scoping means we can't use let to override global variables, so use setq. (dabbrev--reset-global-variables): Reset new variable. (dabbrev--make-friend-buffer-list): Use new variable. * test/lisp/dabbrev-tests.el (dabbrev-completion-test): (dabbrev-completion-test-with-argument): New tests. --- lisp/dabbrev.el | 16 ++++++++++------ test/lisp/dabbrev-tests.el | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index 23abe7ae16..0cb9b0b824 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -323,6 +323,9 @@ dabbrev--last-case-pattern ;; Same as dabbrev-check-other-buffers, but is set for every expand. (defvar dabbrev--check-other-buffers dabbrev-check-other-buffers) +;; Same as dabbrev-check-all-buffers, but is set for every expand. +(defvar dabbrev--check-all-buffers dabbrev-check-all-buffers) + ;; The regexp for recognizing a character in an abbreviation. (defvar dabbrev--abbrev-char-regexp nil) @@ -380,10 +383,7 @@ dabbrev-completion then it searches *all* buffers." (interactive "*P") (dabbrev--reset-global-variables) - (let* ((dabbrev-check-other-buffers (and arg t)) - (dabbrev-check-all-buffers - (and arg (= (prefix-numeric-value arg) 16))) - (abbrev (dabbrev--abbrev-at-point)) + (let* ((abbrev (dabbrev--abbrev-at-point)) (beg (progn (search-backward abbrev) (point))) (end (progn (search-forward abbrev) (point))) (ignore-case-p (dabbrev--ignore-case-p abbrev)) @@ -420,6 +420,9 @@ dabbrev-completion (t (mapcar #'downcase completion-list))))))) (complete-with-action a list s p))))) + (setq dabbrev--check-other-buffers (and arg t)) + (setq dabbrev--check-all-buffers + (and arg (= (prefix-numeric-value arg) 16))) (completion-in-region beg end table))) ;;;###autoload @@ -623,7 +626,8 @@ dabbrev--reset-global-variables dabbrev--last-buffer-found nil dabbrev--abbrev-char-regexp (or dabbrev-abbrev-char-regexp "\\sw\\|\\s_") - dabbrev--check-other-buffers dabbrev-check-other-buffers)) + dabbrev--check-other-buffers dabbrev-check-other-buffers + dabbrev--check-all-buffers dabbrev-check-all-buffers)) (defun dabbrev--select-buffers () "Return a list of other buffers to search for a possible abbrev. @@ -772,7 +776,7 @@ dabbrev--make-friend-buffer-list ;; If dabbrev-check-all-buffers, tack on all the other ;; buffers at the end of the list, except those which are ;; specifically to be ignored. - (if dabbrev-check-all-buffers + (if dabbrev--check-all-buffers (setq list (append list (dabbrev-filter-elements diff --git a/test/lisp/dabbrev-tests.el b/test/lisp/dabbrev-tests.el index a6ab2e7201..d26362db3d 100644 --- a/test/lisp/dabbrev-tests.el +++ b/test/lisp/dabbrev-tests.el @@ -40,3 +40,33 @@ dabbrev-expand-test ;; M-/ SPC M-/ M-/ (execute-kbd-macro "\257 \257\257")) (should (string= (buffer-string) "ab x\nab y\nab y")))) + +(ert-deftest dabbrev-completion-test () + "Test for bug#17899. +dabbrev-completion should not look for expansions in other +buffers unless a prefix argument is used." + (with-temp-buffer + (insert "axy") + (with-temp-buffer + (insert "abc\na") + (goto-char 6) + (save-window-excursion + (set-window-buffer nil (current-buffer)) + ;; C-M-/ + (execute-kbd-macro [201326639])) + (should (string= (buffer-string) "abc\nabc"))))) + +(ert-deftest dabbrev-completion-test-with-argument () + "Test for bug#17899. +dabbrev-completion should not complete because it has found +multiple expansions." + (with-temp-buffer + (insert "axy") + (with-temp-buffer + (insert "abc\na") + (goto-char 6) + (save-window-excursion + (set-window-buffer nil (current-buffer)) + ;; C-u C-u C-M-/ + (execute-kbd-macro [21 21 201326639])) + (should (string= (buffer-string) "abc\na"))))) -- 2.21.0 --=-=-= Content-Type: text/plain -- Alan Third --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 10 15:54:19 2019 Received: (at 17899-done) by debbugs.gnu.org; 10 Dec 2019 20:54:19 +0000 Received: from localhost ([127.0.0.1]:56668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iemWQ-00084j-VO for submit@debbugs.gnu.org; Tue, 10 Dec 2019 15:54:19 -0500 Received: from mail-wm1-f42.google.com ([209.85.128.42]:55526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iemWN-00084U-O8 for 17899-done@debbugs.gnu.org; Tue, 10 Dec 2019 15:54:16 -0500 Received: by mail-wm1-f42.google.com with SMTP id q9so4733117wmj.5 for <17899-done@debbugs.gnu.org>; Tue, 10 Dec 2019 12:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=vgFwjzgGyb6322RFveOC4LK8bS0Vl9gjJ4y0v4Ndycc=; b=KEE2UFV6MHzEVZ1cD8DTRbsy099Mltupk3UuRaQV1rRPTXeSO6tD+TNqhMt5Gktl8K tfnl4DRg/vpB7K4EPmN77OY/DFpgmReH0yrWm/R/inI3g2D73M8PB+h0Zypu629vp5jF /Wy2zBiBXLNTJB9YYjSJ+MCyAiYz0A2gU0fElyxByUM1e1GaJv4vdP9H9e7jHOVWsZcM /ihRUI873PdONvLaBxvw0WTgrEBpHkUvdTWgLRqRqcxKDE3wRTPZ/AwG+nfj0NC6wxE5 JxqAVQLGSFsSJ4xkpkOll9STv206+hn7C6UGsocQESERxNzkkRbm31w28HAu2tauJGwf oeLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=vgFwjzgGyb6322RFveOC4LK8bS0Vl9gjJ4y0v4Ndycc=; b=hUnpYmrrt0LKjg+XANKKTwOot8wCf2uJiIlJc5lmMUvporNfTV1sPMPGwq9+aXT9n+ QaO5Wp1v2eGv6JoMJ5Cu9olCJ9AZxaFaJwfZ4zNGzedYRcOMewiI+fpC31KNX2z9RffV U8YQDmSe/muL8PTAhHL4mtx2tKwFpQy71k2/iFK2psXN479ClYjtnE9jHcheiZTzeHMY y4bEWNHn+j858Fn6F8O+2CprU1w1+NsC85bHdReytKNuYTEBf/ItdAElU9Cr3dmvvzTt X99/6mpQG0dHjfkzztBbpnA2vkTqOV2MFsNENAS5AYZZruzLHzP48pf9wMP2tY4hBHmi tXrQ== X-Gm-Message-State: APjAAAXVRARbtw4MijZyd88keK9HrpB3LueA0QD9UDbaruBNFHiO57/n 37T9VbwukKFBWBSLI2dCtansq4RjbjE= X-Google-Smtp-Source: APXvYqxKuhCIvlOERw2w3i8FqwaqaZlVXiH3V2oP6EGSC0hdMCoty2YXEvZBlZ/vbbvvKh/Vl0fn4A== X-Received: by 2002:a1c:1dc4:: with SMTP id d187mr7484779wmd.46.1576011249542; Tue, 10 Dec 2019 12:54:09 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-8586-a56f-eccc-754e.holly.idiocy.org. [2001:8b0:3f8:8129:8586:a56f:eccc:754e]) by smtp.gmail.com with ESMTPSA id i5sm1668967wml.31.2019.12.10.12.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2019 12:54:08 -0800 (PST) Date: Tue, 10 Dec 2019 20:54:06 +0000 From: Alan Third To: Stefan Guath Subject: Re: bug#17899: 24.3.92.1; dabbrev-completion incorrectly searches all buffers Message-ID: <20191210205406.GA61566@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 17899-done Cc: 17899-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, Dec 05, 2019 at 01:19:13PM +0000, Alan Third wrote: > Stefan Guath writes: > > > TO REPRODUCE BUG: > > * emacs -Q > > * Create two buffers (C-x b) with the following contents: > > foo.el: "idris0 idris1" > > bar.el: "ideal0 ideal1" > > * Go to end of foo.el, write "id" and execute dabbrev-completion (C-M-/) > > > > EXPECTED RESULT > > "id" should complete to "idris". > > Hi, sorry it took so long for someone to look at this. > > I believe the attached patch fixes it. The problem seems to have been > switching dabbrev.el over to using lexical scoping. It was previously > using let* to temporarily override a couple of global variables, which > works with dynamic scoping, but not lexical. I’ve pushed to master and am therefore closing this bug report. -- Alan Third From unknown Sun Jun 22 00:03:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 08 Jan 2020 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator