From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Re: Per-file attachment directories Date: Wed, 21 Sep 2011 20:29:25 +0200 Message-ID: <20110921182925.GA6055@kenny.fritz.box> References: <20110921094939.GA1018@client199-150.wlan.hu-berlin.de> <4e7a121a.0109640a.5a6b.2e19@mx.google.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="uAKRQypu60I7Lcqm" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6RY8-0001oj-PZ for emacs-orgmode@gnu.org; Wed, 21 Sep 2011 14:29:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6RY6-0001F2-58 for emacs-orgmode@gnu.org; Wed, 21 Sep 2011 14:29:36 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:60620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6RY5-0001Ew-LL for emacs-orgmode@gnu.org; Wed, 21 Sep 2011 14:29:34 -0400 Received: by bkbzs2 with SMTP id zs2so2171299bkb.0 for ; Wed, 21 Sep 2011 11:29:32 -0700 (PDT) Content-Disposition: inline In-Reply-To: <4e7a121a.0109640a.5a6b.2e19@mx.google.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Darlan Cavalcante Moreira Cc: emacs-orgmode@gnu.org --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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 > > > --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="good1.org" Content-Transfer-Encoding: 8bit #+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 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="bad1.org" Content-Transfer-Encoding: 8bit #+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 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="good2.org" Content-Transfer-Encoding: 8bit #+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: --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="bad2.org" Content-Transfer-Encoding: 8bit #+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: --uAKRQypu60I7Lcqm--