emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Dan Davison <davison@stats.ox.ac.uk>
Cc: emacs-orgmode@gnu.org, Chris Thompson <thompson.chris@gmail.com>
Subject: Re: Re: Wow -- adding images to an org file
Date: Sat, 8 May 2010 12:51:41 +0200	[thread overview]
Message-ID: <4F5FF1A6-BE60-4CC1-9D54-6D32D0FC2EDA@gmail.com> (raw)
In-Reply-To: <874oijhnqs.fsf@stats.ox.ac.uk>


On May 7, 2010, at 2:58 PM, Dan Davison wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On May 7, 2010, at 4:16 AM, Chris Thompson wrote:
>>
>>> Nathan Neff <nathan.neff <at> gmail.com> writes:
>>>
>>>>
>>>> I just saw Andreas's screenshot here:
>>>>
>>>> http://orgmode.org/worg/org-screenshots.php
>>>>
>>>> If you zoom in to his screenshot,
>>>> http://orgmode.org/img/screenshots/org_andreas.jpg
>>>>
>>>> You can see how he adds images to his org files.
>>>> All that I had to do was put this into my emacs init file:
>>>>
>>>> (defun org-dblock-write:image (params)
>>>> (let ((file (plist-get params :file)))
>>>>    (clear-image-cache file)
>>>>    (insert-image (create-image file) )))
>>>>
>>>> Then, put this in an org-file:
>>>>
>>>> #+BEGIN: image :file "~/Documents/personal/foo.png"
>>>> #+END
>>>>
>>>> And run C-c C-c (or is it C-c C-x C-u)?
>>>>
>>>> Anyway, Cool stuff!
>>>>
>>>> --Nate
>>>>
>>>
>>>
>>> Another way to have images in org-mode documents is to use the
>>> "iimage"
>>> minor mode, which handles  inline images:
>>> http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html
>>>
>>> For additional documentation:
>>> http://orgmode.org/worg/org-configs/org-config-examples.php#sec-2_2
>>
>> At that place, I find this code:
>> (add-to-list 'iimage-mode-image-regex-alist (cons (concat
>> "\\[\\[file:\
>> \(~?" iimage-mode-image-filename-regex "\\)\\]") 1))
>> (defun org-toggle-iimage-in-org () "display images in your org file"
>> (interactive) (if (face-underline-p 'org-link) (set-face-
>> underline-p 'org-link nil) (set-face-underline-p 'org-link t))
>> (iimage-
>> mode))
>> I guess I could actually add the above code to org.el, so that the
>> only thing to do for a user would be to turn on iimage-mode.
>> What is the purpose of toggling the underline property of the link  
>> face?
>
> It puts a horizontal line through the middle of the displayed image
> (haven't checked if that's fixed in latest emacs).

I see.

We have now native inline image display in Org-mode, you can toggle it  
with

C-c C-x C-v

This implementation uses overlays instead of text properties and  
therefore does not interfere with font-lock.

- Carsten

  reply	other threads:[~2010-05-08 10:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07  2:01 Wow -- adding images to an org file Nathan Neff
2010-05-07  2:16 ` Chris Thompson
2010-05-07  7:55   ` Carsten Dominik
2010-05-07 12:58     ` Dan Davison
2010-05-08 10:51       ` Carsten Dominik [this message]
2010-05-09 15:05         ` Daniel Martins
2010-05-09 17:23           ` Sebastian Rose
2010-05-11 19:14         ` Russell Adams
2010-05-11 21:29           ` Dan Davison
2010-05-12 12:41             ` Carsten Dominik
  -- strict thread matches above, loose matches on Subject: below --
2010-05-11 23:20 robut
2010-05-12  5:39 ` Baoqiu Cui
2010-05-12  6:07   ` Carsten Dominik
2010-05-12  7:55     ` Baoqiu Cui
2010-05-12 12:48       ` Carsten Dominik

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=4F5FF1A6-BE60-4CC1-9D54-6D32D0FC2EDA@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=thompson.chris@gmail.com \
    /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).