From mboxrd@z Thu Jan 1 00:00:00 1970 From: John J Foerch Subject: org-attach-directory Date: Sat, 10 Oct 2015 10:00:08 -0400 Message-ID: <871td2ygbb.fsf@hecubus.retroj.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zkuka-0000Pp-S0 for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 10:03:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkukX-0000as-MD for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 10:03:52 -0400 Received: from plane.gmane.org ([80.91.229.3]:60559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkukX-0000ah-GM for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 10:03:49 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZkukT-0001mk-3V for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 16:03:45 +0200 Received: from 152.160.184.109 ([152.160.184.109]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Oct 2015 16:03:40 +0200 Received: from jjfoerch by 152.160.184.109 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Oct 2015 16:03:40 +0200 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: emacs-orgmode@gnu.org Hello, I have a collection of org files in a git repository, and am using git-annex for attachments. I had an idea for a feature related to org-attach-directory that would improve the usability of git-annex in a case like this. Since all attachments from all org files in the repo go into the same data directory, there isn't a simple way to operate on the attachments related to a single org file in bulk. For instance, if one wants to git-annex-get all of the attachments for one org file, but not others, one must git-annex-get each file individually. One solution would be for each org file to live in its own subdirectory, thus each org file would have its own data directory: org-file: org/work/work.org attachemts-in: org/work/data/ I don't especially like this solution because it adds a lot of unnecessary structure to the repo. Another solution would be for each org file to have its own data directory alongside it: org-file: org/work.org attachments-in: org/work.org.data/ I don't especially like this one either because it makes a mess of the repository root. The solution I like best is to store attachments in data/, but to introduce a subdirectory per org file: org-file: org/work.org attachments-in: org/data/work.org/ It keeps the repository root uncluttered, but attachments are grouped by the file that owns them, so can be operated on in bulk by git-annex or other tools. I can set up this configuration with org-mode-hook, but I liked the idea so well that I wanted to pass it along as something that org-mode might want to provide itself as an option. Perhaps org-mode could check for the existence of data/{filename} and when it exists, set the local value of org-attach-directory to that instead of to "data/". If it were automatic like this, then org files that used this feature would remain portable. Perhaps a file-local variable or an org directive would be a better option. Any thoughts? Thank you, John Foerch