From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?c=C3=A9dric_ody?= Subject: displaying thumbnails in heading or subheadings Date: Tue, 25 Apr 2017 16:56:00 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d31sq-0000n3-FO for emacs-orgmode@gnu.org; Tue, 25 Apr 2017 10:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d31sp-0006RI-G1 for emacs-orgmode@gnu.org; Tue, 25 Apr 2017 10:56:04 -0400 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:34654) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d31sp-0006QH-5e for emacs-orgmode@gnu.org; Tue, 25 Apr 2017 10:56:03 -0400 Received: by mail-wm0-x22e.google.com with SMTP id r190so15057371wme.1 for ; Tue, 25 Apr 2017 07:56:02 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode 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