From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= 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 23:50:19 +0200 Message-ID: <877e7vck4k.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> <85y30b2rt1.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="248828"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Notmuch/0.29.1 (https://notmuchmail.org) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: tastytea , 36837@debbugs.gnu.org, Andreas Schwab To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 02 23:51:18 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 1htfSF-0012Y6-9C for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Aug 2019 23:51:15 +0200 Original-Received: from localhost ([::1]:37722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htfSD-0001cw-NO for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Aug 2019 17:51:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51341) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htfS8-0001cF-93 for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 17:51:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htfS6-0006rA-AU for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 17:51:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htfS2-0006q7-JO for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 17:51:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1htfS2-0005Kd-Gw for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 17:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Aug 2019 21:51:02 +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.156478262820437 (code B ref 36837); Fri, 02 Aug 2019 21:51:02 +0000 Original-Received: (at 36837) by debbugs.gnu.org; 2 Aug 2019 21:50:28 +0000 Original-Received: from localhost ([127.0.0.1]:57941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htfRU-0005JY-31 for submit@debbugs.gnu.org; Fri, 02 Aug 2019 17:50:28 -0400 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:54641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htfRT-0005JM-33 for 36837@debbugs.gnu.org; Fri, 02 Aug 2019 17:50:27 -0400 Original-Received: by mail-wm1-f43.google.com with SMTP id p74so69224604wme.4 for <36837@debbugs.gnu.org>; Fri, 02 Aug 2019 14:50:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=wrZb9QlsAvXGnHELUnt7q6CUMn3EtEYU5f4TYzsvQmQ=; b=k1ef68Oh4qHLdS4SCwOp1clTY/Jmn5/ex1neYqa1tAWsB61r9zkH1aqvGU7J7b970H bHhXhWVivCx8TLe5YH/3z0aUXWz50k3DDi+yPwhXqndA9v3vUZw01HMvRB7gHVk4RH7h 4rK5fSJy+LuROrSoBhLcr5uPQ+zZIw1cdNjMyccOvx/M3QhWzvj0mz9MM1gUtPixCifh 18FKrvMuDY0fNqszAWJ+2aop08UCgaaqFqrAnU41p7SbBlzKQeYcO2irzDNxOlBF8uTR 3LpxOwrsesyOFAXTwc5TfXT/aYCUQkZquJBhWDBgGk1pPu8wPrLjoc/AXl6sSJ2lhOP/ uNAA== 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:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=wrZb9QlsAvXGnHELUnt7q6CUMn3EtEYU5f4TYzsvQmQ=; b=W/thy80D/6iNT4wJactQxwWyttO865XH3PVUAksnykO04GgDzAlZ5XgTDW3QT/qr8R OWsk6n4wS95TyTJqsD2mfgnWtSl2QD7MtjeuE54M0+dujdJbdIpooPkFeRP5PIHM0ww7 fe8ECNAA+ZdYf9a+IHwf4FvKkH30Itaa4iTEoakzkxFZLn47Ut1dDU3tzshy9UDtb9IP QIXHgaJkE9vbi0mf2R3RWEx8HsPyj5cnE9flL0tcF34sbTFm8xb/FYOatBVdLrJ14jhr gG3/RX8ADq6kDcgkTmgPbJdhfJG5og9YOijCKWiz0IsXuD76emp/B52KHsCWVcChq0el skMQ== X-Gm-Message-State: APjAAAXrj2Jd8bBEC89HCIDaWbT/iiSVSAlJDj7eFUEZPa9MDNW1U379 n2m/OMjaD8Ze/jT70fsRcyo= X-Google-Smtp-Source: APXvYqzJ+mpkvnUSUFt0+We/uFrdYW+NJip5dVZ7+qSLh69O8oym/YykokNPgSqBIsDeLd2xBhyhdQ== X-Received: by 2002:a1c:acc8:: with SMTP id v191mr5973572wme.177.1564782621253; Fri, 02 Aug 2019 14:50:21 -0700 (PDT) Original-Received: from localhost ([185.112.167.114]) by smtp.gmail.com with ESMTPSA id v23sm66730157wmj.32.2019.08.02.14.50.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 14:50:20 -0700 (PDT) In-Reply-To: <85y30b2rt1.fsf@gmail.com> 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:164403 Archived-At: On Fri, 02 Aug 2019 17:14:34 -0400 Noam Postavsky wrote: > (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. Yes, but OP's case is a bit more subtle, as I described in my very first e-mail. Maybe a more visual representation will help. Here's what happens (simplified) when visiting test.cfg during OP's recipe: 1. fill-column is at default value 2. `run-mode-hooks' is called 3. `conf-mode-hook' is run 4. `whitespace-mode' is called 5. `whitespace-color-on' is called, which sets up whitespace-font-lock-keyw= ords, still with the default value of fill-column 6. `hack-local-variables' is called to parse and apply file-local settings 7. fill-column is set to 200 If what's really intended is that file-local settings prevail as much as possible, this is a failure. That's why I'm wondering whether reversing the order wouldn't actually work better, for reasons I detailed in the reply to Andreas. As this case illustrates, libraries often do all kinds of setup during load or mode activation, so unless the relevant settings are applied before that, they don't really take the desired effect. Sure, if the order _was_ reversed and the mode hooks run _after_ `hack-local-variables', they could override file-local variable settings, but I'm wondering how likely such conflicts really are or if that's really a bad thing at all, given typical usage. --=20 =C5=A0t=C4=9Bp=C3=A1n