From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darlan Cavalcante Moreira Subject: Re: Attachments and refiling Date: Fri, 29 Jul 2011 17:58:27 -0300 Message-ID: <4e331ef7.47c3ec0a.7625.6ac7@mx.google.com> References: <87ei1rrdzd.fsf@gnu.org> <4e21b345.c74cec0a.7e49.3340@mx.google.com> <8739hvwikz.fsf@altern.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmu8i-0007qi-Lq for emacs-orgmode@gnu.org; Fri, 29 Jul 2011 16:58:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qmu8h-0004wf-0M for emacs-orgmode@gnu.org; Fri, 29 Jul 2011 16:58:36 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:56334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmu8g-0004wP-Tz for emacs-orgmode@gnu.org; Fri, 29 Jul 2011 16:58:34 -0400 Received: by gyg13 with SMTP id 13so3344117gyg.0 for ; Fri, 29 Jul 2011 13:58:33 -0700 (PDT) In-Reply-To: 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: Gustav =?UTF-8?B?V2lrc3Ryw7Zt?= Cc: Bastien , emacs-orgmode@gnu.org 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 --8<---------------cut here---------------start------------->8--- #+LINK: attach elisp:(org-open-file (org-attach-expand "%s")) --8<---------------cut here---------------end--------------->8--- 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. -- Darlan [1] http://www.mail-archive.com/emacs-orgmode@gnu.org/msg37613.html At Fri, 29 Jul 2011 10:33:37 +0200, Gustav Wikström wrote: > > [1 ] > What about being able to link to attachments in a similar way as one links > to files or web-pages? Using [[attachment:some_file.sql][some link name]] ? > Comments? Problems with this? > > 2011/7/25 Gustav Wikström > > > To make org-mode look for attachments in the current sub-tree when using > > org-insert-link would simplify the process of "linking" to attached files > > (useful at least when exporting). Persistent links, in in this regard, seems > > like a nice idea! > > > > /Gustav > > > > 2011/7/24 Bastien > > > >> Hi Gustav, > >> > >> Gustav Wikström writes: > >> > >> > Another feature that could improve the use of attachments is to allow > >> > links to the attached folders also via the C-c C-l interface in a > >> > similar way as stored links (C-c l ). I.E to get the attachment-folder > >> > as an item in the C-c C-l buffer with TAB-completion. > >> > >> You can already use (setq org-attach-store-link-p t) to create a link > >> while attaching a file. > >> > >> Since links are deleted as soon as they are inserted, this will be > >> usable only once. We can imagine *persistent links* -- and links to > >> attached files could be a good example of persistent links. > >> > >> What do you think? > >> > >> -- > >> Bastien > >> > > > > > [2 ] >