emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Is it generally better practice to specify local variables at th


From: Marco Wahl
Subject: Re: [O] Is it generally better practice to specify local variables at the first line for Org files?
Date: Wed, 05 Oct 2016 08:40:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Hi Jorge!

> Hi.  In most of my Emacs files, I set any file local variables using a local
> variables list near the end of the file.  However I just realized a pitfall.
> Emacs, according to its manual, only recognizes this local variables list if
> its location fulfills two criteria:
> 1. It starts no more than 3000 characters from the end of the file.
> 2. It is on the last page if the file is divided into pages.

Yes.

> This means that if I refile some Org subtree to another Org file, and the
> refile target is below the local variables list (e. g. if I refile to the top
> level, so that Org chooses the end of the file) then the local variables list
> may start failing one of the criteria and thus silently stop working.  There
> may be other problematic scenarios.

Yes.

> Therefore it seems that, for Org files, it is good practice to avoid this
> pitfall by specifying any file local variables via the other method, i.e. on
> the first line.  I ask for confirmation that this is a general Org Mode good
> practice before I adopt it for all my existing Org files and any future ones.

I have the same issue.  Currently I try to have an extra eye on the
bottommost org tree.  I also use an extra tag to mark the org tree which
should be bottommost.  I also use the idea stated in
http://www.mail-archive.com/address@hidden/msg106940.html which sorts
the wanted org tree to the bottom when sorting.

For me this works reasonably well.

When you put the local variables to the top of the file you are on the
save side AFAICT.

I try to avoid too much information in the first line.  I prefer to have
the variables at the bottom.


Best regards,
-- 
Marco




reply via email to

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