emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* displaying icons in heading or subheadings
@ 2017-04-25  8:39 Cédric ODY
  0 siblings, 0 replies; only message in thread
From: Cédric ODY @ 2017-04-25  8:39 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I'd like to be able to display icons just after the stars in heading or 
subheadings, by defining the icon as a property. For instance


* Emacs heading
   :PROPERTIES:
   :ICON:  /tmp/emacs.png
   :END:

I have tried something like

#+BEGIN_SRC elisp :results value raw
(let ((parsetree (org-element-parse-buffer 'headline)))
   (org-element-map parsetree 'headline
     (lambda (hl) (org-back-to-heading t) (insert-image (create-image 
(org-element-property :ICON hl))))))
#+END_SRC

which inserts the icon before the star.

Any hint to do it? Is this smart enough?

Thanks,

co


-- 
--------------

02 98 49 86 04

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-25  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25  8:39 displaying icons in heading or subheadings Cédric ODY

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).