From: Darlan Cavalcante Moreira <darcamo@gmail.com>
To: Bastien <bzg@altern.org>
Cc: "Gustav Wikström" <gustav.erik@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Attachments and refiling
Date: Mon, 25 Jul 2011 12:55:31 -0300 [thread overview]
Message-ID: <4e2d91f9.8188ec0a.1582.1369@mx.google.com> (raw)
In-Reply-To: <877h76u7l7.fsf@gnu.org>
As I see changing the attach directory to point to the original one is the
easiest solution that has no chances of breaking anything and would keep
attachments working in the refiled/archived sub-trees.
Maybe a org-attach-move-files function could also be implemented to easily
move an attachment directory to a different place. It should move the
directory and automatically set the ATTACH_DIR property to the appropriated
value. Of course org could try to find out if this attach directory is also
used in a different file/sub-tree (maybe search in the agenda files and in
the current directory for org-files using this attach directory) and change
ATTACH_DIR in that file/sub-tree or warn the user before moving the
files. This won't be bullet proof but if the users only set the same attach
directory for headings in the same file, for instance (I do this), then it
would work perfectly.
Then, when the user wants the refiling/archiving process to also move the
attached files it could pass an argument before refiling/archiving and
org-attach-move-files would be called appropriately.
--
Darlan
At Mon, 25 Jul 2011 09:45:24 +0200,
Bastien <bzg@altern.org> wrote:
>
> Gustav Wikström <gustav.erik@gmail.com> writes:
>
> > I'm leaning towards not moving my archive to a different folder. I
> > like having the attachments relative.
>
> Okay.
>
> But as Darlan pointed out, moving the attached files when refiling the
> entry might be dangerous, because files in this attached directory can
> also be attached in a different subtree.
>
> I don't have a good general solution to this -- if someone has, please
> share.
>
> > Are archive- and refile-hooks implemented b.t.w.?
>
> C-h v org-archive-*-hook TAG
> C-h v org-refile-*-hook TAG
>
> helps.
>
> There is `org-after-refile-insert-hook' but there is no
> `org-archive-hook'. I'll consider adding this.
>
> > This would make it
> > possible to hack a personal setting, or am I wrong?
>
> You're probably right. Code is proof.
>
> --
> Bastien
next prev parent reply other threads:[~2011-07-25 15:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 11:06 Attachments and refiling Gustav Wikström
2011-07-15 11:16 ` Bastien
2011-07-15 14:55 ` Gustav Wikström
2011-07-16 15:50 ` Darlan Cavalcante Moreira
2011-07-19 12:17 ` Gustav Wikström
2011-07-24 20:00 ` Bastien
2011-07-25 0:14 ` Brian van den Broek
2011-07-25 7:10 ` Gustav Wikström
2011-07-25 7:45 ` Bastien
2011-07-25 15:55 ` Darlan Cavalcante Moreira [this message]
2011-07-28 7:51 ` Bastien
2011-07-28 10:38 ` suvayu ali
2011-07-28 13:46 ` Nick Dokos
2011-07-28 13:49 ` suvayu ali
2011-07-28 14:33 ` Nick Dokos
2011-07-28 17:31 ` Darlan Cavalcante Moreira
2011-07-28 18:04 ` Bernt Hansen
2011-07-29 7:27 ` Gustav Wikström
2011-08-02 4:02 ` Matt Lundin
2011-08-29 12:04 ` Gustav Wikström
2011-07-24 20:07 ` Bastien
2011-07-25 7:21 ` Gustav Wikström
2011-07-29 8:33 ` Gustav Wikström
2011-07-29 20:58 ` Darlan Cavalcante Moreira
2011-08-18 17:33 ` Bastien
2011-08-18 20:37 ` Darlan Cavalcante Moreira
2011-08-19 8:46 ` Bastien
2011-08-19 16:29 ` Darlan Cavalcante Moreira
2011-08-24 14:12 ` Bastien
2011-08-24 14:56 ` Darlan Cavalcante Moreira
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=4e2d91f9.8188ec0a.1582.1369@mx.google.com \
--to=darcamo@gmail.com \
--cc=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
--cc=gustav.erik@gmail.com \
/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).