From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darlan Cavalcante Moreira Subject: Re: org-attach link proposal Date: Fri, 01 Apr 2011 13:25:32 -0300 Message-ID: <4d95fc80.1c1c640a.7c91.ffff898b@mx.google.com> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from [140.186.70.92] (port=42842 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5hAS-0005IH-49 for emacs-orgmode@gnu.org; Fri, 01 Apr 2011 12:25:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5hAJ-0001Ab-ME for emacs-orgmode@gnu.org; Fri, 01 Apr 2011 12:25:40 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:56987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5hAJ-0001AD-Jn for emacs-orgmode@gnu.org; Fri, 01 Apr 2011 12:25:39 -0400 Received: by yws5 with SMTP id 5so1783563yws.0 for ; Fri, 01 Apr 2011 09:25:38 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Juraj Kubelka Cc: Org mode mailing list I have the same use-case scenario as you and I asked the same question a while ago [1]. As you, I define a link type for attached files with #+LINK: attach elisp:(org-open-file (org-attach-expand "%s")) To avoid the confirmation to execute elisp code you can use the org-confirm-elisp-link-not-regexp variable that Bastien introduced after [1]. In my case it is (setq org-confirm-elisp-link-not-regexp "org-open-file") Off-course you can also disable confirmation to execute any elisp code, but I think it is more reasonable to disable only the one you need. Bastien also introduced the org-attach-store-link-p variable. Set it to 'attached and org will store a link to the attached file that you can easily insert with "C-c C-l". -- Darlan [1]: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg37613.html At Fri, 1 Apr 2011 13:02:50 +0200, Juraj Kubelka wrote: > > [1 ] > Hi, > > I played a bit with org-attach. It is great package! Thanks for it! :) > > I have one proposal. So at first why: > > I would like to do something like this: > > * Project documents > :PROPERTIES: > :Attachments: first.doc second.doc third.doc > :ID: 37773ace-b471-4003-a8d1-448e7c48f77b > :END: > > + the first document about something1 [[att:first.doc]] > + the second document [[att:second.doc]] > + the third document [[att:third.doc]] > > in order to easily access it just by click on related link. > > So I defined method: > > (defun org-attach-open-link (file &optional in-emacs) > (org-open-file (expand-file-name file (org-attach-dir t)) in-emacs)) > > and link: > > #+LINK: att elisp:(org-attach-open-link "%s") > > and it works. but always asks if I want to execute elisp code. > > Would it be possible to integrate it directly to org-mode like http: and > others? I am not sure how to do it. > > Thank you! > Juraj > [2 ] >