[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] make new links show as figures?
From: |
Cook, Malcolm |
Subject: |
Re: [O] make new links show as figures? |
Date: |
Thu, 31 Oct 2013 16:20:39 +0000 |
>>
>> So it turns out that this is a REALLY simple patch (two characters):
>>
>> +++ b/lisp/org.el
>> @@ -18853,7 +18853,7 @@ BEG and END default to the buffer boundaries."
>> (widen)
>> (setq beg (or beg (point-min)) end (or end (point-max)))
>> (goto-char beg)
>> - (let ((re (concat
>> "\\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([^]\n]+?"
>> + (let ((re (concat
>> "\\[.*\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([^]\n]+?"
>> (substring (org-image-file-name-regexp) 0 -2)
>> "\\)\\]" (if include-linked "" "\\]")))
>> (case-fold-search t)
>>
>> This seems to work in all cases I can think of (see test file below).
>> Let me know if this works for you and i will apply to master when i
>> get home and have git push access.
>>
>> I tried it on some files with images as links, and it works
>> great. Thanks a lot!
[Cook, Malcolm]
Hi - I'm trying to follow this thread but having a challenge. Can you please
summarize/repeat the original intended effect of this change....
~Malcolm
>
>So, I've done some testing of the export functions (html and latex
>only) and found the following behaviors with this patch:
>
>- HTML
>- image in description only displayed if the protocol (file:) is
>included.
>- LaTeX
>- same, required file: protocol in description
>- additionally, pdflatex \includgraphics barfs on any path w/ a
>=./= path prefix -- this is true for the current implmenation as
>well.
>
>Changing the regexp for in-buffer image expansion to mimic the export
>behavior is difficult at best. I think the inconsistency is
>acceptable, and I will documentment the behavior in the
>`org-display-inline-images' docstring.
>
>The latex breakage on paths beginning with =./= should perhaps be
>addressed in the latex exporter, but this is orthogonal to the
>current issue.
>
>If there is no objection, I will push a fix tonight or tomorrow.
>
>rick
>
- Re: [O] make new links show as figures?, (continued)
- Re: [O] make new links show as figures?, Rick Frankel, 2013/10/23
- Re: [O] make new links show as figures?, Alan Schmitt, 2013/10/24
- Re: [O] make new links show as figures?, Carsten Dominik, 2013/10/24
- Re: [O] make new links show as figures?, Rick Frankel, 2013/10/24
- Re: [O] make new links show as figures?, John Kitchin, 2013/10/24
- Re: [O] make new links show as figures?, Rick Frankel, 2013/10/25
- Re: [O] make new links show as figures?, John Kitchin, 2013/10/26
- Re: [O] make new links show as figures?, Rick Frankel, 2013/10/30
- Re: [O] make new links show as figures?, Alan Schmitt, 2013/10/31
- Re: [O] make new links show as figures?, Rick Frankel, 2013/10/31
- Re: [O] make new links show as figures?,
Cook, Malcolm <=
- Re: [O] make new links show as figures?, Rick Frankel, 2013/10/31
- Re: [O] make new links show as figures?, Alan Schmitt, 2013/10/31
- Re: [O] make new links show as figures?, Rick Frankel, 2013/10/24
- Re: [O] make new links show as figures?, Rick Frankel, 2013/10/24