emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: Graphic files displayed in buffer?
Date: Wed, 16 Sep 2015 00:29:39 +0200	[thread overview]
Message-ID: <8737yf9uzw.fsf@gmx.us> (raw)
In-Reply-To: m2vbbb4d1r.fsf@tsdye.com

Hello,

> OK, so I made the file self-contained by transferring to it all the code
> it uses in my library of Babel.

At least that's nice in itself...  (I now keep common config data in a git
submodule that I clone and load at export time with Make).

> Then, I opened with emacs -q, answered "yes" to all the questions about
> running code, and when that was done discovered that the images aren't
> displayed, which is what I want!

OK.

> When I open the same file in my usual emacs, the images are displayed
> inline.

Damn.

> So, it must be my configuration, right?

It would seem so.  Unless if you perhaps did not load your org-git version
in the "emacs -q" setup.  But at least on my system the recent Org is
loaded with "-q" (I keep org in the system-wide site-lisp).

> I use Eric Schulte's starter kit, so my configuration is spread out over
> several *.el files in two directories.  When I grep for "inline" or
> "overlay" in *.el I get no hits.  But grepping for "image" gets this:


> custom.el: '(emms-mode-line-icon-image-cache
> custom.el:    (image :type xpm :ascent center :data "/* XPM */
> custom.el: '(gnus-mode-line-image-cache
> custom.el:    (image :type xpm :ascent center :data "/* XPM */
> custom.el: '(mu4e-view-show-images nil)

This should be completely orthogonal.

> td.el:(setq mu4e-view-show-images t)
> td.el:(when (fboundp 'imagemagick-register-types)
> td.el:  (imagemagick-register-types))
> td.el:                :base-directory "/Users/dk/org/tsdye/employees/software/images/"

Same...

> None of which looks too suspicious to me, though some of it is old and
> might be pruned away.  Does anything look suspicious to you?

Nope.

> Can you suggest some other terms I might grep?  I'm keen to get to the
> bottom of this.

Hmm, I'm thinking out loud here, but perhaps you could try deploy
something like the following to detect *where* org-display-inline-images
is called.

#+BEGIN_SRC emacs-lisp
  (defun a-pix-is-worth-a-1000-words (&optional &rest args)
    (with-temp-file "/tmp/backtrace.txt"
      (goto-char (point-max))
      (insert (format-time-string "++++ %s ++++\n"))
      (let ((standard-output (current-buffer))) (backtrace))))

  (add-function :before (symbol-function 'org-display-inline-images)
                #'a-pix-is-worth-a-1000-words)
#+END_SRC

Rasmus

-- 
m-mm-mmm-mmmm bacon!

      reply	other threads:[~2015-09-15 22:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-13 18:26 Graphic files displayed in buffer? Thomas S. Dye
2015-09-13 19:14 ` Thomas S. Dye
2015-09-13 20:06   ` Rasmus
2015-09-14  1:05     ` Thomas S. Dye
2015-09-15 19:55       ` Rasmus
2015-09-15 20:56         ` Thomas S. Dye
2015-09-15 22:29           ` Rasmus [this message]

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=8737yf9uzw.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /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).