From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Can we expand the valid location of "Local Variables" ? Date: Mon, 23 Mar 2020 22:56:54 +0700 Message-ID: References: <87r1y0apzm.fsf@secretsauce.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="122900"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Dima Kogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 23 16:57:59 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 1jGPSg-000VqI-OR for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Mar 2020 16:57:58 +0100 Original-Received: from localhost ([::1]:36004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGPSf-0000A4-Px for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Mar 2020 11:57:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59441) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGPRs-0007ha-Ea for emacs-devel@gnu.org; Mon, 23 Mar 2020 11:57:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGPRr-0003n3-92 for emacs-devel@gnu.org; Mon, 23 Mar 2020 11:57:08 -0400 Original-Received: from mail-ua1-x935.google.com ([2607:f8b0:4864:20::935]:44590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGPRr-0003mI-4W for emacs-devel@gnu.org; Mon, 23 Mar 2020 11:57:07 -0400 Original-Received: by mail-ua1-x935.google.com with SMTP id r47so5114339uad.11 for ; Mon, 23 Mar 2020 08:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uhoednZtkCoTa+9WEOJGRSMmqFIm6IKO5tUjMcPvbPs=; b=MwJWLYVl9/JKnUtjTE+mfxwwReSSmyg64k4WZetPaHKbKiU6egE8LBb9Snz1FsuFp8 +RqIUdek5ntY7frI7VWEx5lS422irvWVjsMaTd9D/HWrxXAVKh/vPo+F92u1rJ44RSyB r1s7SFkzqypAd2eJP/9QlBVlJ7mXeDChfCCp94hxpi2q95ENlLi+LXT48j/43vnJAs1n RMiBooU5yKXW8ogL0PEMbGx5SClVOCgeUHuuMrHpEyki5BM4etZTtbgIXb8NNbZ4a3Is KfXH0kVMwUOL7+Wbu2XqB9FqtqrWRKxHqHh5GMIqcJ25x881hYUWpJTeD8LWhHZNOIJl /0NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uhoednZtkCoTa+9WEOJGRSMmqFIm6IKO5tUjMcPvbPs=; b=JxSltyNkcZGh0UGftig/V2DxhbJATmEdKbvcpR038SQ86MqTMh0OGUl/9jiGd20O92 LlStCs6+d7fIyZ8/6jw0j6qixcbt10rLI4QxnAAoE1MeLMVXujCO85JePmXG6Ab6XkEW dq+V8qWSJs6G2UJXRUEfUwQVoPtnHstl/LM9OgRlIKh+MkiiIVa/0EIlm4MXkFo4SE8O bTbBhaMX/ShUkioDDhM5phlkv+WlblONmoUNRPFDaj0YYr9vnNmEeP8r6S/pFMdIdnWJ oHnoTZpy4F7KikQh66zUhj2Dp5DKGATJLtkWC22X8bjGIvQt+KeSWid3/qDqu8FHcbn2 K8aQ== X-Gm-Message-State: ANhLgQ22AdzCcllm/TOxrJWyYTdrPmclLWQpR+zONlSSFdMHP26+4aRk ztPNDeCfR6YKwkqtj2YB7i4KNzk350aCizC/51N4VQ== X-Google-Smtp-Source: ADFU+vsPkHlSm1C/EF6TtkFITEjDav3ISj+nFoZgdtN7hjHDa/uXp5OwVQyIurpScPYP8Q1sn/3yDe1OBdBk3vjMaic= X-Received: by 2002:ab0:6796:: with SMTP id v22mr14444081uar.41.1584979025410; Mon, 23 Mar 2020 08:57:05 -0700 (PDT) In-Reply-To: <87r1y0apzm.fsf@secretsauce.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::935 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:245721 Archived-At: Going back to the original question: On Wed, 11 Mar 2020 at 03:56, Dima Kogan wrote: > Currently we can specify buffer-local variables in a "Local Variables" > stanza at the end of a buffer: > > https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables > > For efficiency reasons, emacs doesn't look for this stanza in the entire > buffer, but only scans the last 3000 bytes. > > The use case where I hit this was in an .org file that was defining a > presentation where I needed to control the export with an eval: (progn > ...) block. Org wasn't doing quite what I needed it to, so the block had > some advice definitions in it, and that pushed the thing over the 3000 > byte limit. Maybe your use case could be solved by using directory-local variables? Alternatively, maybe the body of that eval block could become a defun somewhere in your private configuration, and then the eval block would shrink to a single function call? Maybe you could even always execute that block for Org mode buffers by adding it to org-mode-hook?