[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Searching all attachments in org-files

From: Ihor Radchenko
Subject: Re: [O] Searching all attachments in org-files
Date: Tue, 26 Dec 2017 08:06:38 +0800

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))
 :complete 'org-att-complete-link)


Narendra Joshi <address@hidden> 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: address@hidden, address@hidden
Tel: +6584017977

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]