GNU bug report logs - #36837
26.2; whitespace-mode: whitespace-line-column is not set to local fill-column

Previous Next

Package: emacs;

Reported by: tastytea <tastytea <at> tastytea.de>

Date: Mon, 29 Jul 2019 14:40:02 UTC

Severity: minor

Found in version 26.2

Fixed in version 28.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: tastytea <tastytea <at> tastytea.de>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: 36837 <at> debbugs.gnu.org
Subject: bug#36837: 26.2; whitespace-mode: whitespace-line-column is not set to local fill-column
Date: Sat, 3 Aug 2019 09:50:56 +0200
[Message part 1 (text/plain, inline)]
On Fri, 02 Aug 2019 16:57:37 +0200 
Štěpán Němec <stepnem <at> gmail.com> wrote:

> On Mon, 29 Jul 2019 11:17:56 +0200
> tastytea <at> tastytea.de wrote:
> 
> > whitespace-mode will highlight long lines starting at 70 characters
> > instead of what fill-column is set to, if whitespace-line-column is
> > set to nil.
> > […]
> 
> Yes, unfortunately, file-local variables are only setup (via
> `hack-local-variables') _after_ the mode hooks are run (cf.
> `run-mode-hooks'), so `whitespace-color-on' still sees the original
> `fill-column' the first time.

Maybe whitespace-mode could watch fill-column for changes, at least
until the file-local variables are loaded?
There is also the possibility that fill-column is changed afterwards by
the user, but I guess that's not too common…

> You can work around this by hacking^W having `hack-local-variables'
> also run in your hook function:
> 
>  (add-hook 'conf-mode-hook 
>            (lambda () (hack-local-variables) (whitespace-mode))

Thanks, that's a better workaround than my solution of setting
whitespace-line-column and restarting whitespace-mode in
find-file-hook. :-)

Kind regards, tastytea
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 5 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.