all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Ignore a Local Variables list
@ 2024-12-21 18:07 Joseph Turner
  2024-12-22  9:06 ` Tassilo Horn
  2024-12-24 14:44 ` Max Nikulin
  0 siblings, 2 replies; 4+ messages in thread
From: Joseph Turner @ 2024-12-21 18:07 UTC (permalink / raw)
  To: Emacs Devel Mailing List; +Cc: Max Nikulin, Bohong Huang

As described in this Org mailing list thread:

https://yhetil.org/orgmode/dc5901c1-720a-4bec-9611-c62f9cfee45a@gmail.com/T/#t

I'm looking to ignore a Local Variables list (in an Org file).

Current solutions:

Add a form feed character (with C-q C-l) below the Local Variables list.
This works, but the form feed makes the document less portable,
negatively affecting readability in other programs like Thunderbird.
Also, it breaks certain Org workflows, such as exporting to odt.

Another solution is to put an empty Local Variables list *above* the one
I want to ignore.  This solution seems fragile, since Emacs only looks
within the last 3000 characters for a Local Variables list.

Any other suggestions?

Thank you!

Joseph



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ignore a Local Variables list
  2024-12-21 18:07 Ignore a Local Variables list Joseph Turner
@ 2024-12-22  9:06 ` Tassilo Horn
  2024-12-22 23:55   ` Joseph Turner
  2024-12-24 14:44 ` Max Nikulin
  1 sibling, 1 reply; 4+ messages in thread
From: Tassilo Horn @ 2024-12-22  9:06 UTC (permalink / raw)
  To: Joseph Turner; +Cc: Emacs Devel Mailing List, Max Nikulin, Bohong Huang

Joseph Turner <joseph@breatheoutbreathe.in> writes:

> Any other suggestions?

Have a look at the docstring of the function `hack-local-variables'
which cites `inhibit-local-variables-regexps' which you could extend
with regexps matching only the file names whose local variables you want
to ignore.

HTH,
Tassilo



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ignore a Local Variables list
  2024-12-22  9:06 ` Tassilo Horn
@ 2024-12-22 23:55   ` Joseph Turner
  0 siblings, 0 replies; 4+ messages in thread
From: Joseph Turner @ 2024-12-22 23:55 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: Emacs Devel Mailing List, Max Nikulin, Bohong Huang

Tassilo Horn <tsdh@gnu.org> writes:

> Joseph Turner <joseph@breatheoutbreathe.in> writes:
>
>> Any other suggestions?
>
> Have a look at the docstring of the function `hack-local-variables'
> which cites `inhibit-local-variables-regexps' which you could extend
> with regexps matching only the file names whose local variables you want
> to ignore.

Thank you!

Joseph



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ignore a Local Variables list
  2024-12-21 18:07 Ignore a Local Variables list Joseph Turner
  2024-12-22  9:06 ` Tassilo Horn
@ 2024-12-24 14:44 ` Max Nikulin
  1 sibling, 0 replies; 4+ messages in thread
From: Max Nikulin @ 2024-12-24 14:44 UTC (permalink / raw)
  To: Joseph Turner, Emacs Devel Mailing List; +Cc: Bohong Huang

On 22/12/2024 01:07, Joseph Turner wrote:
> Another solution is to put an empty Local Variables list *above* the one
> I want to ignore.  This solution seems fragile, since Emacs only looks
> within the last 3000 characters for a Local Variables list.

Currently it is not specified whether first or last local variables 
section should be taken if several ones are found at the end of the 
document. I think, picking the last one will allow to suppress local 
variables examples above using purely *plain text* "markup" without 
pitfalls with control characters.

"First pattern within last 3000 characters" is a quite peculiar rule to 
my taste.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-24 14:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-21 18:07 Ignore a Local Variables list Joseph Turner
2024-12-22  9:06 ` Tassilo Horn
2024-12-22 23:55   ` Joseph Turner
2024-12-24 14:44 ` Max Nikulin

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.