From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#36837: 26.2; whitespace-mode: whitespace-line-column is not set to local fill-column Date: Fri, 02 Aug 2019 17:14:34 -0400 Message-ID: <85y30b2rt1.fsf@gmail.com> References: <20190729111756.0665feb6@ventiloplattform.tastytea.de> <87k1bvfwda.fsf@gmail.com> <874l2zvcak.fsf@igel.home> <87ftmjfvpw.fsf@gmail.com> <857e7v4bb2.fsf@gmail.com> <87blx7cpwf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="87506"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt) Cc: tastytea , 36837@debbugs.gnu.org, Andreas Schwab To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 02 23:15:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htetQ-000MVi-3n for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Aug 2019 23:15:16 +0200 Original-Received: from localhost ([::1]:37596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htetO-00019y-PZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Aug 2019 17:15:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44047) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htetE-00019f-CU for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 17:15:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htetC-0000KE-Bt for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 17:15:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49103) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htetC-0000Jj-4e for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 17:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1htetB-0004NS-Tc for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 17:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Aug 2019 21:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36837 X-GNU-PR-Package: emacs Original-Received: via spool by 36837-submit@debbugs.gnu.org id=B36837.156478048216783 (code B ref 36837); Fri, 02 Aug 2019 21:15:01 +0000 Original-Received: (at 36837) by debbugs.gnu.org; 2 Aug 2019 21:14:42 +0000 Original-Received: from localhost ([127.0.0.1]:57924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htess-0004Md-5i for submit@debbugs.gnu.org; Fri, 02 Aug 2019 17:14:42 -0400 Original-Received: from mail-io1-f41.google.com ([209.85.166.41]:36267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htesq-0004MR-6P for 36837@debbugs.gnu.org; Fri, 02 Aug 2019 17:14:40 -0400 Original-Received: by mail-io1-f41.google.com with SMTP id o9so51554025iom.3 for <36837@debbugs.gnu.org>; Fri, 02 Aug 2019 14:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=419tY8zFf1jVZkBTuB32y/1gh1ad78sldaMXVO7v97I=; b=bv9gjRDHrdgvynyXK8BbfppDcxMPppZh/VSUd0mlL4PUEZB+3a7u3Hkg1gC8wA9lpl jBQR5QLLq+kAvVI4apGbqFGUi++4NPSVqM+ZDDDCJKpT/LN+o5gFxEbHgdb/pHM3y03J rjWT/gQQzeAIWuCQSPh12hlYiOebaEGXPYj4bUD+UVt86lWSMKkBbOaSVVD3/WHY4WPY byNaFAeDYfcdkWKUR/G3vGgPS92h8OCkcxXlkUO4E9wWaEF1RwGSbA+o3ZaDk1m948Fm ovHCtAUi3LgEIZOlphWwR1Wa2g8D+7wBT7OM3J3p7VtD83o3g3ZKBvWaoVA/agN++f4X H2Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=419tY8zFf1jVZkBTuB32y/1gh1ad78sldaMXVO7v97I=; b=KBXxzodlBEWzNZMv9w+1FR/OmCYry7Yq3k5Y3a8cTjFkuf+KMSXXgy1bfQ2C+K+AeV 16js6ryR/LXIJ6Jw5lMtA+sWF++waZVWkDnR4nIrpiG6TJrn+j6+rfoF0THTF8O3tYds lv+h92Aj8Ao+Y7n1jkYg/oVNUVugIvo7jWHRdgKE8W3bE/xf4VvfaEpEl3UqPr1N0Whv egZuPeddrmjZfx1LQQ7pLZrsG7PUAvEQt7jh+QbI2X1g5SlRN+Ke9gVl0GQBODWuyP/f 49Hz4k6/jZ2GMVrpAi2ShRoUPGVhX/JDyxxBVzHkTvg47hxsuxEOEMXLprMDwdDR3hsE fppg== X-Gm-Message-State: APjAAAX4YG25KhfUidTOK5n1X1KshhJ6PWh7y6mq9pfRpG/ROpAZ7oy5 JLlp7zeOvVEAqfMjyK9hYKE= X-Google-Smtp-Source: APXvYqw7phcC+fikYAF3FVU0sw69HQr2TE4pBcprpdOTbr+cOInybA3x92GV/dLkUiMoU6vhF2I8Fw== X-Received: by 2002:a5d:994b:: with SMTP id v11mr81453476ios.165.1564780474621; Fri, 02 Aug 2019 14:14:34 -0700 (PDT) Original-Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.51.196]) by smtp.gmail.com with ESMTPSA id y17sm57678586ioa.40.2019.08.02.14.14.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Aug 2019 14:14:34 -0700 (PDT) In-Reply-To: <87blx7cpwf.fsf@gmail.com> ("=?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?="'s message of "Fri, 02 Aug 2019 21:45:36 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164401 Archived-At: =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec writes: > On Fri, 02 Aug 2019 15:28:01 -0400 > Noam Postavsky wrote: > >> It sounds like you are confusing defcustom settings with file-local [...] > > I'm not sure what you mean. I think it was me who was confused about what you meant. See the last section of this message. > Whether a library will need to be loaded or not depends on whether the > feature required by a particular hook or variable value (e.g. in case > of "eval" file-local variables) is already provided or not. > > In this particular case, if you follow OP's recipe (emacs -Q), > `whitespace-mode' is autoloaded, so the whitespace library will be > loaded only at the point the hook is run. You are right that, strictly speaking, whitespace.el does get loaded while opening the file (via running conf-mode-hook). But if I modify the OP's recipe by adding a require: (require 'whitespace) (setq whitespace-line-column nil) (add-hook 'conf-mode-hook (lambda () (whitespace-mode))) I get the same result. So I don't think the autoloading is relevant. > Really, isn't this how we all customize all kinds of variables? In your > init file you have (setq some-var some-value) (or the equivalent > customize forms if you're into that) even before the relevant feature is > provided (by loading the library), and the defvar form in the pertinent > library will of course not clobber the user-specified value. Unless I'm > missing something, it works the same way if you `hack-local-variables' > before loading the whitespace.el library in this particular case. Oh, the digression into the defvars/defcustom thing was just an analogy? Ignore my previous message then. If I've now understood correctly, you are assuming the file-local setting is a kind of default setting, like (defvar foo DEFAULT) which you expect to override from your init file. But the intended usage is that you do: (setq some-var some-value) in your init file as a global setting, (add-hook some-mode-hook (lambda () (setq some-var another-value)) as a mode-specific seting, and -*- some-var: yet-another-value -*- as a file-specific setting. So they go in that order: global may be overridden by mode-specific, which may be overriden by file-specific.