[Top][All Lists]

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

[O] displaying thumbnails in heading or subheadings

From: cédric ody
Subject: [O] displaying thumbnails in heading or subheadings
Date: Tue, 25 Apr 2017 16:56:00 +0200

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
  :ICON:  /tmp/emacs.png

I have been able to get some results with the following code

#+BEGIN_SRC elisp
(defun my-function ()
    (org-with-limited-levels (org-map-tree 'my_subfunction)))
(defun my_subfunction ()
   (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))))))

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?



reply via email to

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