all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dima Kogan <lists@dima.secretsauce.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Can we expand the valid location of "Local Variables" ?
Date: Tue, 10 Mar 2020 16:44:44 -0700	[thread overview]
Message-ID: <87mu8nbwr7.fsf@dima.secretsauce.net> (raw)
In-Reply-To: <jwvo8t3x59v.fsf-monnier+emacs@gnu.org>

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Probably we'd want to make this into a variable? And the default maybe
>> should be higher than 3000?
>
> I don't like having this 3000 hard-coded everywhere, so making
> a variable makes sense.
>
> But encouraging large "Local Variables" blocks is a bad idea, IMO, so
> I'd keep it at 3000 and I wouldn't care to document the var either.
> I'd even be happy with a "--" in its name.

OK. I can write such a patch. Is there an upside to not documenting it?
If we REALLY don't want people touching this variable, then why not
leave the hardcoded 3000?


>> 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.
>
> Of course, you can use a short
>
>     eval: (progn (re-search-backward "^(progn ;;local-config") (eval (read (current-buffer))))
>
> and then put an arbitrarily long Elisp chunk anywhere else in the buffer
> with a leading `(progn ;;local-config`.

Oof. I COULD do that, but that feels like it makes an already-ugly thing
even uglier. I sent a separate email to the org mailing list about maybe
upstreaming some of the advices, but the general idea doesn't seem
unreasonable to me: we already allow a block to define some custom
variables, so customizing the behavior of some functions doesn't seem
crazy.



  reply	other threads:[~2020-03-10 23:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 20:56 Can we expand the valid location of "Local Variables" ? Dima Kogan
2020-03-10 21:39 ` Stefan Monnier
2020-03-10 23:44   ` Dima Kogan [this message]
2020-03-11  2:01     ` Stefan Monnier
2020-03-22 23:08   ` Dima Kogan
2020-03-23  8:25     ` Robert Pluim
2020-03-23 14:17       ` Eli Zaretskii
2020-03-23 15:28         ` Robert Pluim
2020-03-23 15:54           ` Eli Zaretskii
2020-03-23 17:03             ` Dima Kogan
2020-03-23 17:24             ` Stefan Monnier
2020-03-24  2:20           ` Richard Stallman
2020-03-12  2:26 ` Richard Stallman
2020-03-14  5:54   ` Steve Youngs
2020-03-14  7:07     ` Stefan Monnier
2020-03-15  3:08     ` Richard Stallman
2020-03-15  6:41       ` Steve Youngs
2020-03-16  3:36         ` Richard Stallman
2020-03-23 15:56 ` Yuri Khan
2020-03-23 16:55   ` Dima Kogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mu8nbwr7.fsf@dima.secretsauce.net \
    --to=lists@dima.secretsauce.net \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.