emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Darlan Cavalcante Moreira <darcamo@gmail.com>
To: Darlan Cavalcante Moreira <darcamo@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Per-file attachment directories
Date: Wed, 21 Sep 2011 22:34:55 -0300	[thread overview]
Message-ID: <4e7a90c4.4216ec0a.3475.fffff114@mx.google.com> (raw)
In-Reply-To: <20110921182925.GA6055@kenny.fritz.box>


I tested here and it didn't work for the bad files as you said. However,
putting the "Local Variables" at the end of the file worked. In fact, I
have always written local variables like this at the end of the file,
although I don't remember if this was because of a restriction of just
because I'm used to.

A good tip is to put them inside a "* File Local Variables" heading so that
they don't stay inside another heading. You can set the noexport tag to
avoid exporting this heading.

Also, you can use the function add-file-local-variable to add a new local
variable. Notice how this function put the local variables at the end of
the file.

--
Darlan Cavalcante Moreira

At Wed, 21 Sep 2011 20:29:25 +0200,
Viktor Rosenfeld <listuser36@googlemail.com> wrote:
> 
> Hi,
> 
> this works for simple files but breaks silently for my org files. I've
> narrowed it down to two seemingly unrelated parts and attached two
> examples below.
> 
> - good1.org contains an entry with two tables. When I visit the file,
>   Emacs asks me to evaluate the local variable. In bad1.org the first
>   table contains another section with the entry "Rechnungsbeitrag". When
>   I visit the file, Emacs does not ask me and I can verify that the
>   local variable is not evaluated by attaching something to the task.
> 
> - In bad2.org the offending part is a long LOGBOOK drawer. Removing any
>   two lines from the drawer makes the example work. In good2.org I've
>   removed the first two lines.
> 
> If it weren't for those bugs, this would fit my needs exactly!
> 
> Cheers,
> Viktor
> 
> Darlan Cavalcante Moreira wrote:
> 
> > 
> > One way to do this is to use file variables to change the value of
> > org-attach-directory. This works particularly well when you use just a few
> > org files as in your case.
> > 
> > For instance, you could put
> > --8<---------------cut here---------------start------------->8---
> > # Local Variables:
> > # org-attach-directory: "~/org/data/personal"
> > # End:
> > --8<---------------cut here---------------end--------------->8---
> > in your personal.org file and 
> > --8<---------------cut here---------------start------------->8---
> > # Local Variables:
> > # org-attach-directory: "~/org/data/work"
> > # End:
> > --8<---------------cut here---------------end--------------->8---
> > in your work.org file.
> > 
> > --
> > Darlan Cavalcante Moreira
> > 
> > At Wed, 21 Sep 2011 11:49:39 +0200,
> > Viktor Rosenfeld <listuser36@googlemail.com> wrote:
> > > 
> > > Hi everybody,
> > > 
> > > so far I've only used one org file, but it's getting unwieldy and I've
> > > decided to split it up.
> > > 
> > > I'd also like to split up my attachment directory to reduce clutter.
> > > For example, if I have two org files "personal.org" and "work.org" I
> > > would like attachments to go into automatically created directories
> > > below "~/org/data/personal" and "~/org/data/work". If a file has no
> > > custom attachment directory specified, attachments should be created
> > > below a default path (same as now).
> > > 
> > > Is this possible?
> > > 
> > > Thanks,
> > > Viktor
> > > 
> > 

  reply	other threads:[~2011-09-22  1:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21  9:49 Per-file attachment directories Viktor Rosenfeld
2011-09-21 16:34 ` Darlan Cavalcante Moreira
2011-09-21 18:29   ` Viktor Rosenfeld
2011-09-22  1:34     ` Darlan Cavalcante Moreira [this message]
2011-09-22  7:08       ` Nick Dokos
2011-09-22  9:47         ` Viktor Rosenfeld
2011-09-22  7:32       ` Viktor Rosenfeld

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=4e7a90c4.4216ec0a.3475.fffff114@mx.google.com \
    --to=darcamo@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 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).