org-mode/testing/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
..
test-ob-awk.el org-test: Fix ERC errors using latest Emacs master 2021-11-24 20:06:15 +08:00
test-ob-C.el org-test: Fix ERC errors using latest Emacs master 2021-11-24 20:06:15 +08:00
test-ob-clojure.el Update copyright year to 2022 2022-01-01 15:17:08 -05:00
test-ob-emacs-lisp.el Update copyright year to 2022 2022-01-01 15:17:08 -05:00
test-ob-eshell.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-exp.el org-babel-exp-process-buffer: Improve performance 2022-06-16 13:21:39 +08:00
test-ob-fortran.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-header-arg-defaults.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-java.el Update copyright year to 2022 2022-01-01 15:17:08 -05:00
test-ob-julia.el Include support for evaluating julia code 2021-09-25 16:00:02 +02:00
test-ob-lilypond.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-lob.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-lua.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-maxima.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-octave.el test-ob-octave: Add missing `provide' 2022-04-27 16:56:31 +08:00
test-ob-perl.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-plantuml.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-python.el ob-comint.el, ob-python.el: Async session evaluation 2021-05-18 09:13:28 -07:00
test-ob-R.el lisp/ob-R: Async evaluation in R 2021-09-28 18:22:12 +02:00
test-ob-ruby.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-scheme.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-sed.el org-test: Fix ERC errors using latest Emacs master 2021-11-24 20:06:15 +08:00
test-ob-shell.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-sql.el ob-sql.el: Add support for SAP HANA 2021-03-16 23:53:09 -04:00
test-ob-sqlite.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-table.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ob-tangle.el ob-tangle.el: fix ‘:comments noweb’ double linking 2022-08-13 14:39:09 +08:00
test-ob.el New babel syntax to pass src block contents as argument 2022-08-31 11:31:16 +08:00
test-oc.el oc: Allow declaring cite styles as a function 2021-12-12 15:42:29 +01:00
test-ol-bbdb.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-ol.el * testing/lisp/test-ol.el: Fix test name 2022-08-06 13:52:44 +08:00
test-org-agenda.el org-agenda: Fix regression when diary sexp timestamps are ignored 2022-03-26 15:17:45 +08:00
test-org-archive.el Re-implement org-element-cache and add headline support 2021-10-16 23:22:18 +08:00
test-org-attach-git.el test-org-attach-git: Fix recent failure to load tests 2021-11-27 16:16:51 -05:00
test-org-attach.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-capture.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-clock.el Use `org-encode-time' helper macro 2022-07-17 16:40:18 +08:00
test-org-colview.el Re-implement org-element-cache and add headline support 2021-10-16 23:22:18 +08:00
test-org-datetree.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-duration.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-element.el ; Fix typos 2022-07-01 17:42:52 +08:00
test-org-feed.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-fold.el test-org-fold: Cover the issue fixed by previous commit 2022-07-12 21:30:58 +08:00
test-org-footnote.el footnote: Allow footnotes at footnote definition start 2021-10-06 14:34:14 +02:00
test-org-info.el ol-info: Define :insert-description function 2022-08-26 21:09:39 +08:00
test-org-inlinetask.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-lint.el Merge branch 'bugfix' 2022-02-13 22:14:55 +01:00
test-org-list.el Use the full org-fold-core API when org-fold-core-style' is overlays' 2022-08-13 15:03:28 +08:00
test-org-macro.el macro: Properly collect multiple authors 2021-10-23 14:32:00 +02:00
test-org-macs.el test-org-macs.el: Add test for template-expansion bug 2022-04-30 17:45:32 +08:00
test-org-num.el org-num: Add tests 2020-08-28 08:45:41 +02:00
test-org-pcomplete.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-protocol.el test-org-protocol.el: Decode "+" to " " tests 2021-09-27 17:52:03 +02:00
test-org-src.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-table.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-tempo.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org-timer.el Prefer HTTPS to HTTP for links to gnu.org 2021-03-21 14:29:13 -04:00
test-org.el org.el: Fix percent substitutions in `org-open-file' 2022-09-05 13:27:14 +08:00
test-ox-publish.el ; Fix typos 2022-07-01 17:42:52 +08:00
test-ox.el testing/lisp: Update to handle new download policy 2022-07-20 23:37:26 +08:00
test-property-inheritance.el org-test: Fix ERC errors using latest Emacs master 2021-11-24 20:06:15 +08:00