emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Viktor Rosenfeld <listuser36@googlemail.com>
To: Darlan Cavalcante Moreira <darcamo@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Per-file attachment directories
Date: Wed, 21 Sep 2011 20:29:25 +0200	[thread overview]
Message-ID: <20110921182925.GA6055@kenny.fritz.box> (raw)
In-Reply-To: <4e7a121a.0109640a.5a6b.2e19@mx.google.com>

[-- Attachment #1: Type: text/plain, Size: 2226 bytes --]

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
> > 
> 

[-- Attachment #2: good1.org --]
[-- Type: text/plain, Size: 2945 bytes --]

#+CATEGORY: Wohnung

# Local Variables:
# org-attach-directory: "~/org/data/wohnung"
# End:

* Test
** NOTE Aufschlüsselung der Betriebskosten

#+tblname: betrieb1
|                            |     2005 |     2006 |     2007 |     2008 |     2009 |
|----------------------------+----------+----------+----------+----------+----------|
| Entwässerung               |          |          |          |  3725.60 |  3917.68 |
| Straßenreinigung           |  1163.99 |  1168.92 |  1191.84 |  1173.96 |  2626.57 |
| Müllabfuhr                 | 10433.02 | 11006.65 | 11166.92 | 11292.93 | 11668.12 |
| Hausreinigung              |  1508.41 |  1439.24 |  1364.38 |  3459.56 |  5506.62 |
| Gartenpflege               |  2529.66 |  1922.76 |   381.78 |  1469.48 |   684.05 |
| Strom, Beleuchtung         |  2389.15 |  2704.41 |  2684.32 |  4745.88 |  2405.10 |
| Schornsteinreinigung       |   306.10 |   316.80 |   324.98 |   333.90 |   318.58 |
| Sach- und Haftpflichtvers. |  5906.19 |  6333.32 |  7279.77 |  8684.83 | 10145.18 |
| Sonstige Betriebskosten    |          |          |          |   199.16 |   199.16 |
| Hauswarte                  | 15068.36 | 15390.08 | 15527.03 | 10579.37 |  6334.16 |
| Grundsteuer                | 10413.80 | 10413.80 | 12780.57 | 12780.57 | 29831.12 |
| Kabelnetz                  |  6600.75 |  6596.31 |  6722.16 |  6767.48 |  6809.50 |
|----------------------------+----------+----------+----------+----------+----------|

#+tblname: betrieb2
| Jahr |      EW |     StR |       MA |      HR |      GP |      SB |   SchR |      SHV |    SBK |       HW |       GS |      KN |    Summe | Rechnung |   Anteil |
|------+---------+---------+----------+---------+---------+---------+--------+----------+--------+----------+----------+---------+----------+----------+----------|
| 2005 |         | 1163.99 | 10433.02 | 1508.41 | 2529.66 | 2389.15 | 306.10 |  5906.19 |        | 15068.36 | 10413.80 | 6600.75 | 56319.43 |    75.63 | 0.001343 |
| 2006 |         | 1168.92 | 11006.65 | 1439.24 | 1922.76 | 2704.41 | 316.80 |  6333.32 |        | 15390.08 | 10413.80 | 6596.31 | 57292.29 |   307.36 | 0.005365 |
| 2007 |         | 1191.84 | 11166.92 | 1364.38 |  381.78 | 2684.32 | 324.98 |  7279.77 |        | 15527.03 | 12780.57 | 6722.16 | 59423.75 |   318.22 | 0.005355 |
| 2008 | 3725.60 | 1173.96 | 11292.93 | 3459.56 | 1469.48 | 4745.88 | 333.90 |  8684.83 | 199.16 | 10579.37 | 12780.57 | 6767.48 | 65212.72 |   346.87 | 0.005319 |
| 2009 | 3917.68 | 2626.57 | 11668.12 | 5506.62 |  684.05 | 2405.10 | 318.58 | 10145.18 | 199.16 |  6334.16 | 29831.12 | 6809.50 | 80445.84 |   421.98 | 0.005246 |
#+TBLFM: $14=vsum($2..$13)::$16=$15/$14;%.6f

- EW: Entwässerung
- StR: Straßenreinigung
- MA: Müllabfuhr
- HR: Hausreinigung
- GP: Gartenpflege
- SB: Strom, Beleuchtung
- SchR: Schornsteinreinigung
- SHV: Sach- und Haftpflichtversicherung
- SBK: Sonstige Betriebskosten
- HW: Hauswarte
- GS: Grundsteuer
- KN: Kabelnetz


[-- Attachment #3: bad1.org --]
[-- Type: text/plain, Size: 3031 bytes --]

#+CATEGORY: Wohnung

# Local Variables:
# org-attach-directory: "~/org/data/wohnung"
# End:

* Test
** NOTE Aufschlüsselung der Betriebskosten

#+tblname: betrieb1
|                            |     2005 |     2006 |     2007 |     2008 |     2009 |
|----------------------------+----------+----------+----------+----------+----------|
| Entwässerung               |          |          |          |  3725.60 |  3917.68 |
| Straßenreinigung           |  1163.99 |  1168.92 |  1191.84 |  1173.96 |  2626.57 |
| Müllabfuhr                 | 10433.02 | 11006.65 | 11166.92 | 11292.93 | 11668.12 |
| Hausreinigung              |  1508.41 |  1439.24 |  1364.38 |  3459.56 |  5506.62 |
| Gartenpflege               |  2529.66 |  1922.76 |   381.78 |  1469.48 |   684.05 |
| Strom, Beleuchtung         |  2389.15 |  2704.41 |  2684.32 |  4745.88 |  2405.10 |
| Schornsteinreinigung       |   306.10 |   316.80 |   324.98 |   333.90 |   318.58 |
| Sach- und Haftpflichtvers. |  5906.19 |  6333.32 |  7279.77 |  8684.83 | 10145.18 |
| Sonstige Betriebskosten    |          |          |          |   199.16 |   199.16 |
| Hauswarte                  | 15068.36 | 15390.08 | 15527.03 | 10579.37 |  6334.16 |
| Grundsteuer                | 10413.80 | 10413.80 | 12780.57 | 12780.57 | 29831.12 |
| Kabelnetz                  |  6600.75 |  6596.31 |  6722.16 |  6767.48 |  6809.50 |
|----------------------------+----------+----------+----------+----------+----------|
| Rechungsbetrag             |    75.63 |   307.36 |   318.22 |   346.87 |   421.98 |

#+tblname: betrieb2
| Jahr |      EW |     StR |       MA |      HR |      GP |      SB |   SchR |      SHV |    SBK |       HW |       GS |      KN |    Summe | Rechnung |   Anteil |
|------+---------+---------+----------+---------+---------+---------+--------+----------+--------+----------+----------+---------+----------+----------+----------|
| 2005 |         | 1163.99 | 10433.02 | 1508.41 | 2529.66 | 2389.15 | 306.10 |  5906.19 |        | 15068.36 | 10413.80 | 6600.75 | 56319.43 |    75.63 | 0.001343 |
| 2006 |         | 1168.92 | 11006.65 | 1439.24 | 1922.76 | 2704.41 | 316.80 |  6333.32 |        | 15390.08 | 10413.80 | 6596.31 | 57292.29 |   307.36 | 0.005365 |
| 2007 |         | 1191.84 | 11166.92 | 1364.38 |  381.78 | 2684.32 | 324.98 |  7279.77 |        | 15527.03 | 12780.57 | 6722.16 | 59423.75 |   318.22 | 0.005355 |
| 2008 | 3725.60 | 1173.96 | 11292.93 | 3459.56 | 1469.48 | 4745.88 | 333.90 |  8684.83 | 199.16 | 10579.37 | 12780.57 | 6767.48 | 65212.72 |   346.87 | 0.005319 |
| 2009 | 3917.68 | 2626.57 | 11668.12 | 5506.62 |  684.05 | 2405.10 | 318.58 | 10145.18 | 199.16 |  6334.16 | 29831.12 | 6809.50 | 80445.84 |   421.98 | 0.005246 |
#+TBLFM: $14=vsum($2..$13)::$16=$15/$14;%.6f

- EW: Entwässerung
- StR: Straßenreinigung
- MA: Müllabfuhr
- HR: Hausreinigung
- GP: Gartenpflege
- SB: Strom, Beleuchtung
- SchR: Schornsteinreinigung
- SHV: Sach- und Haftpflichtversicherung
- SBK: Sonstige Betriebskosten
- HW: Hauswarte
- GS: Grundsteuer
- KN: Kabelnetz


[-- Attachment #4: good2.org --]
[-- Type: text/plain, Size: 3011 bytes --]

#+CATEGORY: Wohnung

# Local Variables:
# org-attach-directory: "~/org/data/wohnung"
# End:

* Pflanzenpflege
** ROUTINE Pflanzen gießen
SCHEDULED: <2011-09-24 Sat 07:00 .+4d/7d>
:LOGBOOK:
- State "DONE"       from "ROUTINE"    [2011-09-12 Mon 13:35]
CLOCK: [2011-09-12 Mon 13:33]--[2011-09-12 Mon 13:35] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-09-08 Thu 16:30]
CLOCK: [2011-09-08 Thu 16:28]--[2011-09-08 Thu 16:30] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-09-04 Sun 13:25]
CLOCK: [2011-09-04 Sun 13:21]--[2011-09-04 Sun 13:25] =>  0:04
- State "DONE"       from "ROUTINE"    [2011-08-27 Sat 11:31]
- State "DONE"       from "ROUTINE"    [2011-08-23 Tue 10:29]
- State "DONE"       from "ROUTINE"    [2011-08-19 Fri 09:26]
- State "DONE"       from "ROUTINE"    [2011-08-15 Mon 00:31]
CLOCK: [2011-08-15 Mon 00:30]--[2011-08-15 Mon 00:31] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-08-11 Thu 15:09]
CLOCK: [2011-08-11 Thu 15:02]--[2011-08-11 Thu 15:05] =>  0:03
- State "DONE"       from "ROUTINE"    [2011-08-07 Sun 22:15]
CLOCK: [2011-08-07 Sun 22:14]--[2011-08-07 Sun 22:15] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-08-01 Mon 09:26]
- State "DONE"       from "ROUTINE"    [2011-07-28 Thu 10:07]
CLOCK: [2011-07-28 Thu 10:05]--[2011-07-28 Thu 10:07] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-07-24 Sun 22:10]
CLOCK: [2011-07-24 Sun 22:05]--[2011-07-24 Sun 22:07] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-07-20 Wed 08:01]
CLOCK: [2011-07-20 Wed 07:57]--[2011-07-20 Wed 07:59] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-07-16 Sat 12:15]
CLOCK: [2011-07-16 Sat 12:15]--[2011-07-16 Sat 12:15] =>  0:00
- State "DONE"       from "ROUTINE"    [2011-07-05 Tue 19:46]
CLOCK: [2011-07-05 Tue 19:44]--[2011-07-05 Tue 19:46] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-06-29 Wed 00:02]
CLOCK: [2011-06-29 Wed 00:01]--[2011-06-29 Wed 00:02] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-06-25 Sat 05:22]
CLOCK: [2011-06-25 Sat 05:21]--[2011-06-25 Sat 05:22] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-06-21 Tue 08:10]
- State "DONE"       from "ROUTINE"    [2011-06-17 Fri 19:03]
CLOCK: [2011-06-17 Fri 19:03]--[2011-06-17 Fri 19:03] =>  0:00
- State "DONE"       from "ROUTINE"    [2011-06-13 Mon 18:08]
CLOCK: [2011-06-13 Mon 18:07]--[2011-06-13 Mon 18:08] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-06-09 Thu 19:00]
CLOCK: [2011-06-09 Thu 18:59]--[2011-06-09 Thu 19:00] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-06-05 Sun 17:17]
CLOCK: [2011-06-05 Sun 17:16]--[2011-06-05 Sun 17:17] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-05-28 Sat 15:31]
CLOCK: [2011-05-28 Sat 15:30]--[2011-05-28 Sat 15:31] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-05-19 Thu 10:40]
- State "DONE"       from "ROUTINE"    [2011-05-15 Sun 11:27]
- State "DONE"       from "ROUTINE"    [2011-05-11 Wed 09:44]
:END:
:PROPERTIES:
:STYLE: habit
:LAST_REPEAT: [2011-09-20 Tue 13:49]
:END:

[-- Attachment #5: bad2.org --]
[-- Type: text/plain, Size: 3136 bytes --]

#+CATEGORY: Wohnung

# Local Variables:
# org-attach-directory: "~/org/data/wohnung"
# End:

* Pflanzenpflege
** ROUTINE Pflanzen gießen
SCHEDULED: <2011-09-24 Sat 07:00 .+4d/7d>
:LOGBOOK:
- State "DONE"       from "ROUTINE"    [2011-09-20 Tue 13:49]
CLOCK: [2011-09-20 Tue 13:46]--[2011-09-20 Tue 13:49] =>  0:03
- State "DONE"       from "ROUTINE"    [2011-09-12 Mon 13:35]
CLOCK: [2011-09-12 Mon 13:33]--[2011-09-12 Mon 13:35] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-09-08 Thu 16:30]
CLOCK: [2011-09-08 Thu 16:28]--[2011-09-08 Thu 16:30] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-09-04 Sun 13:25]
CLOCK: [2011-09-04 Sun 13:21]--[2011-09-04 Sun 13:25] =>  0:04
- State "DONE"       from "ROUTINE"    [2011-08-27 Sat 11:31]
- State "DONE"       from "ROUTINE"    [2011-08-23 Tue 10:29]
- State "DONE"       from "ROUTINE"    [2011-08-19 Fri 09:26]
- State "DONE"       from "ROUTINE"    [2011-08-15 Mon 00:31]
CLOCK: [2011-08-15 Mon 00:30]--[2011-08-15 Mon 00:31] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-08-11 Thu 15:09]
CLOCK: [2011-08-11 Thu 15:02]--[2011-08-11 Thu 15:05] =>  0:03
- State "DONE"       from "ROUTINE"    [2011-08-07 Sun 22:15]
CLOCK: [2011-08-07 Sun 22:14]--[2011-08-07 Sun 22:15] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-08-01 Mon 09:26]
- State "DONE"       from "ROUTINE"    [2011-07-28 Thu 10:07]
CLOCK: [2011-07-28 Thu 10:05]--[2011-07-28 Thu 10:07] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-07-24 Sun 22:10]
CLOCK: [2011-07-24 Sun 22:05]--[2011-07-24 Sun 22:07] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-07-20 Wed 08:01]
CLOCK: [2011-07-20 Wed 07:57]--[2011-07-20 Wed 07:59] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-07-16 Sat 12:15]
CLOCK: [2011-07-16 Sat 12:15]--[2011-07-16 Sat 12:15] =>  0:00
- State "DONE"       from "ROUTINE"    [2011-07-05 Tue 19:46]
CLOCK: [2011-07-05 Tue 19:44]--[2011-07-05 Tue 19:46] =>  0:02
- State "DONE"       from "ROUTINE"    [2011-06-29 Wed 00:02]
CLOCK: [2011-06-29 Wed 00:01]--[2011-06-29 Wed 00:02] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-06-25 Sat 05:22]
CLOCK: [2011-06-25 Sat 05:21]--[2011-06-25 Sat 05:22] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-06-21 Tue 08:10]
- State "DONE"       from "ROUTINE"    [2011-06-17 Fri 19:03]
CLOCK: [2011-06-17 Fri 19:03]--[2011-06-17 Fri 19:03] =>  0:00
- State "DONE"       from "ROUTINE"    [2011-06-13 Mon 18:08]
CLOCK: [2011-06-13 Mon 18:07]--[2011-06-13 Mon 18:08] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-06-09 Thu 19:00]
CLOCK: [2011-06-09 Thu 18:59]--[2011-06-09 Thu 19:00] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-06-05 Sun 17:17]
CLOCK: [2011-06-05 Sun 17:16]--[2011-06-05 Sun 17:17] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-05-28 Sat 15:31]
CLOCK: [2011-05-28 Sat 15:30]--[2011-05-28 Sat 15:31] =>  0:01
- State "DONE"       from "ROUTINE"    [2011-05-19 Thu 10:40]
- State "DONE"       from "ROUTINE"    [2011-05-15 Sun 11:27]
- State "DONE"       from "ROUTINE"    [2011-05-11 Wed 09:44]
:END:
:PROPERTIES:
:STYLE: habit
:LAST_REPEAT: [2011-09-20 Tue 13:49]
:END:

  reply	other threads:[~2011-09-21 18:29 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 [this message]
2011-09-22  1:34     ` Darlan Cavalcante Moreira
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=20110921182925.GA6055@kenny.fritz.box \
    --to=listuser36@googlemail.com \
    --cc=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).