emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-archive-save-context-info as local variable
@ 2014-11-21 18:00 Jorge A. Alfaro-Murillo
  2014-11-21 20:57 ` Kyle Meyer
  0 siblings, 1 reply; 3+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-11-21 18:00 UTC (permalink / raw)
  To: emacs-orgmode

Hi list,

I am planning to collaborate on a project with another org-mode 
user (such a joy). For each org file we want to keep an archive as 
well in the git repository. With this work flow it does not make 
sense to keep track of the file property in 
`org-archive-save-context-info', since it will be different 
depending on the location of the repository in each computer. And 
since I did not want force a global configuration for this 
variable, I tried to add the variable as local in the first line 
of the file:

# -*- mode: org; org-archive-save-context-info: (time olpath 
      todo); -*- 

This sets the variable as local fine, but when I call 
`org-archive-subtree', it seems like this command still uses the 
global value of `org-archive-save-context-info' and keeps 
information on the file location in the archive.

Does someone know why setting this variable as local does not work 
with `org-archive-subtree'? Is there another approach for setting 
org-mode variables on a per file basis?

Best,

-- 
Jorge.

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

* Re: org-archive-save-context-info as local variable
  2014-11-21 18:00 org-archive-save-context-info as local variable Jorge A. Alfaro-Murillo
@ 2014-11-21 20:57 ` Kyle Meyer
  2014-11-21 20:58   ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 3+ messages in thread
From: Kyle Meyer @ 2014-11-21 20:57 UTC (permalink / raw)
  To: Jorge A. Alfaro-Murillo; +Cc: emacs-orgmode

jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) wrote:
[...]
> Does someone know why setting this variable as local does not work with
> `org-archive-subtree'?

The buffer-local value doesn't continue to shadow the global value when
org-archive-subtree sets the buffer to the archive file.

--
Kyle

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

* Re: org-archive-save-context-info as local variable
  2014-11-21 20:57 ` Kyle Meyer
@ 2014-11-21 20:58   ` Jorge A. Alfaro-Murillo
  0 siblings, 0 replies; 3+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-11-21 20:58 UTC (permalink / raw)
  To: emacs-orgmode

Kyle Meyer writes:

> The buffer-local value doesn't continue to shadow the global 
> value when org-archive-subtree sets the buffer to the archive 
> file. 

Thanks, Kyle! That is the reason. Setting the local variable in 
the archive file as well does the trick.

-- 
Jorge.

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

end of thread, other threads:[~2014-11-21 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-21 18:00 org-archive-save-context-info as local variable Jorge A. Alfaro-Murillo
2014-11-21 20:57 ` Kyle Meyer
2014-11-21 20:58   ` Jorge A. Alfaro-Murillo

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).