From: Rick Frankel <rick@rickster.com>
To: emacs-orgmode@gnu.org
Subject: Re: Export attached image files
Date: Tue, 20 Aug 2013 14:37:04 -0400 [thread overview]
Message-ID: <945b335e696165b5448a1d176e1df79a@mail.rickster.com> (raw)
In-Reply-To: <loom.20130820T172916-826@post.gmane.org>
On 2013-08-20 11:41, Charles Berry wrote:
> Johan Ekh <ekh.johan <at> 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
prev parent reply other threads:[~2013-08-20 18:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 10:05 Export attached image files Johan Ekh
2013-08-19 11:03 ` Suvayu Ali
2013-08-20 8:34 ` Johan Ekh
2013-08-20 9:51 ` Suvayu Ali
2013-08-20 12:42 ` Dieter Wilhelm
2013-08-20 15:41 ` Charles Berry
2013-08-20 18:37 ` Rick Frankel [this message]
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=945b335e696165b5448a1d176e1df79a@mail.rickster.com \
--to=rick@rickster.com \
--cc=emacs-orgmode@gnu.org \
/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).