emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [Bug] org-startup-with-inline-images


From: Rick Frankel
Subject: [O] [Bug] org-startup-with-inline-images
Date: Tue, 30 Apr 2013 13:39:28 -0400
User-agent: Roundcube Webmail/0.7.1

`org-startup-with-inline-images' is a customizable variable. The
problem is that if an org file is visited in a non-graphics buffer (or
batch), `org-display-inline-images' is called an throws an error
("Non-X frame used").

This problem also occurs when e.g., `org-babel-after-execute-hook' is
set to 'org-display-inline-images (which can be mitigated by not
setting the hook in a non-x frame).

Since the startup variable is a customization, and causes problems if
not set programatically, IMHO, the best solution would be to wrap the
`org-display-inline-images' function in a test so that is is a no-op
on non graphic displays:

(defun org-display-inline-images (&optional include-linked refresh beg end)
    "..."
   (interactive "P")
   (when (display-graphic-p)
   ^^^^^^^^^^^^^^^^^^^^^^^^
   [...])

rick



reply via email to

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