From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 13:06:36 2024 Received: (at submit) by debbugs.gnu.org; 29 Oct 2024 17:06:36 +0000 Received: from localhost ([127.0.0.1]:57476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5pfu-0003DP-RI for submit@debbugs.gnu.org; Tue, 29 Oct 2024 13:06:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:41900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5pfo-0003D5-PA for submit@debbugs.gnu.org; Tue, 29 Oct 2024 13:06:31 -0400 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 1t5pfo-0002Fc-BO for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:06:28 -0400 Received: from mout.gmx.net ([212.227.15.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5pfl-0004na-8z for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 13:06:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1730221581; x=1730826381; i=stephen.berman@gmx.net; bh=EBVSVmgXqfjsa8qeQK/YTCX5v8Dn2UaHcQisAoD3uNc=; h=X-UI-Sender-Class:From:To:Subject:Date:Message-ID:MIME-Version: Content-Type:cc:content-transfer-encoding:content-type:date:from: message-id:mime-version:reply-to:subject:to; b=Ik4TBICKz3Ah9mhFZ0d5QTAMblroQx8TyAmX7h8fytOfLSriZs109Qmvdk4n8Qqo nkAz7tZylKnHvcZro8+C4za1gAjF4hcA0noSnlVHhf6L5WfgcAPJTt20ewaB3egss m41XubSj5iWleicptJhYhsAbbUo10KH0O4sLEAG0h9JD5Qre2VHBjTKdalr2u8IKX igqCQNlLjxzN13uOiufbf0nZcOKBGErhBbvPCbF3AgwlKDU4xp55jzurq7jqLBzet SnFh7LV8XFPO35+1+QDfuF7JUD+EpFfcfSZV+8acj87RKP5hefywZag15CGI6n4FU EHDdOyFoD6C5ZEeSDw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.95.149]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M9Wuk-1tBJJx2Dau-000KCQ for ; Tue, 29 Oct 2024 18:06:21 +0100 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 31.0.50; Problems with dabbrev-expand X-Debbugs-Cc: Date: Tue, 29 Oct 2024 18:06:18 +0100 Message-ID: <878qu6j0tx.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:6ZB2iFL2mKtanZzd2ycRpaO3NS3M1XerZ6CqMsdf+s/06U4O6uT 6eZARUyU1ZpCwPUSOmZ8cM05JmgvXVHkkQ+1JJCld/Bcp1wRKN1IaPPQo9H1/vaua5uYhB7 ZWDRecLbE2V6FTVoR7/KjEw+eMHYBfGQ1Lmx0QZv9AqguIETSDLSDBrLaBNEeSef716nMou JgSDmziYqaiglGkYfS3mg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:HWdQn/ZOBDo=;CAoMXEfWclchCQg+SEVysOpa1KR RlIsDWDBZKyXfaMvhekMqHzGBsvEJLI/z9NfIeqIfhVxkFqdG86Sk3PNzKlNlLoGB0bvFUKPe SJ0VOCqbK050NHzi087dmHGevDvuqzmwbnEaAMwXekO6cOxefDUA0aPvF/YK4LxZDVUJ4NjEV aRp8DWKdIHm2Nz32M/quoDQi8IefiuWEPXyoAcBWHwAv/SB0V7Ieh/4RsSGPgBHU6j94LI+i0 aAWS7xDeAS2/hUZITpw+QmPlDqthS8agOeK6wHpMofKS8FsA5XflzuiNiwp5Ig418W00WDH9B hRjkK3jeQPTFecZhuoYYxqqpy51txhx1jlTsMhygDXuEqpsZRP2To2IglDQbbA8xKHXRJiDO8 W4tWCBRApz90m7UldAIibdLOCnckYOBCkq2EXapKKdrwKhMg7G3oKwj6m/rw2SqcXZ4RrYNH8 UvrqNnQ+Wheq7XAKf4OEHlRVgZ5QQIY86LYQJLppfEwisLeVSGEKYAvboK2frrA2JvDaNfNZU DvfC/3IbaQq64oZAHBEaiRZPfAo/b792wXv4CQ1vP6QnMDPglxbe4DV83RVJb+s1rNx5q9Ul7 cfbi8Sysv8vsq4AB2JEGaKUBb5zYjo8FHKQMoLRtMMRhDLDDeJ/vVQ23PgFc8V0zE2ouR5d5d bA1xxTNBAMTYRcDbM4cPDwq0Ro7QkgPZtx1GU98zhOCJCB1GmzO42X7nnpdf40U/ThmQc1PWn NuxMSVpwmjk83FfS9+sI1Sj64jsEvtndbif12r31Zjl3mBzZEJNuHaUb9MpZltU3ZMYmTgKVh soR1NcSI++j5fIvBTw7qunSQ== Received-SPF: pass client-ip=212.227.15.19; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable If an expansion found by dabbrev-expand is located in a different buffer than the buffer from which dabbrev-expand was invoked, the following kinds of problems can occur: First problem: 0. emacs -Q 1. Visit (for example) the INSTALL file in the Emacs source tree. 2. Switch to a new buffer (either empty or at least not containing any text that can be a dabbrev expansion), type into it the string "Ind" and then type `M-/' (dabbrev-expand), which expands "Ind" to "Indic". 3. Type `SPC M-/' =3D> This does not expand the buffer substring "Indic and" but to "Indicmacs", which is not a string in any live buffer. A variant of this problem: After switching to a new buffer replace the rest of step 2 by the following: 2a. Type `Indic SPC M-/'. This correctly expands to "Indic and". 3. Type `SPC M-/' =3D> This does not expand the buffer substring "Indic and Khmer" but to "Indic and Installation", which is not a string in any live buffer. Another variant of this problem: After visiting INSTALL, type `M-x find-library RET dabbrev RET' to visit the dabbrev.el source file, then switch to a new buffer, e.g. `C-x b a' and type `M-x emacs-lisp-mode'. Now continue: 2b. Type `Ind SPC M-/'. This expands to "Indicate" and displays the message "Expansion found in =E2=80=98dabbrev.el=E2=80=99". 3b. Type `M-/' to replace the expansion. This now expands to "Indic" and displays the message "Expansion found in =E2=80=98INSTALL=E2=80=99". 4. Type `SPC M-/' =3D> This expands as above to "Indicmacs", which is not a string in any live buffer. Second problem: 0. emacs -Q 1. Visit (for example) the INSTALL file in the Emacs source tree. 2. Type `C-s Ind M-a C-SPC M-} C-x n n' and at the prompt type SPC to narrow the buffer to the paragraph containing "Indic". 3. As in step 2 of the first problem, switch to a new buffer, e.g. `C-x b a' and then type `Ind M-/'. As above, this expands to "Indic". 4. Type `SPC M-/'. =3D> This raises the error "Args out of range: #, #, 4886". These problems also occur if, instead of invoking dabbrev-expand from an ordinary buffer, you invoke a command that accepts text input in the minibuffer, e.g `M-%', and then invoke dabbrev-expand from there: - For the first case, typing `M-% Ind M-/' in the minibuffer expands to "Indic", but now typing `SPC M-/' expands the string to "Indicon", which is not a string in INSTALL or any other live buffer. - For the first variant of the first case, typing `M-% Indic SPC M-/' in the minibuffer correctly expands to "Indic and", but typing `SPC M-/' again expands the string to "Indic anduide", which is not a string in INSTALL or any other live buffer. - For the second variant of the first case, after visiting INSTALL and dabbrev.el, in the latter buffer first typing `M-% Ind M-/' in the minibuffer expands to "Indicate", then typing `M-/' replaces the expansion with "Indic", and now typing `SPC M-/' expands string to "Indicon", which is not a string in any live buffer. - For the second case, after narrowing buffer INSTALL as above, typing `M-% Ind M-/' expands to "Indic" and then typing SPC M-/' results in the error "Args out of range: #, #, 4886". (For the record, I'm pretty sure I've encountered the first problem and its variants in my normal use of Emacs, though I can't recall specific instances. I don't recall encountering problems with dabbrev-expand when using query-replace (but I probably seldom use dabbrev-expand with query-replace); however, a number of times I have hit the args-out-of-range error on invoking dabbrev-expand in the minibuffer in todo-mode, and that is what motivated me to debug the problem, which led to finding the other dabbrev-expand problems and variants. I used query-replace instead of todo-mode in the above recipes to keep them simpler by not having to include the additional steps needed to use todo-mode.) >From my debugging of these problems, I think they arise because the code in dabbrev-expand that sets up looking for an expansion (either directly, or after a space, or as a replacement for the current expansion) wrongly using positions in the buffer from which dabbrev-expand was invoked instead of the buffer in which the expansion is found. The attached patch fixes these problems, according to my tests. The patch includes comments justifying or at least motivating the changes. The patch also includes new tests for dabbrev-tests.el, both for the cases described above as well as for the same operations but confined to a single buffer, for which the current code yields correct results (the tests for the problematic cases fail with the current code, of course). After applying my fix to dabbrev.el all tests pass with `make check' as well as in a batch run. However, the four "other-buffer" tests fail when manually running ert in the dabbrev-tests.el buffer, and I don't know why; from the ERT output it looks like dabbrev-expand is treating the test file buffer as the current buffer when manually running these tests, but I don't see how that happens. Another unresolved issue is with the test dabbrev-expand-test-minibuffer-3: I could only get this to pass by invoking `dabbrev--reset-global-variables', and I don't know why that is needed here but not in the other tests. (The patch omits the two new resource files used in the tests, which are copies of parts of INSTALL and dabbrev.el from the Emacs sources). In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2) of 2024-10-29 built on strobelfssd Repository revision: 9aa186592634212fcdb2dbafdfd0c52a2475ba96 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101013 System Description: Linux From Scratch r12.2-17-systemd Configured using: 'configure -C 'CFLAGS=3D-Og -g3' PKG_CONFIG_PATH=3D/opt/qt6/lib/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: dabbrev patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index 7b6cbb78cef..f9f9fc8bb27 100644 =2D-- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -464,8 +464,21 @@ dabbrev-expand See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." (interactive "*P") - (let (abbrev record-case-pattern - expansion old direction (orig-point (point))) + ;; There are three possible sources of the expansion, which we need to + ;; check in a specific order: + (let ((buf (cond ((window-minibuffer-p) + ;; If we invoked dabbrev-expand in the minibuffer, + ;; this is the buffer from which we entered the + ;; minibuffer. + (window-buffer (get-mru-window))) + ;; Otherwise, if we found the expansion in another + ;; buffer, use that buffer for further expansions. + (dabbrev--last-buffer-found dabbrev--last-buffer-found= ) + ;; Otherwise, use the buffer where we invoked + ;; dabbrev-expand. + (t (current-buffer)))) + abbrev record-case-pattern expansion old direction + (orig-point (point))) ;; abbrev -- the abbrev to expand ;; expansion -- the expansion found (eventually) or nil until then ;; old -- the text currently in the buffer @@ -480,6 +493,7 @@ dabbrev-expand (point))))) ;; Find a different expansion for the same abbrev as last time. (progn + (setq dabbrev--last-buffer-found nil) (setq abbrev dabbrev--last-abbreviation) (setq old dabbrev--last-expansion) (setq direction dabbrev--last-direction)) @@ -488,7 +502,14 @@ dabbrev-expand (if (and (eq (preceding-char) ?\s) (markerp dabbrev--last-abbrev-location) (marker-position dabbrev--last-abbrev-location) - (=3D (point) (1+ dabbrev--last-abbrev-location))) + ;; Comparing with point only makes sense in the buffer + ;; where we called dabbrev-exand, but if that differs + ;; from the buffer containing the expansion, we want to + ;; get the next word in the latter buffer, so we skip + ;; the comparison. + (if (eq buf (current-buffer)) + (=3D (point) (1+ dabbrev--last-abbrev-location)) + t)) (progn ;; The "abbrev" to expand is just the space. (setq abbrev " ") @@ -549,29 +570,43 @@ dabbrev-expand (if old " further" "") abbrev)) (t (if (not (or (eq dabbrev--last-buffer dabbrev--last-buffer-found) - (minibuffer-window-active-p (selected-window)))) + ;; If we are in the minibuffer and an expansion has + ;; been found but dabbrev--last-buffer-found is not + ;; yet set, we need to set it now. + (and dabbrev--last-buffer-found + (minibuffer-window-active-p (selected-window))))) (progn (when (buffer-name dabbrev--last-buffer) (message "Expansion found in `%s'" (buffer-name dabbrev--last-buffer))) (setq dabbrev--last-buffer-found dabbrev--last-buffer)) (message nil)) - (if (and (or (eq (current-buffer) dabbrev--last-buffer) - (null dabbrev--last-buffer) - (buffer-live-p dabbrev--last-buffer)) - (numberp dabbrev--last-expansion-location) - (and (> dabbrev--last-expansion-location (point)))) - (setq dabbrev--last-expansion-location - (copy-marker dabbrev--last-expansion-location))) + ;; To get correct further expansions we have to be sure to use the + ;; buffer containing the already found expansions. + (when dabbrev--last-buffer-found + (setq buf dabbrev--last-buffer-found)) + ;; If the buffer where we called dabbrev-expand differs from the + ;; buffer containing the expansion, make sure copy-marker is + ;; called in the latter buffer. + (with-current-buffer buf + (if (and (or (eq (current-buffer) dabbrev--last-buffer) + (null dabbrev--last-buffer) + (buffer-live-p dabbrev--last-buffer)) + (numberp dabbrev--last-expansion-location) + (and (> dabbrev--last-expansion-location (point)))) + (setq dabbrev--last-expansion-location + (copy-marker dabbrev--last-expansion-location)))) ;; Success: stick it in and return. (setq buffer-undo-list (cons orig-point buffer-undo-list)) (setq expansion (dabbrev--substitute-expansion old abbrev expansion record-case-pattern)= ) - ;; Save state for re-expand. - (setq dabbrev--last-expansion expansion) - (setq dabbrev--last-abbreviation abbrev) - (setq dabbrev--last-abbrev-location (point-marker)))))) + ;; Save state for re-expand (making sure it's the state of the + ;; buffer containing the already found expansions). + (with-current-buffer buf + (setq dabbrev--last-expansion expansion) + (setq dabbrev--last-abbreviation abbrev) + (setq dabbrev--last-abbrev-location (point-marker))))))) ;;---------------------------------------------------------------- ;; Local functions diff --git a/test/lisp/dabbrev-tests.el b/test/lisp/dabbrev-tests.el index c7574403949..987106aa5af 100644 =2D-- a/test/lisp/dabbrev-tests.el +++ b/test/lisp/dabbrev-tests.el @@ -25,6 +25,7 @@ ;;; Code: (require 'ert) +(require 'ert-x) (require 'dabbrev) (ert-deftest dabbrev-expand-test () @@ -68,4 +69,210 @@ dabbrev-completion-test-with-argument (execute-kbd-macro (kbd "C-u C-u C-M-/"))) (should (string=3D (buffer-string) "abc\na"))))) +(defmacro with-dabbrev-test (&rest body) + "Set up an isolated `dabbrev' test environment." + (declare (debug (body))) + `(ert-with-temp-directory dabbrev-test-home + (let* (;; Since we change HOME, clear this to avoid a conflict + ;; e.g. if Emacs runs within the user's home directory. + (abbreviated-home-dir nil) + (process-environment (cons (format "HOME=3D%s" dabbrev-test-h= ome) + process-environment)) + (dabbrev-directory (ert-resource-directory))) + (unwind-protect + (progn ,@body) + ;; Restore pre-test-run state of test files. + (dolist (f (directory-files dabbrev-directory)) + (let ((buf (get-file-buffer f))) + (when buf + (with-current-buffer buf + (restore-buffer-modified-p nil) + (kill-buffer))))) + (dabbrev--reset-global-variables))))) + +(ert-deftest dabbrev-expand-test-same-buffer-1 () + "Test expanding a string twice within a single buffer. +The first expansion should expand the input (a prefix-string) to a +string in the buffer containing no whitespace character, the second +expansion, after adding a space to the first expansion, should extend +the string with the following string in the buffer up to the next +whitespace character." + (with-dabbrev-test + (find-file (ert-resource-file "INSTALL_BEGIN")) + (goto-char (point-max)) + (terpri) + (execute-kbd-macro (kbd "Ind M-/")) + (should (string=3D (buffer-substring (pos-bol) (pos-eol)) "Indic")) + (execute-kbd-macro (kbd "SPC M-/")) + (should (string=3D (buffer-substring (pos-bol) (pos-eol)) "Indic and")= ))) + +(ert-deftest dabbrev-expand-test-same-buffer-2 () + "Test expanding a string plus space twice within a single buffer. +Each expansion should extend the string with the following string in the +buffer up to the next whitespace character." + (with-dabbrev-test + (find-file (ert-resource-file "INSTALL_BEGIN")) + (goto-char (point-max)) + (terpri) + (execute-kbd-macro (kbd "Indic SPC M-/")) + (should (string=3D (buffer-substring (pos-bol) (pos-eol)) "Indic and")= ) + (execute-kbd-macro (kbd "SPC M-/")) + (should (string=3D (buffer-substring (pos-bol) (pos-eol)) "Indic and K= hmer")))) + +(ert-deftest dabbrev-expand-test-same-buffer-3 () + "Test replacing an expansion within a single buffer." + (with-dabbrev-test + (find-file (ert-resource-file "INSTALL_BEGIN")) + (goto-char (point-max)) + (terpri) + (insert-file-contents (ert-resource-file "dabbrev-expand.el")) + (goto-char (point-max)) + (terpri) + (execute-kbd-macro (kbd "Ind M-/")) + (should (string=3D (buffer-substring (pos-bol) (pos-eol)) "Indicate")) + (kill-whole-line) + (execute-kbd-macro (kbd "Ind M-/ M-/")) + (should (string=3D (buffer-substring (pos-bol) (pos-eol)) "Indic")) + (execute-kbd-macro (kbd "SPC M-/")) + (should (string=3D (buffer-substring (pos-bol) (pos-eol)) "Indic and")= ))) + +(ert-deftest dabbrev-expand-test-same-buffer-4 () + "Test expanding a string in a narrowed-region." + (with-dabbrev-test + (let (disabled-command-function) ; Enable narrow-to-region. + (find-file (ert-resource-file "INSTALL_BEGIN")) + (goto-char (point-min)) + (execute-kbd-macro (kbd "C-s Ind M-a C-SPC M-} C-x n n")) + (goto-char (point-max)) + (terpri) + (execute-kbd-macro (kbd "Ind M-/")) + (should (string=3D (buffer-substring (pos-bol) (pos-eol)) "Indic")) + (execute-kbd-macro (kbd "SPC M-/")) + (should (string=3D (buffer-substring (pos-bol) (pos-eol)) "Indic and= "))))) + +(ert-deftest dabbrev-expand-test-other-buffer-1 () + "Test expanding a prefix string to a string from another buffer." + (with-dabbrev-test + (find-file (ert-resource-file "INSTALL_BEGIN")) + (switch-to-buffer (get-buffer-create "a" t)) + (execute-kbd-macro (kbd "Ind M-/")) + (should (string=3D (buffer-string) "Indic")) + (execute-kbd-macro (kbd "SPC M-/")) + (should (string=3D (buffer-string) "Indic and")) + (kill-buffer "a"))) + +(ert-deftest dabbrev-expand-test-other-buffer-2 () + "Test expanding a string + space to a string from another buffer." + (with-dabbrev-test + (find-file (ert-resource-file "INSTALL_BEGIN")) + (switch-to-buffer (get-buffer-create "a" t)) + (execute-kbd-macro (kbd "Indic SPC M-/")) + (should (string=3D (buffer-string) "Indic and")) + (execute-kbd-macro (kbd "SPC M-/")) + (should (string=3D (buffer-string) "Indic and Khmer")) + (kill-buffer "a"))) + +(ert-deftest dabbrev-expand-test-other-buffer-3 () + "Test replacing an expansion with three different buffers. +A prefix string in a buffer should find the first expansion in a +different buffer and then find a replacement expansion is yet another +buffer." + (with-dabbrev-test + (find-file (ert-resource-file "INSTALL_BEGIN")) + (find-file (ert-resource-file "dabbrev-expand.el")) + (switch-to-buffer (get-buffer-create "a" t)) + (emacs-lisp-mode) + (execute-kbd-macro (kbd "Ind M-/")) + (should (string=3D (buffer-string) "Indicate")) + (erase-buffer) + (execute-kbd-macro (kbd "Ind M-/ M-/")) + (should (string=3D (buffer-string) "Indic")) + (execute-kbd-macro (kbd "SPC M-/")) + (should (string=3D (buffer-string) "Indic and")) + (kill-buffer "a"))) + +(ert-deftest dabbrev-expand-test-other-buffer-4 () + "Test expanding a string using another narrowed buffer." + (with-dabbrev-test + (let (disabled-command-function) ; Enable narrow-to-region. + (find-file (ert-resource-file "INSTALL_BEGIN")) + (goto-char (point-min)) + (execute-kbd-macro (kbd "C-s Ind M-a C-SPC M-} C-x n n")) + (switch-to-buffer (get-buffer-create "a" t)) + (execute-kbd-macro (kbd "Ind M-/")) + (should (string=3D (buffer-string) "Indic")) + (execute-kbd-macro (kbd "SPC M-/")) + (should (string=3D (buffer-string) "Indic and")) + (kill-buffer "a")))) + +(ert-deftest dabbrev-expand-test-minibuffer-1 () + "Test expanding a prefix string twice in the minibuffer. +Both expansions should come from the buffer from which the minibuffer +was entered." + (with-dabbrev-test + (find-file (ert-resource-file "INSTALL_BEGIN")) + (with-selected-window (minibuffer-window) + (insert "Ind") + (dabbrev-expand nil) + (should (string=3D (minibuffer-contents) "Indic")) + (insert " ") + (dabbrev-expand nil) + (should (string=3D (minibuffer-contents) "Indic and")) + (delete-minibuffer-contents)))) + +(ert-deftest dabbrev-expand-test-minibuffer-2 () + "Test expanding a string + space in the minibuffer. +The expansions should come from the buffer from which the minibuffer was +entered." + (with-dabbrev-test + (find-file (ert-resource-file "INSTALL_BEGIN")) + (with-selected-window (minibuffer-window) + (insert "Indic ") + (dabbrev-expand nil) + (should (string=3D (minibuffer-contents) "Indic and")) + (insert " ") + (dabbrev-expand nil) + (should (string=3D (buffer-string) "Indic and Khmer")) + (delete-minibuffer-contents)))) + +;; FIXME: Why is dabbrev--reset-global-variables needed here? +(ert-deftest dabbrev-expand-test-minibuffer-3 () + "Test replacing an expansion in the minibuffer using two buffers. +The first expansion should befound in the buffer from which the +minibuffer was entered, the replacement should found in another buffer." + (with-dabbrev-test + (find-file (ert-resource-file "INSTALL_BEGIN")) + (find-file (ert-resource-file "dabbrev-expand.el")) + (with-selected-window (minibuffer-window) + (insert "Ind") + (dabbrev-expand nil) + (should (string=3D (minibuffer-contents) "Indicate")) + (kill-whole-line) + (dabbrev--reset-global-variables) + (insert "Ind") + (dabbrev-expand nil) + (dabbrev-expand nil) + (should (string=3D (minibuffer-contents) "Indic")) + (dabbrev--reset-global-variables) + (insert " ") + (dabbrev-expand nil) + (should (string=3D (minibuffer-contents) "Indic and")) + (delete-minibuffer-contents)))) + +(ert-deftest dabbrev-expand-test-minibuffer-4 () + "Test expansion in the minibuffer using another narrowed buffer." + (with-dabbrev-test + (let (disabled-command-function) ; Enable narrow-to-region. + (find-file (ert-resource-file "INSTALL_BEGIN")) + (goto-char (point-min)) + (execute-kbd-macro (kbd "C-s Ind M-a C-SPC M-} C-x n n"))) + (with-selected-window (minibuffer-window) + (insert "Ind") + (dabbrev-expand nil) + (should (string=3D (minibuffer-contents) "Indic")) + (insert " ") + (dabbrev-expand nil) + (should (string=3D (minibuffer-contents) "Indic and")) + (delete-minibuffer-contents)))) + ;;; dabbrev-tests.el ends here --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 14:18:18 2024 Received: (at 74090) by debbugs.gnu.org; 29 Oct 2024 18:18:18 +0000 Received: from localhost ([127.0.0.1]:57895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5qnK-0005Nx-A1 for submit@debbugs.gnu.org; Tue, 29 Oct 2024 14:18:18 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:50609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5qnI-0005Np-Va for 74090@debbugs.gnu.org; Tue, 29 Oct 2024 14:18:17 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id D98C61BF203; Tue, 29 Oct 2024 18:17:48 +0000 (UTC) From: Juri Linkov To: Stephen Berman Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <878qu6j0tx.fsf@gmx.net> (Stephen Berman via's message of "Tue, 29 Oct 2024 18:06:18 +0100") Organization: LINKOV.NET References: <878qu6j0tx.fsf@gmx.net> Date: Tue, 29 Oct 2024 20:17:18 +0200 Message-ID: <8634ke4vv5.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -1.7 (-) > The attached patch fixes these problems, according to my tests. Maybe your patch also fixes bug#36516 where we failed to find a solution. Or maybe these are separate cases. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 14:58:05 2024 Received: (at 74090) by debbugs.gnu.org; 29 Oct 2024 18:58:05 +0000 Received: from localhost ([127.0.0.1]:58139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5rPo-0006gW-Oo for submit@debbugs.gnu.org; Tue, 29 Oct 2024 14:58:05 -0400 Received: from mout.gmx.net ([212.227.17.21]:40757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5rPl-0006fi-TC for 74090@debbugs.gnu.org; Tue, 29 Oct 2024 14:58:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1730228275; x=1730833075; i=stephen.berman@gmx.net; bh=FsTfkwL3qAy6npp8T8BVL6OSS84bAjzGhnPDQYSNrKI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=Jbn7NQNN7ocSZEcVYesyG/IhuErcnseAUeEBa9cyJQp3BYiZZ2t7y2+exzfJgn1O UA/WirOCjYI9SyEJLtzl25cbEjv6QoC1UTzx2WYYuW6NolVROcGMdgRpt5bV3U364 0sgNdbK3exhkXGrTCM7h6IZmjHlfljYnWCCULgMKJ0YzriGrfBoLTgCVn98Ce1MLp vk8HAlc87wjxyz+SXQEbp0Epjj2687QmfmXeWhNKKhrSLDf3be4997bEixr8Q9VyK ace/PN/HB8VZ+Oxhq7G+I66WIKfl+QzxrBk1u9DMdPy6NELf+r5OkU/MC/+MmgxPG AxOyo4C+LDHBfQ+7hQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.95.149]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MHoNC-1t347A409e-005nkD; Tue, 29 Oct 2024 19:57:55 +0100 From: Stephen Berman To: Juri Linkov Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <8634ke4vv5.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 29 Oct 2024 20:17:18 +0200") References: <878qu6j0tx.fsf@gmx.net> <8634ke4vv5.fsf@mail.linkov.net> Date: Tue, 29 Oct 2024 19:57:54 +0100 Message-ID: <874j4uivnx.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:tmpC+GtDYE8tuQrmoz7ODFMCFVG/qpp13sTJZYArkuhKdgLdTOF sqbUrJIzqZV7a6AMvZqTC0gWedZoOvioLd5QPRcNOYgh3CxaTAt0OUJGyeZncFm9c0E3NaV 3qeWijYUEUdLC+jXLxMocfavKCVfUScH3jnJvlAYRoaxzv74hhE8PPiB+fVYqCM+ERHcYy7 r2wbxP32Y8kuggVw+17LA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:oPuVPex04fo=;Fvjgi0tdwexmrblKtCht4dxuFLd 7UCfYQtLZYaEcjmQL9qm3/r1svoMxZNZckDa34w89V0pGYrkykDrPd4m10skh6zchoZLLoZX7 sS9HgJtxADEaf70eVDM76pMalCYFtirjj3hyI3cu3ARHwYFujR7WvVAMM4bTcJRwkJdM0ryUH 9C6LfSyZwJ+5zQ83qrEp1PhXEjTf0WgkEwfRdH8DsOpRYO93RXO6/f3rMKgzSD7206I6UIAT3 GKBPEL2a+9/739hQ3BlccHiYUqilpyTVWoUMiREnDQEQYhkLYHr80iMh1Oexaa4bTTRfPcS2C tiwpjTWSjUtZyyZeKwlt2WpVLHYd9z7OLCjYp4yA3VDLwkKsyNmcmwG5pjXjfYnPVQYpV0SF/ O2EB8R0XXAVyrCNRNSgXDI9tqiys7aRamJPTI8T4+rfqwMvo1AOwcCqi1T/LsM5NoOxbeYB2W 97N4oncD3O+Suv1x3WSpy2kAvUtvX6YzSi0aJAwz/0PMq58JxjRZ7grhJ2weHRH0ORCVh+XId IPBGfJzj5BA4OojfUWYTMO73yTJIKanYtqfHdhodyU+2WgTDO44asPQm1T8x2t7C8IGPfA8UY ZFh/+GS1cMoxOK2xxag3dstA+iDijXYjnt/Gfz5bhPXSeneiRadAVApz9QjzKp3BgRmlayB2M lxKDELgT9tzNRJAwTg3Dgo4pWDrK/WIgZsMVojfu89pOK60kGRCWz4gtak/Am6r66utVLZ9yI NIHqOsn97/aVrzF6h/ZnQ8VxZeHQOKIy+fgtrWHZUFcVPNQScU+N3xf0NRBSxTPcdoH/43FwS D0yFEsHJYkloeQJ6GV/5CQ9A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -1.7 (-) On Tue, 29 Oct 2024 20:17:18 +0200 Juri Linkov wrote: >> The attached patch fixes these problems, according to my tests. > > Maybe your patch also fixes bug#36516 > where we failed to find a solution. > Or maybe these are separate cases. I was unaware of that bug, thanks for the pointer. But unfortunately, my patch does not fix it. My changes only affect cases where the buffer in which dabbrev-expand is called is different from the buffer where it finds the expected expansion (at least I only tried to fix such cases and not alter the behavior of the same buffer cases). I'll try taking a closer look at this case, but judging by the discussion in that bug thread, it doesn't look related, or easy to fix. But as was noted in that thread, at least you can get the expected expected by repeatedly typing `M-/', while in the cases I tried (hopefully successfully) to fix, without my patch either you cannot get the expected expansion or you get an error, so bug#36516 seems less serious. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 03:36:02 2024 Received: (at 74090) by debbugs.gnu.org; 30 Oct 2024 07:36:03 +0000 Received: from localhost ([127.0.0.1]:33719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t63FK-0006cr-4X for submit@debbugs.gnu.org; Wed, 30 Oct 2024 03:36:02 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:47935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t63FD-0006cL-W6 for 74090@debbugs.gnu.org; Wed, 30 Oct 2024 03:35:56 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 96C71FF803; Wed, 30 Oct 2024 07:35:49 +0000 (UTC) From: Juri Linkov To: Stephen Berman Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <874j4uivnx.fsf@gmx.net> (Stephen Berman's message of "Tue, 29 Oct 2024 19:57:54 +0100") Organization: LINKOV.NET References: <878qu6j0tx.fsf@gmx.net> <8634ke4vv5.fsf@mail.linkov.net> <874j4uivnx.fsf@gmx.net> Date: Wed, 30 Oct 2024 09:32:17 +0200 Message-ID: <86y1262ghq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -1.7 (-) >>> The attached patch fixes these problems, according to my tests. >> >> Maybe your patch also fixes bug#36516 >> where we failed to find a solution. >> Or maybe these are separate cases. > > I was unaware of that bug, thanks for the pointer. But unfortunately, > my patch does not fix it. My changes only affect cases where the buffer > in which dabbrev-expand is called is different from the buffer where it > finds the expected expansion (at least I only tried to fix such cases > and not alter the behavior of the same buffer cases). I'll try taking a > closer look at this case, but judging by the discussion in that bug > thread, it doesn't look related, or easy to fix. But as was noted in > that thread, at least you can get the expected expected by repeatedly > typing `M-/', while in the cases I tried (hopefully successfully) to > fix, without my patch either you cannot get the expected expansion or > you get an error, so bug#36516 seems less serious. Indeed, bug#36516 reports just a logical inconsistency, whereas your patch fixes a plain bug. I've looked at your patch, and everything looks right, and the comprehensive test coverage will ensure no breakages, thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 09:03:29 2024 Received: (at 74090) by debbugs.gnu.org; 30 Oct 2024 13:03:29 +0000 Received: from localhost ([127.0.0.1]:34985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t68MD-0000cG-0Q for submit@debbugs.gnu.org; Wed, 30 Oct 2024 09:03:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t68MB-0000c4-4F for 74090@debbugs.gnu.org; Wed, 30 Oct 2024 09:03:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t68M5-0007wm-AX; Wed, 30 Oct 2024 09:03:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=He0ISJNwis9yi+QGyXbhjylEBno70OvUAJ8KhvJZOfA=; b=pFVJMXliMSV4 IR2ednl3hz+wweVvnd56JdTjIDEi6ryr7HGjrih+IA0F4yr2zJdiYjmk1VxmrtLnXFdZ3RPJdX/+X tr+wmVLF4AFVUSEmKh1YSCx9Ch/ePA660upAEpsMJDIP9164VHebtmFe25TPzBzCzP0eNxvl+FXGW tK6KRxLXPgrs8Qb1pigZXYhsh+djQb4RyiL3BgWuG5xfw9GAEBYFGAhDJqEw24uhYYoG7VXVmeUm+ 4rYSvhYHmsnBgHd/T7oQilO6bwQQlNK7zMGl05nc/6U98lGBS9gj/9sX0Nju6kXipLRsIjsNHNYZc RESNU0dUJWe7avOkqlOOfQ==; Date: Wed, 30 Oct 2024 15:03:17 +0200 Message-Id: <86zfml4uay.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-Reply-To: <878qu6j0tx.fsf@gmx.net> (bug-gnu-emacs@gnu.org) Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand References: <878qu6j0tx.fsf@gmx.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -3.3 (---) > Date: Tue, 29 Oct 2024 18:06:18 +0100 > From: Stephen Berman via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > >From my debugging of these problems, I think they arise because the code > in dabbrev-expand that sets up looking for an expansion (either > directly, or after a space, or as a replacement for the current > expansion) wrongly using positions in the buffer from which > dabbrev-expand was invoked instead of the buffer in which the expansion > is found. The attached patch fixes these problems, according to my > tests. The patch includes comments justifying or at least motivating > the changes. Thanks, feel free to install on the emacs-30 branch. > + ;; Comparing with point only makes sense in the buffer > + ;; where we called dabbrev-exand, but if that differs ^^^^^^^^^^^^^ Typo. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 06:00:32 2024 Received: (at 74090) by debbugs.gnu.org; 31 Oct 2024 10:00:32 +0000 Received: from localhost ([127.0.0.1]:41310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6Ryh-0001kK-Ap for submit@debbugs.gnu.org; Thu, 31 Oct 2024 06:00:32 -0400 Received: from mout.gmx.net ([212.227.15.15]:39529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6Ryb-0001kC-3C for 74090@debbugs.gnu.org; Thu, 31 Oct 2024 06:00:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1730368819; x=1730973619; i=stephen.berman@gmx.net; bh=3NsZi119ooz1f6KQyugkpr+Eu56TG4QtN17RRlw4jDI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=HSItAMtG2Q2UCV93AzrMGt6WimC7z3zacJaOBoBVrkwnpNPlkNI2x1ooCj2OiXHh fTk++RwANbgQ5fAcYFpH+X/BRHT+bFeBJ+Gaetw9l9eqlS6+EnWhs2DfQwPx3B+Ba 8HTlRMdVdAMD7uZ1tTN2xq62DPa1TX6t99RUEg5S23cb3F9x6Q6qBovZYkLwAPnCr 5QeA97E22s8MlmvCSPAyICSQ7VgonIAMOFrG7+CtVMpNRv1+JxP5WaA9oXEIoFgZ/ BTFX6Gz4T8lSR5uvqpx4E7onh4zHmmnxKhoI48lmFo/L6m4aDEiuy3WsG6ZGwl3cA 2RTpOM6vtf+PLjfiGQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.95.122]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M9nxn-1tBeVC00nt-002jUv; Thu, 31 Oct 2024 11:00:19 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <86zfml4uay.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 30 Oct 2024 15:03:17 +0200") References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> Date: Thu, 31 Oct 2024 11:00:17 +0100 Message-ID: <87cyjgwq1a.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:pKh5CPZGTj0JnWmFIzF7TsuEbQS7GN32DWGB2S51gEGYI/nMCWT fGBgTk67ExBkPgE5e6i+waOjtAojRSUBLD24J1pxDbWzTWCt5DzPKGb88Ynqq8wFwpp85d7 39KUMiOT3Pnh99/KRmyrxb7B5KQMUr0BO+Of1/XoYEPebYQQxFSfhPLIGkZ3Zs1eT+jf6ax bWMT87WSIJVdppy7whX6Q== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:/Vx9Z/35hqI=;mPOqsKmpCvoxRjliHLdgntN+MGw ltBiCwaby1CEzNSrJNUVRRB6Z1P7rtNvtisFfkpquaaUziFPNidP/aAhF7WGDwieDTDo4BQ0V 7pNxjXuwyRxowHhz47CS7jVaNx69FRKVzHJDCc8b4nQcjb6pCQ8o3SZNVBDXoO/Ow4Wo1YY/c dziqnUsi2t2FW2PQSZGoUTPA9ox+DrJ/CT+7iH8vrUSne6Lto9PSe+wB8Mo3Yv92bFFa3b6yT mRUnxLd7zrD8Eq1d50XGvbTT/bMVSnvDV99+tHjIsr+RnJ8Z2MGg2bF4oTU0qJ7rf74OF4Rwp 0JyhHahrhP+jDTIb25tLbO204zM3i58QRMU5w9/kxVre4tUuzBV2mMii20cHgq501U4dzOOkY WKEWH2I00gBjzCi0+oGGrqPkeTDWTZH0sbibW0LIamrQVLIf/3SE01arOkgUaMIedODRim2ZC WP+9D9tx/d8r8LW8q4SiMdxhShfh1FnVqICVK9Yu3abho1Ool9MYFn+apdsLzYm9DXZk9THT5 kO/MF3IvBf2K7x0PQ2NYRrH7XoZYGclKAUAVHc8YXQCwGXyA46ByEFmsttwNLguBK+pOURg5e Fp5v3uvVQaXroJRoReexdFcQQMgG2ZsbBqo5/TuGBUJt/X5iZNs4/qs5/nrmmH8b8F1dCMqNf KtdC+K+BXnAGTXqRkT48ZMT5DCIqszn/X8vdYmIu6bt63uyn1VPd05v/Idh7hbnU9mZjYjFDU pcCoXJvBEfWa+zEpyCpWboyJctu/871whmFODlVTl4co+XcPNefAIVqQAeSqX73IuXvYgOR4J 1B0wBPsCdyVpMrebQdTFlPAg== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -1.7 (-) On Wed, 30 Oct 2024 15:03:17 +0200 Eli Zaretskii wrote: >> Date: Tue, 29 Oct 2024 18:06:18 +0100 >> From: Stephen Berman via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> >From my debugging of these problems, I think they arise because the co= de >> in dabbrev-expand that sets up looking for an expansion (either >> directly, or after a space, or as a replacement for the current >> expansion) wrongly using positions in the buffer from which >> dabbrev-expand was invoked instead of the buffer in which the expansion >> is found. The attached patch fixes these problems, according to my >> tests. The patch includes comments justifying or at least motivating >> the changes. > > Thanks, feel free to install on the emacs-30 branch. > >> + ;; Comparing with point only makes sense in the buffe= r >> + ;; where we called dabbrev-exand, but if that differs > ^^^^^^^^^^^^^ > Typo. Thanks, typo corrected and pushed as commit f6c359cb66a -- but to master, I just now noticed that you said emacs-30. I tried reverting but I don't know how. What should I do? Sorry for the snafu. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 06:01:13 2024 Received: (at 74090) by debbugs.gnu.org; 31 Oct 2024 10:01:13 +0000 Received: from localhost ([127.0.0.1]:41317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6RzN-0001lb-6i for submit@debbugs.gnu.org; Thu, 31 Oct 2024 06:01:13 -0400 Received: from mout.gmx.net ([212.227.15.15]:57735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6RzL-0001lT-3k for 74090@debbugs.gnu.org; Thu, 31 Oct 2024 06:01:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1730368865; x=1730973665; i=stephen.berman@gmx.net; bh=2Wucvvi1cPCrgXeA5N71/xwuB8FgP0YyA8IOI47uXDw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=DmTsVev9crdKIX7euONa6Etn0gx1LCCyRvkUoCcvm6E+AWMlHdmDPQt2cnIGJwji ac837PT6qYx2LqgqCZqxsrVX15mQfr7LFsLR9zLMwinAh4DTkNIcScjhIDIjWPrDP BOfx/saejsiez4a1LO9biNuIpOY3oI39nI/SBGlbN3/gPppqof7c/Lg22IWMBkqpH fgLwbs/TztgJR6aU6LPgKLv6asrzUpbfAvBgUIMQwZ65k8vFwxzr00h6eYrN+mOqi x8COJQ/SI0fXit3KDkJ5kKTO67ZuzlNicTBrT7Zhe1dm5ROb+UHEMnRszroZoIW7s drA/YjV/mekDjD85mg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.95.122]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MtfJd-1tznQs0Ut5-00w4PL; Thu, 31 Oct 2024 11:01:05 +0100 From: Stephen Berman To: Juri Linkov Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <86y1262ghq.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 30 Oct 2024 09:32:17 +0200") References: <878qu6j0tx.fsf@gmx.net> <8634ke4vv5.fsf@mail.linkov.net> <874j4uivnx.fsf@gmx.net> <86y1262ghq.fsf@mail.linkov.net> Date: Thu, 31 Oct 2024 11:01:04 +0100 Message-ID: <878qu4wpzz.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:AjMp3Lcbk0oh/4rGlbRiCKVcWtE8dkBJYDaTjFz8MVQt6MJTiQW jQ58jBqxTD8/dzk0wprsf6Bj1AXvt5pG4xvPm8YAQ0UuKgULwgzHa1m1zwuDptR2qTUsSSl 5d5O+P4WqxK2DPxYhpNjfvkvcV9+v9xvkIdDr9pWrqdsz5rp+uicS3+iUKkaiNIqG5n3DoG /pSY3ZA8piTOWWoqOZqOg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:IsS/mVXOCt0=;h73jzobkfEnJlVds1EmudPOSAoY LIsJCNVIuy6iJWxKJPQSHy0f3BRqsSziZrpivGNQhLA/bUuHYfceaVoRKcL8uj3dy4FxB0gfc 7afk50GLBU5ki39MVY5I5FC3UcR9XMiqUI9KHLUAXLZ+3Bgj4/8SJR99gpVW7YvDB1cDWVOQz YWmmysRCPZADi99tlByCrFHiB47E5SWJ4ZcNlx9SgBP28e7BnaK+KYjpIWPKmX+z68JrxA8Bl t66QwLoTaTI4XJRBkut2SEFzDLyHQtQm3XpijqfTb7HG6HJJPW1dlPu7ssA0AA7JFxZ0uDpzt TCPQPOCjIJZw+rJccOHhJcYWHvH9IUsDTasdY60CsBiSJBy0HQCJk4m0DPJbRv2L9euwn/ATL eSidKhReCVlBZ9zpM9EjhB12lBYz5GApjIzRfY10ORT/PfNblWoH5MjY9lWN/XvmPAu7uHRI2 TtLM3FfI+9BzO/GjO+UO+jHhnuWgCdIqb0mgDGPh7ztdXiRei10fWErVAXbM7LC9L+ycPuCHn lsDCmtdpgGKqDUdeq18HZageIsLPDaRw4Vh5Gvw6+SN9E6FEzFS7hYLrSLxJ4JMbEJEHp+o7l +MU8hUHJLv1Z1wMhXtWT4Ecj6tMyT0cIVLK9Au3v2nqV7HwieV6hF/dCxeVdgiVeBdc5cNyhB YQLRiAnxjZO1awPS1Sh27MA2ihy+624/gfja5bRpXJF795uQ+eHQI3uMKNiUnTs4CgURVluxb +/vYpYUFXcXHIUHm64MAkRQwASUduRmPDonmthpQnu6WWOsZnnV79m/JfzEt4BiE2RyZf0uMe 1Uy+4rpTnwLeNgNmYa/lt5vQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -1.7 (-) On Wed, 30 Oct 2024 09:32:17 +0200 Juri Linkov wrote: >>>> The attached patch fixes these problems, according to my tests. >>> >>> Maybe your patch also fixes bug#36516 >>> where we failed to find a solution. >>> Or maybe these are separate cases. >> >> I was unaware of that bug, thanks for the pointer. But unfortunately, >> my patch does not fix it. My changes only affect cases where the buffer >> in which dabbrev-expand is called is different from the buffer where it >> finds the expected expansion (at least I only tried to fix such cases >> and not alter the behavior of the same buffer cases). I'll try taking a >> closer look at this case, but judging by the discussion in that bug >> thread, it doesn't look related, or easy to fix. But as was noted in >> that thread, at least you can get the expected expected by repeatedly >> typing `M-/', while in the cases I tried (hopefully successfully) to >> fix, without my patch either you cannot get the expected expansion or >> you get an error, so bug#36516 seems less serious. > > Indeed, bug#36516 reports just a logical inconsistency, > whereas your patch fixes a plain bug. I've looked at your patch, > and everything looks right, and the comprehensive test coverage > will ensure no breakages, thanks. Thanks for the review! Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 06:09:13 2024 Received: (at 74090) by debbugs.gnu.org; 31 Oct 2024 10:09:13 +0000 Received: from localhost ([127.0.0.1]:41372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6S77-00020a-H4 for submit@debbugs.gnu.org; Thu, 31 Oct 2024 06:09:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6S75-00020R-BO for 74090@debbugs.gnu.org; Thu, 31 Oct 2024 06:09:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6S6z-00041n-N5; Thu, 31 Oct 2024 06:09:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5e+M1OmelZPWxeWLGTmvl7oDKCLC048MTGsEjJ7I+fE=; b=NNAG6Me2sKoA nhKPrhvAfYxHDC4tWEJ7JQ5RgCfUjW89gU/geuXYPDXTwdhjVlFDwfuv4raB5iBQ5DGXsAlCLbpUB kcfG3kJxle7r/lJiqHrXSszEYIbXaJnmuYNQnSiuypKxM41HJsBN0mlztyetUyKJM9zGd1QJXKsSA Yxrh9Zqc5gdAHGYiBrVHW83mU2FebgzW3djwD82zd1Ou4vGDHf1yfLLPtpJxjJnhm42w4w29vpFGW 9oHVeTHoaRtZl/aESdnIPuO7IpsJYDgg6loHdSWOeWo0pHnt3HfxJvxCj7UBTXRMHw8o6VhPHv0h4 9vsDRQQ5fHYH5KVa0ElvMg==; Date: Thu, 31 Oct 2024 12:09:04 +0200 Message-Id: <86plng37pb.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-Reply-To: <87cyjgwq1a.fsf@gmx.net> (message from Stephen Berman on Thu, 31 Oct 2024 11:00:17 +0100) Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -3.3 (---) > From: Stephen Berman > Cc: 74090@debbugs.gnu.org > Date: Thu, 31 Oct 2024 11:00:17 +0100 > > > Thanks, feel free to install on the emacs-30 branch. > > > >> + ;; Comparing with point only makes sense in the buffer > >> + ;; where we called dabbrev-exand, but if that differs > > ^^^^^^^^^^^^^ > > Typo. > > Thanks, typo corrected and pushed as commit f6c359cb66a -- but to > master, I just now noticed that you said emacs-30. I tried reverting > but I don't know how. What should I do? Sorry for the snafu. Instead of reverting, simply cherry-pick it to emacs-30. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 06:20:46 2024 Received: (at 74090) by debbugs.gnu.org; 31 Oct 2024 10:20:46 +0000 Received: from localhost ([127.0.0.1]:41442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6SII-0002VR-Dh for submit@debbugs.gnu.org; Thu, 31 Oct 2024 06:20:46 -0400 Received: from mout.gmx.net ([212.227.17.22]:51035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6SIF-0002VJ-U0 for 74090@debbugs.gnu.org; Thu, 31 Oct 2024 06:20:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1730370033; x=1730974833; i=stephen.berman@gmx.net; bh=ZNN7oUyecO4w+t5scqFBUun+BMZsnbiLGfr2D2QSVDY=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=HTKQdQGsZXSZnp3AxQwN7MV1E92gcrdCQKynxECRYZhd5QQexha29l4/eBk3xxQm UlRVak3ID9BykJSZ+K3qE1FzYpFv23GWJLrEGMmq9vPCzetKdxgL989p5qurK3b0a gfqXkXR+cVQQ7xLP0o8lYDqq++5azuh8OfDm/YbgPPVKRIsvmmX3vh8w0n14GAhH1 exK68IVAt8Jm0yR1xyp3MNuSMPCD82CMnQBLVg7sN4w9mRMci0hzdDugOVjoMLFRl r1/QjrQ/z/FR1xeDmU2ZAo0eBAFxOubyMV5NnvYaeIpbT4NLXWGwMjNRXEr0ac5DJ xxlhEjVcATiKvHK0tQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.95.122]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MTRMi-1tIW1V2Rno-00LnMh; Thu, 31 Oct 2024 11:20:33 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <86plng37pb.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 31 Oct 2024 12:09:04 +0200") References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <86plng37pb.fsf@gnu.org> Date: Thu, 31 Oct 2024 11:20:30 +0100 Message-ID: <87zfmkvaj5.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:wYbK1XxOYqmbzkcjQ/T3Yn0tg269nZkTrpQqNkK81l6UXcMuTOW A7KQgvFxb1j1/Ab2RoFg2zPzxXq7nsoYtsXxklr+0Yqinr1/dsPKvrgrzI0Xe94zZA1xlB3 C5C1KA+ENsuAi+f5sUsGarlHDjLYmqeul96R0VtF5eok346R4PmeWqGN9VgEGbac5lGai3R sfXZqfz6ox+rVXwwLb+bg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:9BHDWL4RvFY=;6WMKPM7c/I00awsHWWxQcUO2cLX vAeY7LdSEgi41pRa7Fn2SDjcnt8bvedMhy4+j0Yic28CwiRWE7xQjNfMt0/DULGXuxrd6tl3J nQmBQEEPEYFCTybo6x5b9ohI4SUgjIZHYWw05eQdOP4+vv89RlxZgf/WMWhXxwSHBen3dkfz5 seQpFeauCuOcbgIVMgFbvXH1Y6T3qPOZ9ikPJBixUB1p8iaOsAVTDt7v/DTbxZD51lcNhoY7e 84pfSbhQZ7xqIrsMOl9OGf9/h99oqmPMQ/D3Osy7+6s6J8q8Cei4zmL+I29t3r0FDPo5VNWnX Prhrpy6rnhHzhHcqwo/s47KE2uMEMdO/JAbh4WLKv9xn6VYEtXhkq6toBFoMPEIQQQdjxcdG6 DkFi2T5wP9Lpm6br23Q5x2Zv8jKV8ouWBJxHCwR6Nllv2N5EbF2bgszmamqrqUSSP08MO9v/B xrcGAGAWVnTtwZiBL9uNv1PUSSFsSQOdSLFquiylLtjlXrj+jmeOEc5BILrb3y6YkHExq8oUg AQsnFm1OBRGpyb2nFPuJyHU1afoBB8hcuoW5MzoFK0528sSck1J3QduAX3q8A+JYOSc8KwYhE EklEyJzKBaAOfI6kqGKU0Ut2K5D3/6SA5rtKHG+k6dJJLjdiPif2tL/zoBQgfGlLHxS5Vf1i/ OmBOcU3CWE6D5LYXN8VHoOH7u/EEXpmdbFlzq7s6CW7n5DaDsF+aWYWftotOXzr/xgCs9aeQQ f53ou9PRjLbEPMTUtKQTr1iehdUwevC8d6jXttWw7hKJx20VzurMAwK8g8jf+L0Is6tTrpKMM QaJ4Xvj+n5T7nCUjOIwCO4eJbLM1ELFVGapAcKF4FsK8o= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -1.7 (-) On Thu, 31 Oct 2024 12:09:04 +0200 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: 74090@debbugs.gnu.org >> Date: Thu, 31 Oct 2024 11:00:17 +0100 >> >> > Thanks, feel free to install on the emacs-30 branch. >> > >> >> + ;; Comparing with point only makes sense in the bu= ffer >> >> + ;; where we called dabbrev-exand, but if that diff= ers >> > ^^^^^^^^^^^^^ >> > Typo. >> >> Thanks, typo corrected and pushed as commit f6c359cb66a -- but to >> master, I just now noticed that you said emacs-30. I tried reverting >> but I don't know how. What should I do? Sorry for the snafu. > > Instead of reverting, simply cherry-pick it to emacs-30. I don't want to screw up again; do I enter exactly the following in the shell (from the emacs-30 directory)? git cherry-pick master Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 06:39:17 2024 Received: (at 74090) by debbugs.gnu.org; 31 Oct 2024 10:39:17 +0000 Received: from localhost ([127.0.0.1]:41588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6SaD-00039h-8F for submit@debbugs.gnu.org; Thu, 31 Oct 2024 06:39:17 -0400 Received: from mout.gmx.net ([212.227.17.22]:47535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6SaA-00039M-Ew for 74090@debbugs.gnu.org; Thu, 31 Oct 2024 06:39:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1730371148; x=1730975948; i=stephen.berman@gmx.net; bh=NUo1L5wP31+IsvWh3V7ge4r7NN/XWmjMl9eqP+0JjgA=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=UrooVc99Ze4hNI09LdFger1IylA+4YdoQBUs68/MkamwCBcdj9idj90eeSwhIe0x TI9s0uPipamFWogoXWxwB/0v5DowCKWNpRMOoSHSfMDxqaWvpNYPOvZN5OrbYSro4 MCrwRZF2wd43YGW8k/z00N/Et0J4Nab5dKaGlt2TOPMNoVKLA4ZjxPBUADswgEi+M KVfFRaXgdCA/WK5TyTn/uZOxE5rtdmFKjlYJdGkLJ3wTp4XJHgkxMWL95/ECvGBkx apA8sgqxplmOU5Xqdi4PHtNvmVxdWgYepFCji1v5vu1/534yf3JMHetywHoZk1+ce X0nw23A0ZKDSVIvWHA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.95.122]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M3DNt-1t9TNp2eIX-00CgRQ; Thu, 31 Oct 2024 11:39:08 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <87zfmkvaj5.fsf@gmx.net> (Stephen Berman's message of "Thu, 31 Oct 2024 11:20:30 +0100") References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <86plng37pb.fsf@gnu.org> <87zfmkvaj5.fsf@gmx.net> Date: Thu, 31 Oct 2024 11:39:08 +0100 Message-ID: <87v7x8v9o3.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:WTK9o8YUsBSizMYr7BI2bfi2vZtN0TvfDSbrPtF5yZyYL5B9rse k+r4QfbiVoeBnlK+uMAEZR71+nhVOAWl3PTNy7CR8RfLAkZ/4CGYb/BgLiH/h4jtd+2qyzU WFSgzhctRIvq1kr1LXiz6vHB9MSbuR7E7A7bfTa7QjUkWcuy17FLw86uexKslyHVecQ6IXS Jo56dcPhyTIskhiiAJItg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:1yDb9BayJjU=;sxEC1jn0Q5gcC2c1R79KPl2bRxE vO26lkXxwl9IC35XRCF82qsmc6wOTmES4vWPhap0qDT02abxlmt3FUxHt/DXuc534nuCIGj1B LZ6PAU62KKLgubgxFesUswh6nMLSLmI8nJFntTxjCd9DOvV52lzk3jzRlXMJEjHGQBroQnj50 TyWfqtzzLM9RCD0G8YeYfsFQFHptNUFINQva9oFToXceYDT39FZkyDWD2CzmmEQ3GhOxUcaUu /33Y/COrmD3mtvihKx4jH7bgFXlChSq9db4mMHgLHHa04nhCm7l+ZS3cZT3yohgCzeVQWlr6o caiwykMbMcZtdZEOwjzhZ+dFDHDjJ8ziWE4798XBv/iTOxWv/yIb9ksr4Ff3wtVpCIIk/4QHf ofK52OvQ0LDtppbDp4sLfo1Y5bayUdP1GaDshRRKG32rG5dfx83Eer7Ktk5Dl2qxh5X9txBwr cKuYXMmZW2Oyx3dPWfQmSp2kEIxvTJz0TjEfTBQ+Zcplnom5EEXSuW3tw1QWEZPvos4+5TtnM 0f8eRO2N2LuF0wA3NUKdYguhYcHtMDnGIskVFd7JyCB5BHrydXPA1YxOt+4++55VzbroM8IzK XLS44iD23cK+JgYIBR3Jxm/6I2QEKo1O6ebbmNTaKF2G/2aXgAhVLp+3hgGLzqYJQc87Yl1TV Q2UVgiBn8TZ0QMqZu6N4CtCh8eAmWjRBUCUloMjKzNFUcYWWdvtCPpPeyJGBu3ld9uc+2m9XV K03vaaszDgFn/C1Yhx7HZhmgmvZt8dA9cMvxJT/+Rftxq70fW9ChtSxPrWengkOPefWX+EYs7 SdmPYdPY0l29pcBITr/2MStQ== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -1.7 (-) On Thu, 31 Oct 2024 11:20:30 +0100 Stephen Berman = wrote: > On Thu, 31 Oct 2024 12:09:04 +0200 Eli Zaretskii wrote: > >>> From: Stephen Berman >>> Cc: 74090@debbugs.gnu.org >>> Date: Thu, 31 Oct 2024 11:00:17 +0100 >>> >>> > Thanks, feel free to install on the emacs-30 branch. >>> > >>> >> + ;; Comparing with point only makes sense in the b= uffer >>> >> + ;; where we called dabbrev-exand, but if that dif= fers >>> > ^^^^^^^^^^^^^ >>> > Typo. >>> >>> Thanks, typo corrected and pushed as commit f6c359cb66a -- but to >>> master, I just now noticed that you said emacs-30. I tried reverting >>> but I don't know how. What should I do? Sorry for the snafu. >> >> Instead of reverting, simply cherry-pick it to emacs-30. > > I don't want to screw up again; do I enter exactly the following in the > shell (from the emacs-30 directory)? > > git cherry-pick master My commit to master is no longer the most recent, so should I use this instead? git cherry-pick master f6c359cb66a I looked at the git-cherry-pick man page but it's not clear to me. I almost exclusively use VC. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 06:48:00 2024 Received: (at 74090) by debbugs.gnu.org; 31 Oct 2024 10:48:00 +0000 Received: from localhost ([127.0.0.1]:41605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6Sid-0003UA-S3 for submit@debbugs.gnu.org; Thu, 31 Oct 2024 06:48:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6Sic-0003U0-8b for 74090@debbugs.gnu.org; Thu, 31 Oct 2024 06:47:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6SiW-0000KQ-IB; Thu, 31 Oct 2024 06:47:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=uqn2zvwsbDywy0So84yRbewXciHeLYRICrqHvbWaZGY=; b=A+GTCqAYXLJr Ddaqo0f2H8CRAPDS2Q+Rm14yDCDQbiRWVMmCFFz6d9taunwXTvM0bjFeqbjW9OA2ldA9D+EvekOuQ 8OkPluSP2PEiXDy4RS7kOVAoY+cx7G8xAeCSSiqPg+9TG0dCQbW9UieZ8cH0xfbo4lo2E+XsxcDyr BMBkQoPClH9tISG4ngxZXoJiU9pfVHBGKstsCKxpkKenxpaU+nIc0w8Z2xNF78ISnKoq91jkXu21D 2tffVUX9fuh1gua4epvDSLVZ0jt/gsfGnmfzzALAau9UT/SBbMjynQO6p7kSRJbFouSW15+9+wa3D RhPV5Hj/FfFU1AFR9p9h5Q==; Date: Thu, 31 Oct 2024 12:47:49 +0200 Message-Id: <86jzdo35wq.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-Reply-To: <87v7x8v9o3.fsf@gmx.net> (message from Stephen Berman on Thu, 31 Oct 2024 11:39:08 +0100) Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <86plng37pb.fsf@gnu.org> <87zfmkvaj5.fsf@gmx.net> <87v7x8v9o3.fsf@gmx.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74090 Cc: 74090@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: -3.3 (---) > From: Stephen Berman > Cc: 74090@debbugs.gnu.org > Date: Thu, 31 Oct 2024 11:39:08 +0100 > > On Thu, 31 Oct 2024 11:20:30 +0100 Stephen Berman wrote: > > > On Thu, 31 Oct 2024 12:09:04 +0200 Eli Zaretskii wrote: > > > >>> From: Stephen Berman > >>> Cc: 74090@debbugs.gnu.org > >>> Date: Thu, 31 Oct 2024 11:00:17 +0100 > >>> > >>> > Thanks, feel free to install on the emacs-30 branch. > >>> > > >>> >> + ;; Comparing with point only makes sense in the buffer > >>> >> + ;; where we called dabbrev-exand, but if that differs > >>> > ^^^^^^^^^^^^^ > >>> > Typo. > >>> > >>> Thanks, typo corrected and pushed as commit f6c359cb66a -- but to > >>> master, I just now noticed that you said emacs-30. I tried reverting > >>> but I don't know how. What should I do? Sorry for the snafu. > >> > >> Instead of reverting, simply cherry-pick it to emacs-30. > > > > I don't want to screw up again; do I enter exactly the following in the > > shell (from the emacs-30 directory)? > > > > git cherry-pick master > > My commit to master is no longer the most recent, so should I use this > instead? > > git cherry-pick master f6c359cb66a Just make sure emacs-30 is the current branch, and then type $ git cherry-pick -x f6c359cb66a Then "git show" to eyeball the change, and "git push" to push upstream. You cannot screw up as long as you examine the changes before you push after cherry-picking, because any the problems, such as they are, are only present in your local clone, and you can always undo with $ git reset --hard HEAD^ Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 07:17:18 2024 Received: (at 74090-done) by debbugs.gnu.org; 31 Oct 2024 11:17:18 +0000 Received: from localhost ([127.0.0.1]:41699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6TAz-0004Yp-PP for submit@debbugs.gnu.org; Thu, 31 Oct 2024 07:17:18 -0400 Received: from mout.gmx.net ([212.227.15.18]:36595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6TAx-0004Yh-9Q for 74090-done@debbugs.gnu.org; Thu, 31 Oct 2024 07:17:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1730373429; x=1730978229; i=stephen.berman@gmx.net; bh=dtPlhQoiz9sokcjMvwdKvY6ZZdHJTHErLF80VxcdUxY=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=ijUevzQpciV0GDGkjxf+c9c8/s4rXPPmiAWVLyBpGIblDbwnqJuf1qk0onoTgmaB /YV9hNxIYrg2Q3k0BVr0undQ1q5rlmHzk+js0gcv0mWACSAZeN2EJ+tgdCmcrUNyh 7+9yUV2YAHC3Fqw8IMBwbSM1N/D6MD+eG6iResn/Sdr/qLrYZdbY1Up+nMKwm+JqA IsDTKUlEIHKuasEhrQyHmGv/mAjxPkEAgL8Oj8TReTtmWgyDrcJrT91qP6Au1vQkh ZkZrE1DZ4E0L7+ONMdbAMXgYw88SPYrG9rr6Flr39UYcD1nnhq9cjkHMYjbdzX6nL vH8nBzCFrSTwkpfD5A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.95.122]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MybKp-1u4mSW0UMH-00tEkd; Thu, 31 Oct 2024 12:17:09 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <86jzdo35wq.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 31 Oct 2024 12:47:49 +0200") References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <86plng37pb.fsf@gnu.org> <87zfmkvaj5.fsf@gmx.net> <87v7x8v9o3.fsf@gmx.net> <86jzdo35wq.fsf@gnu.org> Date: Thu, 31 Oct 2024 12:17:06 +0100 Message-ID: <87o730v7wt.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:n7Ey4MmJEdYICo6z7nZbs3lZuP4F8hGccPXMN3XGDGJX1mfH2bZ OCsDCMGScvP1mqfkO24am3hmygWFpPZeM7s/bgilpV+I9Hst8ki56y3xmdwslzeNSS1qgKP KS0+i+PANBcmzQUxl95ZE6098+MSGRGvRU/6qoFN0U2qfB5HxYs1S0Fz+4hpgXX38dJcZMx 0w/WLW43/t6xVxztM4z/w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:yNphnPkhHUs=;OWNYe4iCie6qfU/Dtsh+fDZxEr8 p7iW0TFCC3fB4rB06gfpqVF6gsPCMTOwWO8jkRvOxO8AYHGECjECPjmORHWyVyqu90E6in9aJ R5oy1NSt5NUl49GVazbpbc8mj3f7PfzQG9CHIyERFltboteO9nVvU2tMoe11fznbqHLNygcNZ bBm1c0v3dQzMdVICai41sa26Vm99EOubIG8ebVXbe7SyH4HEU5XW89oQGfR8oBEmVa3TSsvSB LFR4tOjfopmei9g1qB6HRPEYStx4xlGDLGCUQCVCuNh/AGl813UTVZANvt7tw1adGpSNsh22W zgJfQJ31mZPUUe5Pmdz4+ENfDRdXUck1KNF9S/PVmZTK+Zg5eApGV7fYOpPQSf4ss0UiFH7OY bhglgjuxct8tuviocKzyyEJdH1pW0qyU+0pRrCMouvujP6KZjmZDdgk/KpOrC2GBB2MhlRmVE 5Dc8qynrEcHBt5LjGpSlZX3KmDLmiPpnc+DpBeLfQ/hCsDSaiSzwKpu1rgocLgL/MVfmpO6G4 ly+SImibCo8X7ecirIBAa1YXgsmhpqAfnKlxnSvQADkLWrbzU6jwwhihr5w69SZCoeu6zFKkw rqfZCfUDxD3Qa56Wbow6PlorCKTawacw8iZmO87YYcBOfDVeWL4Vkr+CN9M9ovAfWJzxaSq5B CQi+3VtCvtc6nc6Oi2qGBC2mYBHjV25eU/esKmYp+TuYEsJJaeXvx4l37VjJVMvMx6flUAKkP WxHtuDYjOppBcXej/ZTIp8wbcGDiPsYmj+pImy9JK/WPmJuYJNG2BXzROIxsCduCSHFHRSt3i lEC7mEY745n8x03gBtgRrAgA== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090-done Cc: 74090-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: -1.7 (-) On Thu, 31 Oct 2024 12:47:49 +0200 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: 74090@debbugs.gnu.org >> Date: Thu, 31 Oct 2024 11:39:08 +0100 >> >> On Thu, 31 Oct 2024 11:20:30 +0100 Stephen Berman wrote: >> >> > On Thu, 31 Oct 2024 12:09:04 +0200 Eli Zaretskii wrote= : >> > >> >>> From: Stephen Berman >> >>> Cc: 74090@debbugs.gnu.org >> >>> Date: Thu, 31 Oct 2024 11:00:17 +0100 >> >>> >> >>> > Thanks, feel free to install on the emacs-30 branch. >> >>> > >> >>> >> + ;; Comparing with point only makes sense in th= e buffer >> >>> >> + ;; where we called dabbrev-exand, but if that = differs >> >>> > ^^^^^^^^^^^^^ >> >>> > Typo. >> >>> >> >>> Thanks, typo corrected and pushed as commit f6c359cb66a -- but to >> >>> master, I just now noticed that you said emacs-30. I tried reverti= ng >> >>> but I don't know how. What should I do? Sorry for the snafu. >> >> >> >> Instead of reverting, simply cherry-pick it to emacs-30. >> > >> > I don't want to screw up again; do I enter exactly the following in t= he >> > shell (from the emacs-30 directory)? >> > >> > git cherry-pick master >> >> My commit to master is no longer the most recent, so should I use this >> instead? >> >> git cherry-pick master f6c359cb66a > > Just make sure emacs-30 is the current branch, and then type > > $ git cherry-pick -x f6c359cb66a > > Then "git show" to eyeball the change, and "git push" to push > upstream. Thanks, that worked. And with that I'm closing the bug. Steve Berman From unknown Mon Aug 18 09:02:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 28 Nov 2024 12:24:13 +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 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 29 02:24:29 2024 Received: (at control) by debbugs.gnu.org; 29 Nov 2024 07:24:29 +0000 Received: from localhost ([127.0.0.1]:40743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGvMY-0007Kk-Ut for submit@debbugs.gnu.org; Fri, 29 Nov 2024 02:24:29 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:53169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGvMX-0007KL-1y; Fri, 29 Nov 2024 02:24:25 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7AF971C0007; Fri, 29 Nov 2024 07:24:16 +0000 (UTC) From: Juri Linkov To: Stephen Berman Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <87cyjgwq1a.fsf@gmx.net> (Stephen Berman's message of "Thu, 31 Oct 2024 11:00:17 +0100") Organization: LINKOV.NET References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> Date: Fri, 29 Nov 2024 09:14:33 +0200 Message-ID: <87ttbq7eie.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control Cc: Eli Zaretskii , 74090@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: -1.7 (-) unarchive 74090 thanks >> Thanks, feel free to install on the emacs-30 branch. > > Thanks, typo corrected and pushed as commit f6c359cb66a I don't remember seeing such backtrace before this change. But now occasionally an error is raised on typing 'M-/': Debugger entered--Lisp error: (error "Selecting deleted buffer") set-buffer(#) (save-current-buffer (set-buffer buf) (if (and (or (eq (current-buffer) dabbrev--last-buffer) ... dabbrev-expand(nil) funcall-interactively(dabbrev-expand nil) command-execute(dabbrev-expand) because can't set the killed buffer 'buf' here: (with-current-buffer buf (if (and (or (eq (current-buffer) dabbrev--last-buffer) (null dabbrev--last-buffer) (buffer-live-p dabbrev--last-buffer)) (numberp dabbrev--last-expansion-location) (and (> dabbrev--last-expansion-location (point)))) (setq dabbrev--last-expansion-location (copy-marker dabbrev--last-expansion-location)))) It's difficult to debug because the buffer is already killed at this point. But looking at the logic of backtrace, here is a reproducible test case: 0. emacs-29 -Q 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-/ From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 29 02:54:57 2024 Received: (at 74090) by debbugs.gnu.org; 29 Nov 2024 07:54:57 +0000 Received: from localhost ([127.0.0.1]:40798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGvq4-0000Qj-VA for submit@debbugs.gnu.org; Fri, 29 Nov 2024 02:54:57 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGvq3-0000QI-86 for 74090@debbugs.gnu.org; Fri, 29 Nov 2024 02:54:55 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id B904CE0006; Fri, 29 Nov 2024 07:54:28 +0000 (UTC) From: Juri Linkov To: Stephen Berman Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <87ttbq7eie.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 29 Nov 2024 08:14:33 +0200") Organization: LINKOV.NET References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <87ttbq7eie.fsf@mail.linkov.net> Date: Fri, 29 Nov 2024 09:51:57 +0200 Message-ID: <87h67q4gv6.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: Eli Zaretskii , 74090@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: -1.7 (-) > I don't remember seeing such backtrace before this change. > But now occasionally an error is raised on typing 'M-/': > > Debugger entered--Lisp error: (error "Selecting deleted buffer") > set-buffer(#) > (save-current-buffer (set-buffer buf) (if (and (or (eq (current-buffer) dabbrev--last-buffer) ... > dabbrev-expand(nil) > funcall-interactively(dabbrev-expand nil) > command-execute(dabbrev-expand) > > because can't set the killed buffer 'buf' here: > > (with-current-buffer buf > (if (and (or (eq (current-buffer) dabbrev--last-buffer) > (null dabbrev--last-buffer) > (buffer-live-p dabbrev--last-buffer)) > (numberp dabbrev--last-expansion-location) > (and (> dabbrev--last-expansion-location (point)))) > (setq dabbrev--last-expansion-location > (copy-marker dabbrev--last-expansion-location)))) > > It's difficult to debug because the buffer is already killed at this point. > But looking at the logic of backtrace, here is a reproducible test case: > > 0. emacs-29 -Q > 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 29 10:38:58 2024 Received: (at 74090) by debbugs.gnu.org; 29 Nov 2024 15:38:58 +0000 Received: from localhost ([127.0.0.1]:44074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tH357-0007Et-Vk for submit@debbugs.gnu.org; Fri, 29 Nov 2024 10:38:58 -0500 Received: from mout.gmx.net ([212.227.17.22]:40149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tH356-0007Ea-E0 for 74090@debbugs.gnu.org; Fri, 29 Nov 2024 10:38:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1732894726; x=1733499526; i=stephen.berman@gmx.net; bh=vOXf1IYGhDBbmHpjmwK1DjZZx19F8BhxIKTUXOuReE4=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=e7PW4FrQfGg5DFjro7q7d1bo+Fq3b7fDPjtcg/24B1UVFdtoBoOqRq7OWoX38qZS Eck5OY0U233kROw8Tl8frArYf01eJcTuIHZBJ7eaBB3ltpm35shGBLp2um9qjAu9F MXRWM5YCf499QSBjaQ6+dACTl3GHQnpxEMoiUfS+F2H5zwVnuDoE/u9p1DAWnoFYs EOxDoPZZnxxHNT3LXiV0SeuuUBnwSF/DhdJuXcbLOcrD6gaiiOMemtTs5jdVjvM4E iBMhr6C6nIesT8dIRqX4pnOBjvLxL+56VNebn9J2xEb5JBulxwqMrFCljft4UZ7Nw fvnUrBSc506Qehqt8g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([88.130.49.222]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MFKGP-1tRlXD1mQr-00GVeg; Fri, 29 Nov 2024 16:38:46 +0100 From: Stephen Berman To: Juri Linkov Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <87h67q4gv6.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 29 Nov 2024 09:51:57 +0200") References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <87ttbq7eie.fsf@mail.linkov.net> <87h67q4gv6.fsf@mail.linkov.net> Date: Fri, 29 Nov 2024 16:38:43 +0100 Message-ID: <87wmgm6oe4.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:9/F8v02K2yMzn1WxT3sCPT/DNmG7rJCszmDT3s5htwhnYR3vbXc QqY5Ad8AfHXk1N1gTKfBAPrDpkYGLFr7EYbwst0LFBkfEIc1HJNHtZdkYy0sEb2SArfRj4t SZ70+JWV18rrwFIfjZK4r0T9d6Tu2Nma2ihKoOnlnciouPD1QZbLOpGbsDeNhk5H7l4bHey /Ldo4naUQtr9ubw9413WQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:sPhb5jyMwe8=;eSfjUSBIPuEZOW14ZmeIJscaPRJ IJGqzXIm8WU1hRaYk2LkFdCKZXCXsw7PFSBrvtGba0q5qaJipq/6J18r/JrihVspcoSg/I0DG VSihKT5Ew77iWCx42MfXXtDjGxxl+5wtQ15a80+5UxHGWzknT4oqvC3zq1emU5Z3rW6qopXrd ySpzZ/Xjgst4KLxmqe1Vg9+gamWM3KDuEh63wIDMlDJknnDlae/Tu4L2d3grsl4GR4+TBt1iF x6hNFXp5+rCGndRbgKyX5bWgkfmYvPRfmORtRS2syMjEVIleZ02qY3T1JBYFlSwBSAoAhFrFw 8gThee/SCHRQ0ClFLXr/Y7bNZ9tCLTBYjpSaLj1omwp7PFOQhLB7tIurjII84qfE7AQ10cKpi l5dpLuJGyn+tL5uBv9hKuPfzNgJHvxRwuLkkRF6eZTJsXOWeJ8zq/6Den33Ws9xr+nRy5jhR5 ChQRnDAVNDlBR1UlrZGoZMVUuz8TINy6qAnFV7lYZYWyqnqe4le7Cwoq/mlg4GcIxTpM0NIA7 4p38L3+Fwa0gRlV7wn+vATGxATPFLYvQWS5rqB+Cx4GnnSPaIX8O23sOPoehPmPa8bvuJqgkg S6I4odP5z8ZpogkH4tUMNSKNYikjrZiroGtqcU7WBum98qgCSPPauolIzBt5PTXlmgXWvJV2g 5oDDvXrmvrwq2PMMquHpGef5TADyq6J/oZA7W5Lt66lsZH3vj+1ZdcgW5MW6aREPAi9LeacQR JHx/zAk5oE5zz32TcngprBntiNnI50a3r9pZJaH45RmU5Sw+KWBOmGGPApNDTZF0aaRzmVMyb 41mGcHafzfCQ4EFR/SH2sc89rEM6LgAyi9r7oEv5g2L0TtVlclc2RRL3z9aS203P92rcUmBbQ IQkYykFfLWnDLVo405M2t4jAd8MO5zY6UTU5ebnan11i50E0O76PcFtY4Iu6S+cEBq6hafWVg /epETgkcayYrsTUe8Fa5527vezxJdx2KQVchSg9rBx0HW3+BZ82NSqg9aHdAk/zaCHAWri0Y+ U/RRncepn9IwWr/BuuXx/4eVq8V/IHQOs04j3lUJNZ3c66XdJ4FDraKmdm1GsQNwyCwXvBZsD hzY3OiK1MuIGgQooVE1Z4mZuWn+4m/ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: Eli Zaretskii , 74090@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: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, 29 Nov 2024 09:51:57 +0200 Juri Linkov wrote: >> I don't remember seeing such backtrace before this change. >> But now occasionally an error is raised on typing 'M-/': >> >> Debugger entered--Lisp error: (error "Selecting deleted buffer") >> set-buffer(#) >> (save-current-buffer (set-buffer buf) (if (and (or (eq (current-buffer= ) dabbrev--last-buffer) ... >> dabbrev-expand(nil) >> funcall-interactively(dabbrev-expand nil) >> command-execute(dabbrev-expand) >> >> because can't set the killed buffer 'buf' here: >> >> (with-current-buffer buf >> (if (and (or (eq (current-buffer) dabbrev--last-buffer) >> (null dabbrev--last-buffer) >> (buffer-live-p dabbrev--last-buffer)) >> (numberp dabbrev--last-expansion-location) >> (and (> dabbrev--last-expansion-location (point)))) >> (setq dabbrev--last-expansion-location >> (copy-marker dabbrev--last-expansion-location)))) >> >> It's difficult to debug because the buffer is already killed at this poi= nt. >> But looking at the logic of backtrace, here is a reproducible test case: >> >> 0. emacs-29 -Q >> 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 =E2=80=98ab=E2=80=99 found", whic= h 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? Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: dabbrev-expand patch diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index bbe6a64b626..84306fb3ae7 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -472,8 +472,10 @@ dabbrev-expand ;; minibuffer. (window-buffer (get-mru-window))) ;; Otherwise, if we found the expansion in another - ;; buffer, use that buffer for further expansions. - (dabbrev--last-buffer-found dabbrev--last-buffer-found) + ;; buffer and that buffer is still live, use that + ;; buffer for further expansions. + ((buffer-live-p dabbrev--last-buffer-found) + dabbrev--last-buffer-found) ;; Otherwise, use the buffer where we invoked ;; dabbrev-expand. (t (current-buffer)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 30 13:18:36 2024 Received: (at 74090) by debbugs.gnu.org; 30 Nov 2024 18:18:36 +0000 Received: from localhost ([127.0.0.1]:48968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHS3A-0000QJ-0q for submit@debbugs.gnu.org; Sat, 30 Nov 2024 13:18:36 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:53547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHS35-0000PT-9l for 74090@debbugs.gnu.org; Sat, 30 Nov 2024 13:18:31 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id D55B1E0003; Sat, 30 Nov 2024 18:18:04 +0000 (UTC) From: Juri Linkov To: Stephen Berman Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <87wmgm6oe4.fsf@gmx.net> (Stephen Berman's message of "Fri, 29 Nov 2024 16:38:43 +0100") Organization: LINKOV.NET References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <87ttbq7eie.fsf@mail.linkov.net> <87h67q4gv6.fsf@mail.linkov.net> <87wmgm6oe4.fsf@gmx.net> Date: Sat, 30 Nov 2024 19:51:38 +0200 Message-ID: <877c8kboet.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: Eli Zaretskii , 74090@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: -1.7 (-) >>> 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. Would it be nice to have a new test that covers this case? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 30 15:07:39 2024 Received: (at 74090) by debbugs.gnu.org; 30 Nov 2024 20:07:39 +0000 Received: from localhost ([127.0.0.1]:49222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHTkg-0006RS-UX for submit@debbugs.gnu.org; Sat, 30 Nov 2024 15:07:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHTkf-0006R9-FJ for 74090@debbugs.gnu.org; Sat, 30 Nov 2024 15:07:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHTkZ-00034t-7p; Sat, 30 Nov 2024 15:07:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=MRum6l5zgNZ4RcD0M5CN7iABr9rxP6GLrx3sBNzaxbQ=; b=IEnbz9d1xpY2M48rft30 DdBNu6dNpENHhlRrDbjAPvH8GfEYtcaSUOvBJ0F/lVjbOoaQ8mzSUSTf/kpf8dWxrkEhbUWSAZ3Yd Aa3x58oCTOyK8Sr/TJZ0P8zobBpwbuBfKg0LWwBV8jI+Jaq+Oj+83eZJQ5XC2HSWd2rpZx+Mc1BHu flWM2cvnfb73XUWX+7W4y76ajRkbPdmlRSc83XXzl+I3uxMotq748BchYjw/FKqQGqlb6/rNYYe4S LXfSEnN+Gi3ZsZtbaB7Xc2esedB17sV/3JipBZ2meVjx6BLWwrVqwEqbWRZhssrB8JhifCLinYeL7 aR1hoBKhyn8IBw==; Date: Sat, 30 Nov 2024 22:07:27 +0200 Message-Id: <865xo47af4.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <877c8kboet.fsf@mail.linkov.net> (message from Juri Linkov on Sat, 30 Nov 2024 19:51:38 +0200) Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <87ttbq7eie.fsf@mail.linkov.net> <87h67q4gv6.fsf@mail.linkov.net> <87wmgm6oe4.fsf@gmx.net> <877c8kboet.fsf@mail.linkov.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74090 Cc: stephen.berman@gmx.net, 74090@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: -3.3 (---) > From: Juri Linkov > Cc: Eli Zaretskii , 74090@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 for testing. Stephen, you have green light for installing this on the emacs-30 branch. > Would it be nice to have a new test that covers this case? Definitely. But it is less urgent than fixing the bug itself. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 30 17:30:32 2024 Received: (at 74090) by debbugs.gnu.org; 30 Nov 2024 22:30:32 +0000 Received: from localhost ([127.0.0.1]:49434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHVyx-0005W2-J5 for submit@debbugs.gnu.org; Sat, 30 Nov 2024 17:30:31 -0500 Received: from mout.gmx.net ([212.227.17.21]:54623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHVyv-0005Vj-95 for 74090@debbugs.gnu.org; Sat, 30 Nov 2024 17:30:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1733005822; x=1733610622; i=stephen.berman@gmx.net; bh=SQLGth7adSNBh1FZoULpBZ5dDtjGq6heMI5ErHGonvI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=nJboFoMyt7TPaVGw2c/PbpyCthsqXOGm4nu85DQutfc5GduKYavoBk27Ulwh5Kcu ObghHRxz19/FDG4IIDwDuJYStUm9pODxir3S0aiNdTqG94LKX9zm2fPifWTe5AlzA 6Z9Z/A9692MhzXIvgiS63xZLn4misKimFGQaM2EsGK8aVcvX2baM3PHZwHZODO0gd RbVZuLHDzFjghQvmHfZv/mq/LwTuHZqPADzD8LLPHbMfFMPJVuHRndw7q6wtgQAG9 KsWPIOJOk/xGkxnp063sLHACAiKU9Mb/HwfmrJpfZX2jKnMEt4LrkLkII9jny/3ib hvr4jVLFjPvEoFVvsA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.95.200]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MAfYm-1tO9o608fQ-00CPJ6; Sat, 30 Nov 2024 23:30:22 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <865xo47af4.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 30 Nov 2024 22:07:27 +0200") References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <87ttbq7eie.fsf@mail.linkov.net> <87h67q4gv6.fsf@mail.linkov.net> <87wmgm6oe4.fsf@gmx.net> <877c8kboet.fsf@mail.linkov.net> <865xo47af4.fsf@gnu.org> Date: Sat, 30 Nov 2024 23:30:21 +0100 Message-ID: <87jzcke4n6.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:dxC9F5sBnLy3525O95z5yGpYmLNaPced7tYF4cuAvS93M9cWIMN mLBSAb1rBD+y/+Bh16CXCLe+K/0dUn1l0hUjETiStOpu8EwwrRS0PAgAJ6rLap+zBICtE6l k8IqQzApNe/J4LRRp7YjYHdN09xJ/6YJWF//uoCO69rOCm32shSTobZYNla5n67+Bh6ACgN uPnKn4GwDHpzRbp0pQTUQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:U51Q0AHHceQ=;TWqr+orb5imfFDWwPhfUHvgspEi oyPMiG7GWg7hCwgG6Duln2F0gt4Vk08fo4wDvoLSXKG57t6gGZFSevgkiHuuqb9j1e7UQgMlf cwVGtclIgVSFGN4CXUszJt0DaSzBaowc6XC7GhxklPsklr5JgGJCvyHou0evFWyvCj8Kmc9l8 7+oaeitGku0B9At+nXwwbZaDFf4UUPF8N1xl+g5SxoawYAZB8EtefCMlw6HSA7RsWv+DiA9H/ QmT7d4MVxOwe2GBJOP4S/OfyaD1V86k1txqK6QRr0xg+ZtrxXEBtIuu060mAg1UXY9996kWWT OthM+o3ck0LzuWGJWNMspAvqaE60e0R0fDzFvXmji8EOPSjfrvB0LmU948RpH5PzxXr9Sp89N G4RVYsI218rnxqE3ce52b30xem5LM7ZellTzMkgYJ6RDdF9XPyxDCekKA6hyYO/9g088/byuw wLnx1dyD9C0l32vhBYZBC368ZQx4XwvaUYmdhFnY8PtFlPeLrCuHqb+ecNGdhlGhqEHlEmhLP wrmQYHsSGaFbh/Eg4Zswg5F8iF6neb0/S5+fOh86rVAYS8wQIuYJSM1cLJNjVK7g14NYxR0tr v3jK/IHRhubdMuCtTzd84Lc/6N97FXFQE+35QKZf0tu9QXBbwSBeOGan/60pKZ0NFoaHmoRkq XNhZ0jREsgWrm9e+QZiGxx/dfuc0b8proCRTpYRVSa2D1kTo79gVqcKIGzxnvdgV+7ILv3ge7 fviXD4D4BIbYKrInUGr0WbXedqQOyeeQDoWe+RSeL5eiR/Kvfp0iZUAbpPkz+2eVgL+0DLJ3+ U2rOhItOHPHmuh/OPWMta2iCvIqRv1Kvy3pH0eEQRRranPZQpk4peEmGyO4ZQPmxE8OQHbIJw x3gcYBfZ5Lbj0pVgeXw6s7+2FJeVj4YDVzlT5OO2kSTeoHhgBpqwOqi4Bf+JQUqeVjbQUqT9T W31Z0fzipG6a18yJhfyIbIkFjWdxpNHBVURqKoeoJsetEp5wBzjw8hNXMfEfyxIbJkQz8MyFv vqz916lSzXUu1zWi/ZaIy7gWRLvcZoPxtRRuJceaKsjpW2plDIFtfgMnUvIZVhyni9BBqAJu8 Lm7JGNu1GsEmd4P33tOZ7+o2MdQ+I8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: 74090@debbugs.gnu.org, Juri Linkov 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: -1.7 (-) On Sat, 30 Nov 2024 22:07:27 +0200 Eli Zaretskii wrote: >> From: Juri Linkov >> Cc: Eli Zaretskii , 74090@debbugs.gnu.org >> Date: Sat, 30 Nov 2024 19:51:38 +0200 >>=20 >> >>> 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 =E2=80=98ab=E2=80=99 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? >>=20 >> 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 02 02:44:10 2024 Received: (at 74090) by debbugs.gnu.org; 2 Dec 2024 07:44:10 +0000 Received: from localhost ([127.0.0.1]:54117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI16I-0007UG-6E for submit@debbugs.gnu.org; Mon, 02 Dec 2024 02:44:10 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:49029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI16G-0007Tw-14 for 74090@debbugs.gnu.org; Mon, 02 Dec 2024 02:44:08 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 44C391C0008; Mon, 2 Dec 2024 07:44:00 +0000 (UTC) From: Juri Linkov To: Stephen Berman Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <87jzcke4n6.fsf@gmx.net> (Stephen Berman's message of "Sat, 30 Nov 2024 23:30:21 +0100") Organization: LINKOV.NET References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <87ttbq7eie.fsf@mail.linkov.net> <87h67q4gv6.fsf@mail.linkov.net> <87wmgm6oe4.fsf@gmx.net> <877c8kboet.fsf@mail.linkov.net> <865xo47af4.fsf@gnu.org> <87jzcke4n6.fsf@gmx.net> Date: Mon, 02 Dec 2024 09:33:51 +0200 Message-ID: <87ttbmim48.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: Eli Zaretskii , 74090@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: -1.7 (-) > 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. Probably 'condition-case' could help to catch a user-error. Or maybe better to set a buffer-local or let-bind 'command-error-function' like e.g. in 'minibuffer-error-initialize'. Then you can let-bind 'set-message-function' to catch a message to check it (but I don't remember if the error calls the message function). OTOH, I don't understand why the test immediately finishes after 'should-error'? There are many tests that call 'should-error' sequentially like: (ert-deftest abbrev-table-empty-p-test () (should-error (abbrev-table-empty-p 42)) (should-error (abbrev-table-empty-p "aoeu")) (should-error (abbrev-table-empty-p '())) (should-error (abbrev-table-empty-p [])) And indeed implementation of 'should-error' already has 'condition-case'. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 02 07:15:34 2024 Received: (at 74090) by debbugs.gnu.org; 2 Dec 2024 12:15:34 +0000 Received: from localhost ([127.0.0.1]:54531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI5Kv-0004Xd-Kl for submit@debbugs.gnu.org; Mon, 02 Dec 2024 07:15:34 -0500 Received: from mout.gmx.net ([212.227.15.15]:39111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI5Kt-0004XP-Ov for 74090@debbugs.gnu.org; Mon, 02 Dec 2024 07:15:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1733141725; x=1733746525; i=stephen.berman@gmx.net; bh=5Wc1zajKXrEZDgQSQR/QJRXUStMfQKtI9itCCCTba6I=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=o7d8NPpAmHsabtAGhQpqTZAi9scmhV+2y7etvieuJLmxTz6kCmpNawFbpZa1R8eP gF6b57pJ76Qz+fxpV97B4Ftn2QbMSXVVjYkEosDbqE/vCKfNgTe2XDlxaIvApw59f TF9btZcNZWDgjLeIUF9kfiUOO1JxCn8TuW3QHgYf2UnkN0Nr7vc9CYB9cjizYuomK 8my+dQg0SYW8viNpPBgqVECxA+AMhs/sfj7KtZoyqCwk6gfbOjPjCYzWjAGYN1qzg AEH4BUYLuq6CQnKxvH87WFyqKpVgHAzEcER/gZDcG5SwZc4dIMS4W0ac/WstzaPTC cqRD+qjhm7oUoRGf7g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.94.179]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MMXQ5-1szjEg19br-00WEUT; Mon, 02 Dec 2024 13:15:25 +0100 From: Stephen Berman To: Juri Linkov Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <87ttbmim48.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 02 Dec 2024 09:33:51 +0200") References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <87ttbq7eie.fsf@mail.linkov.net> <87h67q4gv6.fsf@mail.linkov.net> <87wmgm6oe4.fsf@gmx.net> <877c8kboet.fsf@mail.linkov.net> <865xo47af4.fsf@gnu.org> <87jzcke4n6.fsf@gmx.net> <87ttbmim48.fsf@mail.linkov.net> Date: Mon, 02 Dec 2024 13:15:23 +0100 Message-ID: <87ttbmxov8.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:HK26npl9/WD3EqoHdVvR8GVvpR2k8lfODqpZ5lYFlYVC6qobv7+ sFi6Xz4jvRNAxOpuH8XZlDqbpzzV+6hnegKOMrl31HTqsnZK9CGDnjiXn4rAibgCXzic68u e+asOx/3Vrt+/WEBY/Xx8hD5TueB8+/zynTdFr9/deRLFlLzOrLXq2BPkhr88Slkod/0lfE R8w+iDxIBwSG4yyj6qqGw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:0erHtUGX9oQ=;hu9Q5l8dymheottsFlWbrBZ/oWA uN+LrUr5dKysdIn3loIzb9QGalA4sXvM81XFM10SXsDE1bzHngA68d1tlIrMbKTWJkL+37m5I Jn4dNRDA68CDYL+3Oy4tiUoCiWCqeSWopUUyMv7tWPbtoAeLYuGUpWN+j2qjrpOt1E7OKHJJP +MS+21KKMJSOe3+NomK6kw3mvFIJXqxLVtVqsXbcXVolX7H4GsyD7I5wFMkpMi0dlqXoAfWlj P2JVp42w31lMaG4SETr96Kqs0cr+ihLkI3gn97RuL2w2GrMnh96QPRaM4GR9xJ8sunH7OzHeD RYz5xv911Y7wFxQMkjHHnse6ZrJ/tUVyjq2jtMpS9FFI5CfzW/afsmj+0enJ+OhyKBI6NA8uA 3n+ElN9ddJfzUUgZ1F2gPT8vut+3aHgJjt/C7RcqPCkLk2RBwvRNIZkm36bWxaeGFC2B17ICN Gr7fH0+GCMUwUxIqxQIGI1fUa1mY7pzHXxu1gf1+Sih/FyLilgo6+AR1cdfaB/bXdqjCtIo59 WoR8kzf6FLTu7VKQUSPkLt2Dj8HkIerzIKohbytHehbyFVIL8MgnYghghxrJbIsRT3RBE6LTb rjMazolsFNDYf+3jNr/JxNA4bkL+d5zYRBUsBa6RIH48IyYnIri+f59v7lBH4Dx9NTvkXo2g/ 7/g3+xuMvUZP/vyu3t1mpqu/OX+eYAfLOsk4SmO3+Uqmw4NqXXXUe1ZyFTzZgSDBz3TVr2OJR R1+5IydrAROUSngBuBemTySQgupx+Dtsw7yTvLH57dfAmB5KJD9oU20DxaFP+6jsOhZ+qzsQS AV4EYoqWLnLDiVSrInhT7/VXiga4t2IPLriqfsgrGRN1FYhsA4fSHSoRdAAdbMjXH2mJUcRs5 Z4FX38Vtdu1GQMCjP43OBW0loDHF3rc/slcTkRHOUWrEtG8L9iQrxwboSRiWhMB0GXNXHsqYq jLsS442eaL26fsA4BsbtVo6nflUbs3i4o+lGxJMNnAKVmk3VUfLj+PsF2MquAotjMdw2imh3A 2KFOJpc/nqtip1dbCPbplhzYfmrHHTACCc7BvXA9pvJTay+cil7r9SwzHzBgDhmgNO4gXD0oL DHuC8Pt7+rSg5EAMCDVzKeYEsNpVic X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: Eli Zaretskii , 74090@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: -1.7 (-) On Mon, 02 Dec 2024 09:33:51 +0200 Juri Linkov wrote: >> 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. > > Probably 'condition-case' could help to catch a user-error. > Or maybe better to set a buffer-local or let-bind 'command-error-function' > like e.g. in 'minibuffer-error-initialize'. > > Then you can let-bind 'set-message-function' to catch a message > to check it (but I don't remember if the error calls the message function). > > OTOH, I don't understand why the test immediately finishes after 'should-error'? > There are many tests that call 'should-error' sequentially like: > > (ert-deftest abbrev-table-empty-p-test () > (should-error (abbrev-table-empty-p 42)) > (should-error (abbrev-table-empty-p "aoeu")) > (should-error (abbrev-table-empty-p '())) > (should-error (abbrev-table-empty-p [])) > > And indeed implementation of 'should-error' already has 'condition-case'. Thanks very much for the feedback. I was wrong about the test immediately finishing after `should-error'; I guess I misread or misunderstood the output of the batch run. Additionally, there was a typo in the test of the final buffer content, which caused it to fail, and that probably confused me further. As for testing the error message, I overlooked that `should-error' returns an error description containing the message, so that seems the simplest way to do it. With these changes the test succeeds in batch runs and I think now better reflects the user experience with manual input, so I went ahead and pushed the fix (commit 6bca138d60e to emacs-30). If you agree, feel free to close the bug again (assuming it needs to be reclosed, since you unarchived it); otherwise, if you see other problems with the test, please let me know. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 03 02:42:02 2024 Received: (at 74090) by debbugs.gnu.org; 3 Dec 2024 07:42:02 +0000 Received: from localhost ([127.0.0.1]:58047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tINXm-0006FT-0u for submit@debbugs.gnu.org; Tue, 03 Dec 2024 02:42:02 -0500 Received: from [217.70.183.197] (port=48029 helo=relay5-d.mail.gandi.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tINXk-0006Ec-BT for 74090@debbugs.gnu.org; Tue, 03 Dec 2024 02:42:00 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 621441C0008; Tue, 3 Dec 2024 07:41:18 +0000 (UTC) From: Juri Linkov To: Stephen Berman Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <87ttbmxov8.fsf@gmx.net> (Stephen Berman's message of "Mon, 02 Dec 2024 13:15:23 +0100") Organization: LINKOV.NET References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <87ttbq7eie.fsf@mail.linkov.net> <87h67q4gv6.fsf@mail.linkov.net> <87wmgm6oe4.fsf@gmx.net> <877c8kboet.fsf@mail.linkov.net> <865xo47af4.fsf@gnu.org> <87jzcke4n6.fsf@gmx.net> <87ttbmim48.fsf@mail.linkov.net> <87ttbmxov8.fsf@gmx.net> Date: Tue, 03 Dec 2024 09:35:30 +0200 Message-ID: <87o71tb4ot.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: juri@linkov.net X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 74090 Cc: Eli Zaretskii , 74090@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.4 (/) > With these changes the test succeeds in batch runs and I think now better > reflects the user experience with manual input, so I went ahead and > pushed the fix (commit 6bca138d60e to emacs-30). If you agree, feel > free to close the bug again (assuming it needs to be reclosed, since you > unarchived it); otherwise, if you see other problems with the test, > please let me know. I see the same test failures that were reported on emacs-devel. One of them is clear because of quotes mismatch: (string= "No further dynamic expansion for `ab' found" "No further dynamic expansion for ‘ab’ found") But why 4 lines with should-error affect two other tests is not clear. Maybe other tests expect the initial contents in the scratch buffer? Or the same buffer list? Generally, this is deficiency of the test-suite design that tests are not isolated. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 03 04:39:40 2024 Received: (at 74090) by debbugs.gnu.org; 3 Dec 2024 09:39:40 +0000 Received: from localhost ([127.0.0.1]:58294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIPNc-0003bp-0E for submit@debbugs.gnu.org; Tue, 03 Dec 2024 04:39:40 -0500 Received: from mout.gmx.net ([212.227.17.20]:46965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIPNZ-0003bZ-JG for 74090@debbugs.gnu.org; Tue, 03 Dec 2024 04:39:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1733218771; x=1733823571; i=stephen.berman@gmx.net; bh=lWQ4Z2k2v8zFxcFslryZPbx65KkZu2SgPi/4uWf3p80=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=QHAM+eXybJPiNsIxFNb3AeXwCXAjBXZGh0FhXigfKljVZd+lTNENcnt5RETtWxUX /cEZV1U4DngDtDkcWwWY4kZ1tRKh1alx/Pjdt49tU1vCMTWSNRI5EsXFNcsJHsbvX tW30ou+N45mqgvmqHQ6Sffy/oricG4Xwo0WiCbcLcS37MAZdqR9cIcQTJWvDfKTl5 6Oq1c5xbFXdvoOf7azGme44nkA4IxEHDFXF5e1PBpfpX78D4f0QLXpHJ26aHSrTWu 7Oz+77pwlEqPBljbMr740IbaGjSKUN7KZhQdrB6mvgnVRhKgwGgx0VWyPmoMfL34G qTEgI/pqM/gkbeD26w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([94.134.95.212]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N49lJ-1tiuME02ef-00uenh; Tue, 03 Dec 2024 10:39:31 +0100 From: Stephen Berman To: Juri Linkov Subject: Re: bug#74090: 31.0.50; Problems with dabbrev-expand In-Reply-To: <87o71tb4ot.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 03 Dec 2024 09:35:30 +0200") References: <878qu6j0tx.fsf@gmx.net> <86zfml4uay.fsf@gnu.org> <87cyjgwq1a.fsf@gmx.net> <87ttbq7eie.fsf@mail.linkov.net> <87h67q4gv6.fsf@mail.linkov.net> <87wmgm6oe4.fsf@gmx.net> <877c8kboet.fsf@mail.linkov.net> <865xo47af4.fsf@gnu.org> <87jzcke4n6.fsf@gmx.net> <87ttbmim48.fsf@mail.linkov.net> <87ttbmxov8.fsf@gmx.net> <87o71tb4ot.fsf@mail.linkov.net> Date: Tue, 03 Dec 2024 10:39:28 +0100 Message-ID: <87y10xcdgv.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:jW8OpnkyMFxVxGs3VONzg9dvuFwZ/FQqqf/c7BFRu9v2IUrQtgY 1SVhRc8vJEHe0L2A8pp9H5d8mC7/7viY2OGnLnPeEBUCWQiNybjPc5uCZGYj6A30zCwlEOJ MYXwtwdTONiooMgBkJppsStI8foqhiNsmQ1cCu30ps97riiR9c++WROQ6ex/4822mESxSDt kv6ptQu7eSIvzYfeHOH6A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:xDS+RrFy0wM=;s+a5MyxcKOZgOpBRotmAdagD7ql KC3gmNx44j5WpyZWiP9BNlGhJPS1JUsBKT5BaW/17WzSCQE1WG7EJFzUx59DpO54GQP0U92u8 rHMVJhJPiGKYg4oE5qzJNPeZJVk18pB48xJ7SYftqZIdMZKEeANaQdbwAoxH6r+z/QBVZ//pS W9QbrkE/WOuY2YHs/Nu2gAgRg6MFu9bx1O+wzibFKm6aNCPHURNt7dK/WajkCWUsg/p+TQryT zYr8KuyHzQ4eTjezlfJQXc6VIHBAc8e/HFrD9l74dWwlEhHweRaT2tp45PLUwxqav6uFyQlDn dJCWWn6nXmwJshP3LA1lyQmyqU689AOmTUkw8D/QVcRa4hRYPnyoUffQJm3MWBMZBu8ampVnZ JDkmXsbUrp2rPO9k2KTNactRdtxK/ek2DUw6eQ7+5vC8cOE2TvcA7AIT8Zcyv6zFIVyVBSe39 fuf/Z+dHJMF3mmB3vh9FyB94hZ7P/mC7orL0mItTUCHzyj6i3EIsDDg01vE6+xzGEUFlewhKV 3YGtKAxOtTNsPgElhzJGVbV/QF+J0fAnGoyWh65BYukel/swqp8z1GLqMjd9+OEgTi4jE3SjW GEXm4MqzGeIuG+M8ALAI97XaKURJq+bewui7ZhLP5JueI3TZl34G8gEYYa3bFK0oBqQ7VHK1P 0rPzFQIyJ9j4fdDd7YFElNFTaGMmfg2OTx4+2C5RD1FtDrNOeNT7EqkWbOBkTOWu4iwAoCm86 I0mIJnfwnfHWZiOCNlbVkC3PxDnSrFSBXKOddUhomlJAuPu2dzPeoCEcXu6d8ziU6yiCZx/SH 30HZVSxXl4xMVn/r/0CWKmxt8AdpraYqj/5K3A/E/QVji9VmTB5f096xz8edYlDrXkT/7uC82 vODDXWH6Rem4jWwQjMlCX+PBrvgm6EEaJ2ZuHJClKSYgijPiJMCwLlckA3cwdLZtH0CgeJjil l/kOms8ie2xdXEy7G3lMj0VuZDzUjxwx1qm32UY0wVM/MJ+MARdVZkAip1sM+cWx5ESx/Dcpb K7RHMTi0nUtoQ85ARDRe+zfhpHo7CxJxdYiXXWLrTxEw1dMPABCRhG+m858gZc+ic7b+qAuov aQ8LOOhp/rwPMZcCv9z3qwtOJDy/iU X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 74090 Cc: Eli Zaretskii , 74090@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: -1.7 (-) On Tue, 03 Dec 2024 09:35:30 +0200 Juri Linkov wrote: >> With these changes the test succeeds in batch runs and I think now better >> reflects the user experience with manual input, so I went ahead and >> pushed the fix (commit 6bca138d60e to emacs-30). If you agree, feel >> free to close the bug again (assuming it needs to be reclosed, since you >> unarchived it); otherwise, if you see other problems with the test, >> please let me know. > > I see the same test failures that were reported on emacs-devel. > > One of them is clear because of quotes mismatch: > > (string=3D "No further dynamic expansion for `ab' found" > "No further dynamic expansion for =E2=80=98ab=E2=80=99 found") Thanks, I've (hopefully) fixed this problem now (or rather avoided it, since the change is just a workaround) with commit 7b8d12e95de to emacs-30. > But why 4 lines with should-error affect two other tests > is not clear. Maybe other tests expect the initial contents > in the scratch buffer? Or the same buffer list? Those other tests are two of the four dabbrev-expand-other-buffer* tests that also fail when manually running ert in the test buffer. I couldn't figure out why but since these tests succeed in batch runs and with `make check', I haven't investigated further, but I'll try to do that. > Generally, this is deficiency of the test-suite design > that tests are not isolated. The macro `with-dabbrev-test' is supposed to ensure that, but maybe it's failing somehow. Steve Berman From unknown Mon Aug 18 09:02:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 31 Dec 2024 12:24:11 +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