From b07d12228f7601533a97d8b824475e5b320f85ec Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 18 Aug 2011 19:32:52 +0200 Subject: [PATCH] org-hacks.org: New hack by Darlan Cavalcante Moreira: attach link type Use an "attach" link type to open files without worrying about their location. --- org-hacks.org | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/org-hacks.org b/org-hacks.org index d7398ae..6c926a0 100644 --- a/org-hacks.org +++ b/org-hacks.org @@ -1111,6 +1111,28 @@ changed. ad-do-it)) (ad-activate 'org-refile) #+end_src +*** Use an "attach" link type to open files without worrying about their location + +-- Darlan Cavalcante Moreira + +In the setup part in my org-files I put: + +#+begin_src org + ,#+LINK: attach elisp:(org-open-file (org-attach-expand "%s")) +#+end_src org + +Now I can use the "attach" link type, but org will ask me if I want to +allow executing the elisp code. To avoid this you can even set +org-confirm-elisp-link-function to nil (I don't like this because it allows +any elisp code in links) or you can set org-confirm-elisp-link-not-regexp +appropriately. + +In my case I use + +: (setq org-confirm-elisp-link-not-regexp "org-open-file") + +This works very well. + ** Org Agenda and Task Management *** Make it easier to set org-agenda-files from multiple directories - Matt Lundin @@ -1630,7 +1652,7 @@ Fix a problem with saveplace.el putting you back in a folded position: #+end_src ** Using ido-completing-read to find attachments --- Matt Lundin +-- Matt Lundin. Org-attach is great for quickly linking files to a project. But if you use org-attach extensively you might find yourself wanting to browse -- 2.11.4.GIT