emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Display inline images patch


From: Russell Adams
Subject: [Orgmode] Display inline images patch
Date: Mon, 31 May 2010 14:30:32 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

I got irritated by my point jumping to the end of the buffer every
time I toggled inline image display, so lets save excursion. ;]

$ diff -Narub org.el~ org.el
--- org.el~   2010-05-20 10:12:45.000000000 -0500
+++ org.el    2010-05-31 14:28:21.000000000 -0500
@@ -15489,6 +15489,7 @@
 is how it will work for export.  When INCLUDE-LINKED is set, also
 links
 with a description part will be inlined."
   (interactive "P")
+  (save-excursion 
   (org-remove-inline-images)
   (goto-char (point-min))
   (let ((re (concat "\\[\\[\\(file:\\|\\./\\)\\(~?"
   "[-+./_0-9a-zA-Z]+"
@@ -15501,7 +15502,7 @@
       (setq ov (make-overlay (match-beginning 0) (match-end 0)))
       (overlay-put ov 'display (create-image file))
       (overlay-put ov 'face 'default)
-      (push ov org-inline-image-overlays)))))
+          (push ov org-inline-image-overlays))))))
 
 (defun org-remove-inline-images ()
   "Remove inline display of images."






------------------------------------------------------------------
Russell Adams                            address@hidden

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]