From: "cédric ody" <cedric.listes@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: displaying thumbnails in heading or subheadings
Date: Tue, 25 Apr 2017 16:56:00 +0200 [thread overview]
Message-ID: <CA+DdpC1Hx5+kAuDFX61=9w+NdJcy8HTbgmYGL=fCVjsG9dRQnQ@mail.gmail.com> (raw)
Hi everyone,
I'd like to be able to display thumbnails of images in headlines.
Assume I define a ICON property with the path to a thumbnail. For instance
* Emacs heading
:PROPERTIES:
:ICON: /tmp/emacs.png
:END:
I have been able to get some results with the following code
#+BEGIN_SRC elisp
(defun my-function ()
"comment"
(interactive)
(save-excursion
(org-with-limited-levels (org-map-tree 'my_subfunction)))
(org-fix-position-after-promote))
(defun my_subfunction ()
"comment"
(org-with-wide-buffer
(org-back-to-heading t)
(let ((e (org-element-at-point)))
(looking-at org-outline-regexp) (goto-char (1- (match-end 0)))
(insert-image (create-image (org-element-property :ICON e))))))
#+END_SRC
There are two issues I'd like to solve:
- when the document is saved and re-opened, a blank space has
substituted the thumbnail.
- is it possible to control the appearance or not of thel thumbnails
of all headlinesin one command?
Thanks,
cedric
next reply other threads:[~2017-04-25 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-25 14:56 cédric ody [this message]
2017-04-26 6:49 ` displaying thumbnails in heading or subheadings numbchild
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='CA+DdpC1Hx5+kAuDFX61=9w+NdJcy8HTbgmYGL=fCVjsG9dRQnQ@mail.gmail.com' \
--to=cedric.listes@gmail.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).