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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24415 in the body.
You can then email your comments to 24415 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24415; Package emacs. (Sun, 11 Sep 2016 21:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrea Rossetti <andrea.rossetti <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 11 Sep 2016 21:55:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrea Rossetti <andrea.rossetti <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4; issue with big file variable
Date: Sun, 11 Sep 2016 23:52:56 +0200
[Message part 1 (text/plain, inline)]
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?

  Thanks for any hint or clarification, kindest regards.

Andrea

In GNU Emacs 24.4.1 (x86_64-w64-mingw32)
of 2014-10-21 on KAEL
Windowing system distributor `Microsoft Corp.', version 6.1.7600
Configured using:
`configure --prefix=/z/emacs --host=x86_64-w64-mingw32
--target=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --with-wide-int
--with-jpeg --with-xpm --with-png --with-tiff --with-rsvg --with-xml2
--with-gnutls --with-xft --with-sound=yes --with-file-notification=yes
--without-dbus --without-imagemagick 'CFLAGS=-Ofast
-fomit-frame-pointer -funroll-loops -g0 -pipe' 'CPPFLAGS=-DNDEBUG
-DDBUS_STATIC_BUILD' 'LDFLAGS=-static-libgcc -static-libstdc++ -static
-s -Wl,-s''

Important settings:
  value of $LANG: ITA
  locale-coding-system: cp1252
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24415; Package emacs. (Mon, 12 Sep 2016 08:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 24415 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Andrea Rossetti <andrea.rossetti <at> gmail.com>
Cc: 24415 <at> debbugs.gnu.org
Subject: Re: 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24415; Package emacs. (Mon, 12 Sep 2016 12:23:01 GMT) Full text and rfc822 format available.

Message #11 received at 24415 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: Andrea Rossetti <andrea.rossetti <at> gmail.com>, 24415 <at> debbugs.gnu.org
Subject: Re: bug#24415: 24.4; issue with big file variable
Date: Mon, 12 Sep 2016 08:23:04 -0400
Stephen Berman <stephen.berman <at> gmx.net> writes:

>
> 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.

It's documented in the manual, (emacs) Specifying File Variables

       Apart from using a `-*-' line, you can define file local variables
    using a "local variables list" near the end of the file.  The start of
    the local variables list should be no more than 3000 characters from
    the end of the file, and must be on the last page if the file is
    divided into pages.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24415; Package emacs. (Mon, 12 Sep 2016 13:09:02 GMT) Full text and rfc822 format available.

Message #14 received at 24415 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: npostavs <at> users.sourceforge.net
Cc: Andrea Rossetti <andrea.rossetti <at> gmail.com>, 24415 <at> debbugs.gnu.org
Subject: Re: bug#24415: 24.4; issue with big file variable
Date: Mon, 12 Sep 2016 15:07:58 +0200
On Mon, 12 Sep 2016 08:23:04 -0400 npostavs <at> users.sourceforge.net wrote:

> Stephen Berman <stephen.berman <at> gmx.net> writes:
>
>>
>> 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.
>
> It's documented in the manual, (emacs) Specifying File Variables
>
>        Apart from using a `-*-' line, you can define file local variables
>     using a "local variables list" near the end of the file.  The start of
>     the local variables list should be no more than 3000 characters from
>     the end of the file, and must be on the last page if the file is
>     divided into pages.

Mea culpa; I looked there before posting but obviously not closely
enough.

Steve Berman




Added tag(s) notabug. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 12 Sep 2016 17:16:02 GMT) Full text and rfc822 format available.

Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Mon, 16 Sep 2019 03:22:02 GMT) Full text and rfc822 format available.

Notification sent to Andrea Rossetti <andrea.rossetti <at> gmail.com>:
bug acknowledged by developer. (Mon, 16 Sep 2019 03:22:02 GMT) Full text and rfc822 format available.

Message #21 received at 24415-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24415-done <at> debbugs.gnu.org
Subject: Re: bug#24415: 24.4; issue with big file variable
Date: Mon, 16 Sep 2019 05:21:06 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> tag 24415 + notabug
> thanks

This was tagged notabug in 2016, but never closed.  Closing now.

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 14 Oct 2019 11:24:11 GMT) Full text and rfc822 format available.

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

Previous Next


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