emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Darlan Cavalcante Moreira <darcamo@gmail.com>
To: "Gustav Wikström" <gustav.erik@gmail.com>
Cc: Bastien <bzg@altern.org>, emacs-orgmode@gnu.org
Subject: Re: Attachments and refiling
Date: Fri, 29 Jul 2011 17:58:27 -0300	[thread overview]
Message-ID: <4e331ef7.47c3ec0a.7625.6ac7@mx.google.com> (raw)
In-Reply-To: <CA+SyOP8-Df9vzvLnaZniNNdZS6Vy3ENdV+rcVr_eh3KnqpTDBg@mail.gmail.com>


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 <gustav.erik@gmail.com> wrote:
> 
> [1  <text/plain; ISO-8859-1 (quoted-printable)>]
> 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 <gustav.erik@gmail.com>
> 
> > 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 <bzg@altern.org>
> >
> >> Hi Gustav,
> >>
> >> Gustav Wikström <gustav.erik@gmail.com> 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  <text/html; ISO-8859-1 (quoted-printable)>]
> 

  reply	other threads:[~2011-07-29 20:58 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
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 [this message]
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=4e331ef7.47c3ec0a.7625.6ac7@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).