emacs-orgmode
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]