From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: Export attached image files Date: Tue, 20 Aug 2013 14:37:04 -0400 Message-ID: <945b335e696165b5448a1d176e1df79a@mail.rickster.com> References: <20130819110355.GA2147@kuru.dyndns-at-home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBqo7-00050d-EJ for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 14:37:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBqo1-0005no-E9 for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 14:37:31 -0400 Received: from [204.62.15.78] (port=48035 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBqo1-0005nN-Ap for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 14:37:25 -0400 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: emacs-orgmode@gnu.org On 2013-08-20 11:41, Charles Berry wrote: > Johan Ekh gmail.com> writes: > > [snip] > > I would like > to take a series of screenshots, quickly incorporate them into an org > file together with some text without having to rename > the screenshots with suitable names and organize them on my disk etc. > I'd > like org-mode to store the images somewhere > in a data directory as an attachment, but of course I'd like the > screenshots to be incorporated in the pdf-file when I export it. > Is this possible? > It's a bit less automated than you might like, but if you define this library of babel method: #+name: insert-attached-images #+BEGIN_SRC emacs-lisp :var where=(point) (save-excursion (goto-char where) (mapcar (lambda (file) (format "[[%s]]" (org-attach-expand file))) (org-entry-get-multivalued-property where org-attach-file-list-property))) #+END_SRC use it like: #+call: insert-attached-images() :results list e.g: #+BEGIN_ORG ** Heading with attachments :ATTACH: :PROPERTIES: :Attachments: t.png t2.png :ID: 528b68ed-c896-4a4b-aa3f-b3d292b693bf :END: #+RESULTS: #+call: insert-attached-images() :results list #+RESULTS: - [[/export/home/ut0598/tmp/data/52/8b68ed-c896-4a4b-aa3f-b3d292b693bf/t.png]] - [[/export/home/ut0598/tmp/data/52/8b68ed-c896-4a4b-aa3f-b3d292b693bf/t2.png]] #+END_ORG in a heading with ad-hoc attachments, it will do what you want... rick