[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] make new links show as figures?
From: |
Alan Schmitt |
Subject: |
Re: [O] make new links show as figures? |
Date: |
Thu, 31 Oct 2013 11:04:30 +0100 |
User-agent: |
mu4e 0.9.9.6pre2; emacs 24.3.1 |
address@hidden writes:
> On 2013-10-26 08:10, John Kitchin wrote:
>> Other than having to repeat yourself, wouldn't the
>> [[custom:file.ext][file:file.png]] syntax allow for most/all of the
>> use cases mentioned?
>>
>> rick
>>
>> Yes, I think [[custom:file.ext][file:file.png]] would cover all
>> those cases.
>
> So it turns out that this is a REALLY simple patch (two characters):
>
> --- a/lisp/org.el
> +++ 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!
Alan
- [O] make new links show as figures?, John Kitchin, 2013/10/22
- 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 <=
- Re: [O] make new links show as figures?, Rick Frankel, 2013/10/31
- Re: [O] make new links show as figures?, Cook, Malcolm, 2013/10/31
- 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