From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74267: 29.4; Doc string of `add-file-local-variable` Date: Sat, 09 Nov 2024 14:04:38 +0200 Message-ID: <867c9cmx49.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8460"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74267-done@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 13:05:32 2024 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 1t9kDb-00023c-Jh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 13:05:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9kDD-00077r-85; Sat, 09 Nov 2024 07:05:07 -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 1t9kD9-00075K-Ih for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 07:05:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9kD8-000391-IZ for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 07:05:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=vyBdCmqj4uYMMNwErJ1/LC3kZfnjy69yw3AaoewYS+4=; b=oMPVZc7B8xIdcM/+VBS4f2UeSNdE4P3VRB5TTWyYXGHMtT1DxF7yg14gdQwlQvrGVWdfp1cJ93Z6dHfByuKS01BxI0eiM9lXPLKsGSwUhSUaEpe4L7+XhN08rDpNVgDS17D1TLAtc9TPJbefBEtX2iDeW3rCqlzwPI03seshexcCWRA5cZStFLvIFqe4YvD50+ru6DEVvl+5nq8w+ZP8ETggsu/FWansBxgb84Q9gIXLo490Phl8pvG7PbUTGDJ9f0dtLYk3oVPBwo75OrkLc1UVMQrLvD7nxrO6UFRZMgfuSE91ksLqzrtHJ+VoR1DMLx1R9tsDj8JFbuUocAXeow==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9kD8-0000Vs-67 for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 07:05:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 12:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 74267 X-GNU-PR-Package: emacs Mail-Followup-To: 74267@debbugs.gnu.org, eliz@gnu.org, drew.adams@oracle.com Original-Received: via spool by 74267-done@debbugs.gnu.org id=D74267.17311538901945 (code D ref 74267); Sat, 09 Nov 2024 12:05:01 +0000 Original-Received: (at 74267-done) by debbugs.gnu.org; 9 Nov 2024 12:04:50 +0000 Original-Received: from localhost ([127.0.0.1]:53740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9kCw-0000VJ-4U for submit@debbugs.gnu.org; Sat, 09 Nov 2024 07:04:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9kCt-0000V5-H0 for 74267-done@debbugs.gnu.org; Sat, 09 Nov 2024 07:04:48 -0500 Original-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 1t9kCn-0002zx-Eu; Sat, 09 Nov 2024 07:04:41 -0500 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=vyBdCmqj4uYMMNwErJ1/LC3kZfnjy69yw3AaoewYS+4=; b=TTgIfxmpePdo ukDqrVNiPaXOhoTEAkWL6HXSxDYBKEslBQi7PFbhI7qs2DYj6na5s3PG61ucsmckBxoXTr8+bzr5F Zq15/UbZMv1RVpYqKlZOjIZpERl9nQ43+jNRWceyJA5kP/ki5dxAXyPjDryRGwETuVhQ372Lw592m ZoqOp/epjgocLrSEpO3wMMMsVxE3wiuOJbxolgGi98/nZbO03LdmEMCToDwbtj0PMlG9x9QeLF2uK YVjrDGJATI7PWk/rNsypYiZHoR0lvoOKyrvppE6qSr+K/i39Qcc2g0BZSWl2VFoYCnGOC36Mzt8ML tCoDglmM3/i0e7VJaxz7gQ==; In-Reply-To: (bug-gnu-emacs@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:295130 Archived-At: > Date: Fri, 8 Nov 2024 21:25:01 +0000 > From: Drew Adams via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > The doc string doesn't make clear that it adds the variable > at the end of the file, and not on the first line (as a cookie). This > is important in the case of a variable, such as `lexical-binding', that > must be added to the first line. > > See, for example, this question: > > https://emacs.stackexchange.com/q/82549/105 > > The user tried `M-x add-file-local-variable' and didn't understand the > error message, especially because point was at bob: > > user-error: The 'lexical-binding' variable must be set at the start of the file > > The Emacs manual, node Specifying File Variables makes everything clear. > But please clarify the doc string of `add-file-local-variable'. The main problem is not the doc string, but the text of the user-error message. Thanks, fixed, and closing the bug.