emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can we expand the valid location of "Local Variables" ?


From: Richard Stallman
Subject: Re: Can we expand the valid location of "Local Variables" ?
Date: Wed, 11 Mar 2020 22:26:12 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > For efficiency reasons, emacs doesn't look for this stanza in the entire
  > buffer, but only scans the last 3000 bytes. This is documented.

The reasons for this limit were (1) to avoid needing to search the
whole of a large file, and (2) to make it quick and easy for Emacs or
a user to determine that a file does NOT have local variables.

Searching a little further than 3000 would not have cost significant
time even in 1991.  But if we don't stop at 3000 bytes, how far should
we go?  3500?  4000?  40,000,000?  Even today that could be slow, for
large files.

A solution that occurs to me is to define something to put in a
local variable list that says, "Search further back!"
It could look like this:

    Local Variables:
    Chars further back: 20000
    End:

This way, you would see quickly that the file does have a local
variable list, and where to look to find it.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]