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: Mon, 10 Jul 2023 09:00:14 -0700 Message-ID: References: <83h6qlm0oc.fsf@gnu.org> <1034974.1688399705@warthog.procyon.org.uk> <1211099.1688406521@warthog.procyon.org.uk> <837crgn90u.fsf@gnu.org> <11d9848d-5a70-c1e5-cbc8-e00341889398@gmail.com> <83edlhbn1y.fsf@gnu.org> <83zg447za9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11851"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dhowells@redhat.com, 64439@debbugs.gnu.org To: Eli Zaretskii , Stefan Monnier , Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 10 18:03:30 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 1qItMI-0002s7-2N for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Jul 2023 18:03:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qItJx-0007yo-QB; Mon, 10 Jul 2023 12:01: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 1qItJu-0007wp-Fi for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2023 12:01: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 1qItJu-00038p-74 for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2023 12:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qItJu-00076x-3B for bug-gnu-emacs@gnu.org; Mon, 10 Jul 2023 12:01: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: Mon, 10 Jul 2023 16:01: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.168900482827289 (code B ref 64439); Mon, 10 Jul 2023 16:01:02 +0000 Original-Received: (at 64439) by debbugs.gnu.org; 10 Jul 2023 16:00:28 +0000 Original-Received: from localhost ([127.0.0.1]:49007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qItJL-000763-QJ for submit@debbugs.gnu.org; Mon, 10 Jul 2023 12:00:28 -0400 Original-Received: from mail-pf1-f176.google.com ([209.85.210.176]:59897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qItJG-00075j-7I for 64439@debbugs.gnu.org; Mon, 10 Jul 2023 12:00:25 -0400 Original-Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6687446eaccso4052718b3a.3 for <64439@debbugs.gnu.org>; Mon, 10 Jul 2023 09:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689004816; x=1691596816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=V57qqnXrrZMsfI7mGZ2c7999QeT9hx4CisEfwtQNv7w=; b=X6UrICkVni8Ls7rNi5lVedbBv7B+rvKVfNZo2OeIvtGpTYEN/goH8OWPYdCs/q2OAJ OgzZ/gXl0wAOFTFifVKhHEPsiA/6andGPtOLNqNLpA8u6jIOdviXCW/xIGZa2TKCc4VH iUvssRrvyJpzBE2Mtz2j5H6rJLhi8sEMz54XvZRYKRxq6tVYkMs78taDB9BpyoAWsU9d DkAwex9lQZWs/Q6VH/gSUG4vfRFpPdc9UyLQNzBRZwAB+ZlAPie7C25i7GUpzx5axjQk SnC8c3Io+lBDfVezaMmWQ9RdOMOrSfBNeBWLLnVzDFl6miJUvmlU4+3AVyKTnDXgM0ou L35w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689004816; x=1691596816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V57qqnXrrZMsfI7mGZ2c7999QeT9hx4CisEfwtQNv7w=; b=g0xUcJ973IxV99g7KuxIG4kp3Hafcnvm59UJT6rxRxRBBxK4ruKbhTlPN67wXVx3eq VxjFcMnGKuvDoSbA/wiD5WClaQeiFMITcyytj07f3+EtcNokaKPNTnxwPzlh0Dntw+/s ypPApuSt+e6Xh0I0tBhnQqFNndqpqOi7DAHSuixuzFaACGN3k8y8ia7XOb9VJQI/ddV5 Zo5tEEXQ+Dm+OqC62yuBc84a/aCFzYe7ETaMU7ANss1IhK6strXPY1t4cWO+OC8BBzvA nreRSxYFLVgbz648aNwPKCAYbKF0Lcl/xR9Ucja//F17URHpiBz6tq/u7wUl+DOgsgbP liLw== X-Gm-Message-State: ABy/qLZBWcJavvHRMj3cnYdE90Mzbi3kdYroABH8j4vwW3y9+RmEAurF V3b2PEuvcUCR0aHIN7QgyMM= X-Google-Smtp-Source: APBJJlGWaVjeN7PBsafxtKc/XoblHkGklhZz91K4VU3HZHM+u8sL2YVbnrZg2GfR4fUKr04LBsQv9A== X-Received: by 2002:a05:6a00:248e:b0:674:ff6d:1b39 with SMTP id c14-20020a056a00248e00b00674ff6d1b39mr16337163pfv.9.1689004815837; Mon, 10 Jul 2023 09:00:15 -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 b11-20020a63930b000000b0055bc3b97f34sm7513510pge.19.2023.07.10.09.00.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Jul 2023 09:00:15 -0700 (PDT) Content-Language: en-US In-Reply-To: <83zg447za9.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:264892 Archived-At: On 7/10/2023 4:59 AM, Eli Zaretskii wrote: >> Date: Sun, 9 Jul 2023 11:00:46 -0700 >> Cc: dhowells@redhat.com, 64439@debbugs.gnu.org >> From: Jim Porter >> >> The bug is that when this occurs, rather than setting >> 'auto-fill-function' buffer-locally in text modes, it actually (somehow) >> sets the default value of 'auto-fill-function' > > I don't understand how this is possible with local variables. Maybe > because some code calls makunbound for it? Does local-variable-p > still return non-nil for auto-fill-function when this triggers? I'll add a 'local-variable-p' check to my test code, but whatever's happening here, it only makes 'auto-fill-function' non-local temporarily. Immediately after the backtrace I posted, I evaled "(setq-default auto-fill-function nil)" to fix the default value, and then called 'normal-mode' in a text-mode buffer, and it correctly enabled auto-fill-mode in just that buffer. > Btw, it is possible that your trap snaps too late: that the default > value of auto-fill-function is non-nil does not yet mean this happens > when your hook is called, it could have happened earlier. Because > setting the buffer-local value will DTRT regardless of the global > value, AFAIU. That's true, though I'm pretty sure it's not the case here, since I noticed my prog-mode buffers suddenly have 'auto-fill-mode' (which prompted me to check my *Messages* output to get the backtrace. I'll add some extra checks here in my test code. >> I've only ever seen this happen when >> 'ask-user-about-supersession-threat' is in the stack. The backtraces >> I've captured all include Tramp too, but I'm not sure the latter is >> actually necessary to reproduce this bug, or if it just changes the >> timings to make it more likely. > > "Timings"? is this stuff asynchronous in some sense? Michael, any > ideas? It's just a guess, but if some other Lisp code can run while Tramp is fetching the file data, that could possibly cause some issue.