From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Can we expand the valid location of "Local Variables" ? Date: Wed, 11 Mar 2020 22:26:12 -0400 Message-ID: References: <87r1y0apzm.fsf@secretsauce.net> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="57660"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Dima Kogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 12 03:26:42 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jCDYY-000EtR-Dp for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Mar 2020 03:26:42 +0100 Original-Received: from localhost ([::1]:60672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCDYX-0007kT-G3 for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Mar 2020 22:26:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41898) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCDY5-0007Ki-Om for emacs-devel@gnu.org; Wed, 11 Mar 2020 22:26:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jCDY5-0006Np-Jy; Wed, 11 Mar 2020 22:26:13 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1jCDY4-0001El-Kb; Wed, 11 Mar 2020 22:26:12 -0400 In-Reply-To: <87r1y0apzm.fsf@secretsauce.net> (message from Dima Kogan on Tue, 10 Mar 2020 13:56:13 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245481 Archived-At: [[[ 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)