r...@rickster.com 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