GNU bug report logs - #24415
24.4; issue with big file variable

Previous Next

Package: emacs;

Reported by: Andrea Rossetti <andrea.rossetti <at> gmail.com>

Date: Sun, 11 Sep 2016 21:55:01 UTC

Severity: minor

Tags: notabug

Found in version 24.4

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Andrea Rossetti <andrea.rossetti <at> gmail.com>
Cc: 24415 <at> debbugs.gnu.org
Subject: bug#24415: 24.4; issue with big file variable
Date: Mon, 12 Sep 2016 10:45:46 +0200
On Sun, 11 Sep 2016 23:52:56 +0200 Andrea Rossetti <andrea.rossetti <at> gmail.com> wrote:

> Hi guys,
>
>   if a file variable is a list longer than a certain size, then it's
> ignored on file loading. Test case follows:
>
> - start "emacs -Q"
> - M-: (add-file-local-variable 'v1 (make-list 2000 1)) RET
> - C-x C-w example01.el RET
> - close Emacs and restart "emacs -Q"
> - C-x C-f example01.el RET
> - bad behaviour: at this point a confirm message to load the file
>   variable should have appeared ("... safe variables blah blah... do you
>   want to apply it? y/n/!")  but it does not, and the variable is not
>   initialized
>
> Further observations:
>
>   - if you replay this same test with a shorter v1, for example lowering
>     "2000" to "1000", then the behaviour will be fine: the confirm
>     message will appear and inspection of the variable will show correct
>     value.
>
>   - it doesn't seem to depend on the max length of a single text line:
>     you get the error even when you re-run a similar test that saves two
>     file-local variables v1 and v2, each being "(make-list 1000 1)".
>
>   Does the test reproduce in the same way on your workstation? Do you
> think it's a bug, or am I just hitting some well-known hard limit?

It's a hard limit in hack-local-variables:

	;; Look for "Local variables:" line in last page.
	(save-excursion
	  (goto-char (point-max))
	  (search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
			   'move)

I don't know how well-known this is; AFAICT it's not documented.

Steve Berman




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

Previous Next


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