From: Ihor Radchenko <yantar92@gmail.com>
To: Narendra Joshi <narendraj9@gmail.com>,
emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Searching all attachments in org-files
Date: Tue, 26 Dec 2017 08:06:38 +0800 [thread overview]
Message-ID: <877eta2vzl.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87vagua8vm.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]
Dear Narendra,
Here is what I am using:
(defun org-att-complete-link (&optional arg)
"Completion dispatcher for att: links (rewritten from org-attach-open)"
(let* ((attach-dir (org-attach-dir t))
(files (org-attach-file-list attach-dir))
(file (if (= (length files) 1)
(car files)
(completing-read "att: "
(mapcar #'list files) nil t)))
(path (expand-file-name file attach-dir)))
(concat "att:" file)))
(add-to-list 'org-link-abbrev-alist '("att" . org-attach-expand-link))
(org-link-set-parameters
"att"
:complete 'org-att-complete-link)
Regards,
Ihor
Narendra Joshi <narendraj9@gmail.com> writes:
> Hi,
>
> Is there a way to quick get a link to an existing attachment? A lot of
> times, I find myself referring to the same file. I like to keep files as
> attachments so that they are committed with my org-files. Any help here,
> either in fixing my workflow or helping me figure out how to get a link
> to an existing file that is attached to an org-heading, would be greatly
> appreciated.
>
> Thanks,
> --
> Narendra Joshi
>
--
Ihor Radchenko,
PhD Student
Singapore University of Technology and Design,
8 Somapah Road Singapore 487372
Email: yantar92@gmail.com, ihor_radchenko@mymail.sutd.edu.sg
Tel: +6584017977
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2017-12-26 0:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-25 19:46 Searching all attachments in org-files Narendra Joshi
2017-12-26 0:06 ` Ihor Radchenko [this message]
2017-12-26 13:56 ` Narendra Joshi
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=877eta2vzl.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=narendraj9@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).