org-mode/lisp
Max Nikulin ac2d0a249e
org.el: Fix percent substitutions in `org-open-file'
* lisp/org.el (org--open-file-format-command): New function with better
coverage of mailcap RFC 1524 syntax.  Do not replace percent character
in file name or link component, fix substitution of multiple regular
expression groups matched in the link target.
(org-open-file): Use `org--open-file-format-command' instead of inline
code.
* testing/lisp/test-org.el (org-test/org--open-file-format-command):
Tests for `org--open-file-format-command'.

The primary goal of moving code outside of `org-open-file' function is to
make it testable.

It should fix the following issues:
- Maxim Nikulin. greedy substitution in org-open-file.
  Wed, 20 Jan 2021 23:08:35 +0700.
  https://list.orgmode.org/ru9ki4$t5e$1@ciao.gmane.io
- Rodrigo Morales. Org mode links: Open a PDF file at a given page
  and highlight a given string. Tue, 02 Mar 2021 15:07:32 -0500.
  https://list.orgmode.org/87lfb5pbej.fsf@gmail.com
2022-09-05 13:27:14 +08:00
..
Makefile Move link-related core functions out of "org.el" 2019-03-10 18:00:27 +01:00
ob-awk.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-C.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-calc.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-clojure.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-comint.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-core.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-css.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-ditaa.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-dot.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-emacs-lisp.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-eshell.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-eval.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-exp.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-forth.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-fortran.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-gnuplot.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-groovy.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-haskell.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-java.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-js.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-julia.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-latex.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-lilypond.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-lisp.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-lob.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-lua.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-makefile.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-matlab.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-maxima.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-ocaml.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-octave.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-org.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-perl.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-plantuml.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-processing.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-python.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-R.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-ref.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-ruby.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-sass.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-scheme.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-screen.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-sed.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-shell.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-sql.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-sqlite.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-table.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-tangle.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc-basic.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc-biblatex.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc-bibtex.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc-csl.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc-natbib.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-bbdb.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-bibtex.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-docview.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-doi.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-eshell.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-eww.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-gnus.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-info.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-irc.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-man.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-mhe.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-rmail.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-w3m.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-agenda.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-archive.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-attach-git.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-attach.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-capture.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-clock.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-colview.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-compat.el org-compat: Fix incorrect usage of `apply' in ea665792b 2022-09-04 12:41:01 +08:00
org-crypt.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-ctags.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-cycle.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-datetree.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-duration.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-element.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-entities.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-faces.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-feed.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-fold-core.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-fold.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-footnote.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-goto.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-habit.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-id.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-indent.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-inlinetask.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-keys.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-lint.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-list.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-macro.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-macs.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-mobile.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-mouse.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-num.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-pcomplete.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-persist.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-plot.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-protocol.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-refile.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-src.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-table.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-tempo.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-timer.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org.el org.el: Fix percent substitutions in `org-open-file' 2022-09-05 13:27:14 +08:00
ox-ascii.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-beamer.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-html.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-icalendar.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-koma-letter.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-latex.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-man.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-md.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-odt.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-org.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-publish.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-texinfo.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00