emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Local variables in org files


From: Nick Dokos
Subject: Re: [O] Local variables in org files
Date: Thu, 09 Jan 2014 11:05:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Michael Albinus <address@hidden> writes:

> Hi,
>
> I'm trying to save the result of "M-x debbugs-org" into a file (this is
> a TODO list). For further handling, also some buffer local variables
> must survive. Therefore, I append at the very end of that file something
> like this:
>
> * Local Variables
> ** Local Variables:
> ** eval: (debbugs-org-mode 1)
> ** debbugs-org-ids: (1 2 3)
> ** End:
>
> This has the nice effect, that those variables do not disturb in
> overview mode, because they look like
>
> * Local Variables...
>
> Being invisible would be even better, but so what.
>
> Unfortunately, the value of debbugs-org-ids could be very loooong,
> exceeding the 3000 chars limit the "Local Variables:" section size is
> allowed to be in Emacs. So I must rearrange things like this:
>
> * Local Variables
> ** debbugs-org-ids: (1 2 3)
> ** Local Variables:
> ** eval: (debbugs-org-mode 1)
> ** debbugs-org-ids: (access-the-value-above)
> ** End:
>
> Is there some functionality in org I could use implementing
> `access-the-value-above'? It is org structure, so I'm hoping there is an
> easy way to access a given node with a well defined position.
>
> Or maybe there is already a clever way storing local variables in an org
> file, which I'm not aware of.
>
> Thanks, and best regards, Michael.

Not sure if there are any limits for the top style but maybe you could
combine the two styles of local variables - maybe:

--8<---------------cut here---------------start------------->8---
# -*- foo: (1 2 3 4) -*-
* foo

#+BEGIN_SRC elisp
debbugs-org-ids
#+END_SRC

#+RESULTS:
| 1 | 2 | 3 | 4 |

* COMMENT Local variables

** Local Variables:
** eval: (setq debbugs-org-ids foo)
** End:
--8<---------------cut here---------------end--------------->8---

Nick





reply via email to

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