From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: [Bug] org-startup-with-inline-images Date: Tue, 30 Apr 2013 13:39:28 -0400 Message-ID: <23e22687eaae8dff1bfd56306ef41b17@mail.rickster.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXEWZ-0006BI-Eb for emacs-orgmode@gnu.org; Tue, 30 Apr 2013 13:39:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXEWX-0001Rr-52 for emacs-orgmode@gnu.org; Tue, 30 Apr 2013 13:39:31 -0400 Received: from [204.62.15.78] (port=41460 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXEWX-0001Rk-1E for emacs-orgmode@gnu.org; Tue, 30 Apr 2013 13:39:29 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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