From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darlan Cavalcante Moreira Subject: Re: Attachments and refiling Date: Thu, 18 Aug 2011 17:37:06 -0300 Message-ID: <4e4d77f7.1136650a.10fc.73a6@mx.google.com> References: <87ei1rrdzd.fsf@gnu.org> <4e21b345.c74cec0a.7e49.3340@mx.google.com> <8739hvwikz.fsf@altern.org> <4e331ef7.47c3ec0a.7625.6ac7@mx.google.com> <87pqk2lj4e.fsf@altern.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qu9L1-0008M5-Oy for emacs-orgmode@gnu.org; Thu, 18 Aug 2011 16:37:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qu9L0-0000r8-Mw for emacs-orgmode@gnu.org; Thu, 18 Aug 2011 16:37:15 -0400 Received: from mail-yi0-f41.google.com ([209.85.218.41]:47694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qu9L0-0000r4-JW for emacs-orgmode@gnu.org; Thu, 18 Aug 2011 16:37:14 -0400 Received: by yib2 with SMTP id 2so1940598yib.0 for ; Thu, 18 Aug 2011 13:37:13 -0700 (PDT) In-Reply-To: <87pqk2lj4e.fsf@altern.org> 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: Bastien Cc: Gustav =?UTF-8?B?V2lrc3Ryw7Zt?= , emacs-orgmode@gnu.org Hello Bastien, I'm glad to help (even if such a small contribution). The downside of this hack is that it does not work when you export the buffer. If you use the file: link type then the link will works when you export the org buffer, but you have to type the whole path of the attached file. Therefore, there is this trade-off for now. There is probably a way to make the attach link type also work when exporting the org buffer, but since I don't need this right now I didn't search how to do it. -- Darlan At Thu, 18 Aug 2011 19:33:37 +0200, Bastien wrote: > > Hi Darlan, > > Darlan Cavalcante Moreira writes: > > > I requested this some time ago [1]. While there is not a built-in attach > > link type, org provides you with ways to easily create this functionality. > > > > In the setup part in my org-files I put > > #+LINK: attach elisp:(org-open-file (org-attach-expand "%s")) > > > > 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. > > This is a nice and useful hack -- I added it to Worg/org-hacks.org. > > Thanks! > > -- > Bastien