From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55865: [BUG] 28.1.50; Msg "Local variables list is not properly terminated." displayed when opening a file with line `print("Local Variable:")` Date: Wed, 23 Nov 2022 10:22:12 -0500 Message-ID: References: <87a6am6lna.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3866"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lin Sun , 55865@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 23 16:23:16 2022 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 1oxrak-0000c7-Aj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Nov 2022 16:23:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxrah-0006zH-11; Wed, 23 Nov 2022 10:23:11 -0500 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 1oxraY-0006x1-VX for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 10:23:04 -0500 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 1oxraY-0006iI-MH for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 10:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxraY-00073U-HW for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 10:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Nov 2022 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55865 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 55865-submit@debbugs.gnu.org id=B55865.166921694327039 (code B ref 55865); Wed, 23 Nov 2022 15:23:02 +0000 Original-Received: (at 55865) by debbugs.gnu.org; 23 Nov 2022 15:22:23 +0000 Original-Received: from localhost ([127.0.0.1]:55933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxrZu-000722-Qb for submit@debbugs.gnu.org; Wed, 23 Nov 2022 10:22:23 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:43748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxrZs-00071m-KZ for 55865@debbugs.gnu.org; Wed, 23 Nov 2022 10:22:22 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AAF79100117; Wed, 23 Nov 2022 10:22:14 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1C1C11000FC; Wed, 23 Nov 2022 10:22:13 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1669216933; bh=OGR+joxc/4b1OazzeEv6xHG1JuJdXRKOXbbFk6wShuY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HCzNp/z6Cr3Yq6J6n73Us2qRkYNCcuFnBlYQqZVF48zfH5WNcp8pqZ6HJReoWDXT/ m85m439TWv4gn2C8ODL7liF9IU7qx0JjZcJjjOCSav6CDQFZpTL5H6F4B9ekk/Vdr1 jWTmczhFZIqdoZ37bk1rw+XIUljm6TP2OONNgB2fiOw8+ds+pvSUbsm7PYQIVTbEX1 lmq9n38bDhH+FwGZcdFUZ//9Ed7kHpBEyiDJCoVPt7ypeqC4EtZQ26L341s037qkBw pQuQz007QEwipBAls2z+IiNxE9dKiC6DdENLF/lqeMJ0H5snbNzi9RE7f7Wp33M7a4 2HZ6prTxSCx3w== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0CF2412045B; Wed, 23 Nov 2022 10:22:13 -0500 (EST) In-Reply-To: <87a6am6lna.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 09 Jun 2022 14:56:09 +0200") 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:248754 Archived-At: > I don't think there's anything to fix here -- Emacs makes a guess that > this is a Local Variable section, but then it turns out that it's not, > and it says so. > > So if you don't want that message, you have to obfuscate the string. Indeed. If there's something to fix here it's the relative lack of information. E.g. we could include in the message some info about the name of the file in which we found the `Local Variables:` string (and its position too, while at it). We could also try and reduce the occurrence of such false positives (e.g. by checking for the presence of `End:` or the presence of the same prefix on the next line), but that would increase the risk of emitting no message when the users do intend to write a `Local Variables:` section but make a mistake writing it. Stefan