emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "numbchild@gmail.com" <numbchild@gmail.com>
To: "cédric ody" <cedric.listes@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: displaying thumbnails in heading or subheadings
Date: Wed, 26 Apr 2017 14:49:33 +0800	[thread overview]
Message-ID: <CAL1eYuKFoD39iEMpD_zPmzSGJCFrZKR7dBLhdGXqF30-P-G79A@mail.gmail.com> (raw)
In-Reply-To: <CA+DdpC1Hx5+kAuDFX61=9w+NdJcy8HTbgmYGL=fCVjsG9dRQnQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

Does this `insert-image` function insert image with overlay which is not
literately inserting?

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Tue, Apr 25, 2017 at 10:56 PM, cédric ody <cedric.listes@gmail.com>
wrote:

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

[-- Attachment #2: Type: text/html, Size: 2293 bytes --]

      reply	other threads:[~2017-04-26  6:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 14:56 displaying thumbnails in heading or subheadings cédric ody
2017-04-26  6:49 ` numbchild [this message]

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=CAL1eYuKFoD39iEMpD_zPmzSGJCFrZKR7dBLhdGXqF30-P-G79A@mail.gmail.com \
    --to=numbchild@gmail.com \
    --cc=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).