emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Bug] org-startup-with-inline-images
@ 2013-04-30 17:39 Rick Frankel
  2013-05-01 17:28 ` Daimrod
  0 siblings, 1 reply; 4+ messages in thread
From: Rick Frankel @ 2013-04-30 17:39 UTC (permalink / raw)
  To: Org-Mode

`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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-02  8:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-30 17:39 [Bug] org-startup-with-inline-images Rick Frankel
2013-05-01 17:28 ` Daimrod
2013-05-01 17:42   ` Rick Frankel
2013-05-02  8:09     ` Daimrod

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