emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Cédric ODY" <cedric.ody@univ-brest.fr>
To: emacs-orgmode@gnu.org
Subject: displaying icons in heading or subheadings
Date: Tue, 25 Apr 2017 10:39:49 +0200	[thread overview]
Message-ID: <7966d8aa-639f-61f9-8921-648595f7e612@univ-brest.fr> (raw)

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

                 reply	other threads:[~2017-04-25  8:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=7966d8aa-639f-61f9-8921-648595f7e612@univ-brest.fr \
    --to=cedric.ody@univ-brest.fr \
    --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).