From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#64439: 28.2; auto-fill-mode gets turned on all over the place Date: Sat, 8 Jul 2023 22:57:12 -0700 Message-ID: <11d9848d-5a70-c1e5-cbc8-e00341889398@gmail.com> References: <83h6qlm0oc.fsf@gnu.org> <1034974.1688399705@warthog.procyon.org.uk> <1211099.1688406521@warthog.procyon.org.uk> <837crgn90u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28882"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64439@debbugs.gnu.org To: Eli Zaretskii , David Howells Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 09 07:58:37 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qINRN-0007Lp-DU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Jul 2023 07:58:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qINQr-00060k-0l; Sun, 09 Jul 2023 01:58:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qINQo-0005zu-UG for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2023 01:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qINQo-0005Ys-J1 for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2023 01:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qINQo-0006Nm-Et for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2023 01:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jul 2023 05:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64439 X-GNU-PR-Package: emacs Original-Received: via spool by 64439-submit@debbugs.gnu.org id=B64439.168888224224467 (code B ref 64439); Sun, 09 Jul 2023 05:58:02 +0000 Original-Received: (at 64439) by debbugs.gnu.org; 9 Jul 2023 05:57:22 +0000 Original-Received: from localhost ([127.0.0.1]:45596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qINQ9-0006MZ-L4 for submit@debbugs.gnu.org; Sun, 09 Jul 2023 01:57:21 -0400 Original-Received: from mail-pj1-f41.google.com ([209.85.216.41]:62542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qINQ7-0006ML-H1 for 64439@debbugs.gnu.org; Sun, 09 Jul 2023 01:57:20 -0400 Original-Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-26598fc0825so684128a91.0 for <64439@debbugs.gnu.org>; Sat, 08 Jul 2023 22:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688882233; x=1691474233; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=lEtONrOWg70/ps8+8jfX5q/K3AHuLpXAE4bAVJ/Bh9k=; b=NuHlM0cd/8rZ//TYxSAUfsnLkN8/tQUHtA+Rt2B9nU5j68pM5KnMr34YyQVWkU4VCo Fgjx8b/i5+wE69Y2Vgl57e+1P86nU4AMJteeCLUOWa1azvWzgZZIt9ixCieAoWzFqNsh IfdCz/rp+x5xu/tLgDaygFsWjBHJUBnhgnIspd2jwDLfdlmVuex/Eb3vcVoA1Mid4gl6 AVcnuul2/FYk94uKQpAzOjzQf6kSVbBSYSanGcRv4SKAgYYYfb9k/647Y/NX0ZPfJqod HNbzVghyugQVNUEGqM0zyJrIfND1lVWDBKvb0wxEnfp3WeGDXIWNGfOHTsqoDdABlMbv 5iuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688882233; x=1691474233; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lEtONrOWg70/ps8+8jfX5q/K3AHuLpXAE4bAVJ/Bh9k=; b=Ccj//+VlWLnkeSedw/YJwuddk/1k+qVI2uBHfd207dXu+qq23aaZ1Z/8ICCyolm7Mj I9LkVIqskx0uCwJvBwC/XaMXjdb0FDZiiOUGyv/NYdhuVh39DgfthRkAjxNP37+BXnd2 GTc9Y/Z099Pou/zWla0yJc5bP9fvLnozaeXfhG20UFDJo//RGu14nODzofJobyj+bHUh aqjgqfIBjSKVALrAOECT0FYZXKyfVra6W49ZjBP4B+gzUr1guRHfBNPRSick5XQOseWC enShCK2dcAJKiYv9gwq6ciplCdIA8V5yNAEV9HlMWNRm0msu0Jp+3g87esEBoIFBfqVq 5LKA== X-Gm-Message-State: ABy/qLbPIulvdp6UrBfbvUSpiwJNdn1IBEJDY5NQdtQXDtakBOkd0vua zUeIR4tHJK6RgQSNf5sY+ZQ= X-Google-Smtp-Source: APBJJlGfQWMoviIFU9qhWhNi+anI7dbktbpbK6C/4MVJXP+IVKFUO2Rt8I1hwLuFCEhO5wT2UZL0Pw== X-Received: by 2002:a17:90a:1b4f:b0:264:7a:6a84 with SMTP id q73-20020a17090a1b4f00b00264007a6a84mr14953917pjq.0.1688882233588; Sat, 08 Jul 2023 22:57:13 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id l7-20020a17090aaa8700b00264044cca0fsm7328002pjq.1.2023.07.08.22.57.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 08 Jul 2023 22:57:13 -0700 (PDT) Content-Language: en-US In-Reply-To: <837crgn90u.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264811 Archived-At: On 7/3/2023 11:29 AM, Eli Zaretskii wrote: > I guess tracking down this problem will be harder, then. I hope I at > least gave you some ideas with which you will be able to construct a > suitable trap and find the culprit. Good luck! I got a backtrace when this happened to me. Outside of Emacs, I checked out a different Git branch, and then went back to Emacs and started typing into "etc/NEWS" (the specific file probably doesn't matter much), which triggered the supersession prompt as you'd expect. This was all over Tramp/SSH (again, not sure this is relevant). Here's the debug code I added to trace this: ---------------------------------------- (use-package text-mode :preface (defun user/turn-on-auto-fill () "Turn on auto-fill, but log a warning if it's not local to a buffer." (turn-on-auto-fill) (when (default-value 'auto-fill-function) (display-warning 'auto-fill :error "Default value of `auto-fill-function' was set!") (backtrace))) :hook (text-mode . user/turn-on-auto-fill)) ---------------------------------------- And here's the backtrace (plus a couple lines immediately preceding): ---------------------------------------- NEWS changed on disk; really edit the buffer? (y, n, r or C-h) r Tramp: Inserting ‘/sshx:jim@remote:/home/jim/src/emacs/etc/NEWS’...done backtrace() (progn (display-warning 'auto-fill :error "Default value of `auto-fill-function' was set!") (backtrace)) (if (default-value 'auto-fill-function) (progn (display-warning 'auto-fill :error "Default value of `auto-fill-function' was set!") (backtrace))) (when (default-value 'auto-fill-function) (display-warning 'auto-fill :error "Default value of `auto-fill-function' was set!") (backtrace)) user/turn-on-auto-fill() run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook) apply(run-hooks (change-major-mode-after-body-hook text-mode-hook outline-mode-hook)) run-mode-hooks(outline-mode-hook) outline-mode() set-auto-mode-0(outline-mode nil) set-auto-mode() normal-mode(t) after-find-file(nil nil t nil nil) revert-buffer--default(nil t) revert-buffer(nil t) ask-user-about-supersession-threat("/sshx:jim@remote:~/src/emacs/etc/NEWS") tramp-handle-lock-file("/sshx:jim@remote:~/src/emacs/etc/NEWS") apply(tramp-handle-lock-file "/sshx:jim@remote:~/src/emacs/etc/NEWS") tramp-sh-file-name-handler(lock-file "/sshx:jim@remote:~/src/emacs/etc/NEWS") apply(tramp-sh-file-name-handler lock-file "/sshx:jim@remote:~/src/emacs/etc/NEWS") tramp-file-name-handler(lock-file "/sshx:jim@remote:~/src/emacs/etc/NEWS") newline(nil 1) funcall-interactively(newline nil 1) command-execute(newline) ---------------------------------------- This might not be the most useful backtrace in the world, but hopefully it at least confirms one way this can happen. It's rare enough though that I can't reproduce it on command. It does lead me to believe that there's a bug with automatically-buffer-local variables, since 'turn-on-auto-fill' should Just Work here (and it typically does).