From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Corneli Subject: [PATCH] problem with size of inline images Date: Sun, 3 Aug 2014 22:54:23 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf3030c11f58ddb104ffc0aa72 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE3jV-0005eB-PX for emacs-orgmode@gnu.org; Sun, 03 Aug 2014 17:54:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XE3jU-0005Rh-M2 for emacs-orgmode@gnu.org; Sun, 03 Aug 2014 17:54:25 -0400 Received: from mail-vc0-x22e.google.com ([2607:f8b0:400c:c03::22e]:49069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE3jU-0005RZ-IP for emacs-orgmode@gnu.org; Sun, 03 Aug 2014 17:54:24 -0400 Received: by mail-vc0-f174.google.com with SMTP id la4so9784934vcb.5 for ; Sun, 03 Aug 2014 14:54:23 -0700 (PDT) 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: emacs-orgmode@gnu.org --20cf3030c11f58ddb104ffc0aa72 Content-Type: text/plain; charset=UTF-8 Hello: I've noticed a problem around line 19171 of org.el. The size of images is supposed to be controlled by attributes and by `org-image-actual-width'. But it seems like the use of `when', `save-match-data' and `string-to-number' are in the wrong order in this region, so that `(match-string 1)' is not defined properly when it's evaluated. The following instructions should allow you to reproduce the issue: Run this: #+BEGIN_SRC shell wget http://www.lisperati.com/lisplogo_warning_256.png -O lisp_warning.png #+END_SRC Then: [[elisp:(setq org-image-actual-width '(1200))]] [[elisp:(org-toggle-inline-images)]] #+ATTR_ORG: :width 256 [[file:./lisp_warning.png]] ... and the attached patch fixed the problem for me. --20cf3030c11f58ddb104ffc0aa72 Content-Type: application/octet-stream; name="save-match-data.patch" Content-Disposition: attachment; filename="save-match-data.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hyewnsu50 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLmVsIGIvbGlzcC9vcmcuZWwKaW5kZXggMGY3YTRlZi4uZmRm YTQ3OCAxMDA2NDQKLS0tIGEvbGlzcC9vcmcuZWwKKysrIGIvbGlzcC9vcmcuZWwKQEAgLTE5MTY4 LDEzICsxOTE2OCwxNCBAQCBib3VuZGFyaWVzLiIKIAkJCSAgICAgKHdoZW4gcGFyYWdyYXBoCiAJ CQkgICAgICAgKHNhdmUtZXhjdXJzaW9uCiAJCQkJIChnb3RvLWNoYXIgKG9yZy1lbGVtZW50LXBy b3BlcnR5IDpiZWdpbiBwYXJhZ3JhcGgpKQotCQkJCSAod2hlbiAoc2F2ZS1tYXRjaC1kYXRhCi0J CQkJCSAocmUtc2VhcmNoLWZvcndhcmQKLQkJCQkJICAiXlsgXHRdKiNcXCthdHRyXy4qPzogKy4q Pzp3aWR0aCArXFwoXFxTLStcXCkiCi0JCQkJCSAgKG9yZy1lbGVtZW50LXByb3BlcnR5Ci0JCQkJ CSAgIDpwb3N0LWFmZmlsaWF0ZWQgcGFyYWdyYXBoKQotCQkJCQkgIHQpKQotCQkJCSAgIChzdHJp bmctdG8tbnVtYmVyIChtYXRjaC1zdHJpbmcgMSkpKSkpKQorCQkJCSAoc2F2ZS1tYXRjaC1kYXRh CisJCQkJICAgKHdoZW4gCisJCQkJICAgICAgIChyZS1zZWFyY2gtZm9yd2FyZAorCQkJCQkiXlsg XHRdKiNcXCthdHRyXy4qPzogKy4qPzp3aWR0aCArXFwoXFxTLStcXCkiCisJCQkJCShvcmctZWxl bWVudC1wcm9wZXJ0eQorCQkJCQkgOnBvc3QtYWZmaWxpYXRlZCBwYXJhZ3JhcGgpCisJCQkJCXQp CisJCQkJICAgICAoc3R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