Subject: bug#24904: 25.1; whitespace-mode ignores file- and dir-locals

From: Roman Decker <[email-masked]>
Date: Tue, 08 Nov 2016 18:59:19 +0000

whitespace-mode seems to ignore file- and dir-locals when enabled
via `global-whitespace-mode`.

To reproduce:

1. Create a file with the following contents (use everything between the
   dashes, the dashes themselves are not part of the file):
-----------------------------test-file.txt--------------------------------------
Only open this file after global-whitespace-mode was enabled.

This is where highlighting of the line should start if everyhing went as
expected: right here  ---->|<----
However, if whitespace-mode incorrectly used the default of 80: right here
---->|<----

;; Local Variables:
;; whitespace-line-column: 100
;; End:
--------------------------------------------------------------------------------

Then:

2. Run `emacs -Q`

3. Execute the following commands from the scratch buffer:

(setq whitespace-style '(face lines-tail))
(global-whitespace-mode)

4. Open the created file using `M-x find-file test-file.txt`

whitespace-mode will highlight long lines starting at 80 characters
instead of 100, which is what the file-local variable says.

If whitespace-mode is enabled locally, after the file-local variables
are set, everything works as expected.

The same issue is explained here:
http://emacs.stackexchange.com/questions/7743/whitespace-mode-ignores-whitespace-line-column

I'm merely referring it to this bugtracker.