Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
org.el: Pass link match data to `org-file-apps' functions
* lisp/org.el (org--file-apps-entry-dlink-p): Fix it to pass match data to handler functions from `org-open-file' alist when pattern field of `org-file-apps' contains regexp subgroups. Update `org--file-apps-entry-dlink-p' to use current convention for action field of `org-file-apps' structure. Currently it may be a function while earlier s-expression was allowed. Obsolete test wrongly separated actions able to handle regexp subgroups matched in the link. An example when match data were not passed to the handler function: (add-to-list 'org-file-apps '("\\.pdf\\(?:\\.gz\\|\\.bz2\\|\\.xz\\)?\\(?:::.*\\)?\\'" . my-open-pdf-locator)) Notice that lambda functions passed `consp' test, so namely `defun' is required to reproduce the issue. This change was missed in the commit: c8a3ab1 2016-02-03 18:30:17 +0100 Nicolas Goaziou: `org-file-apps' accept functions instead of sexp For discussion of the issue with evaluation of arbitrary expression see https://list.orgmode.org/CALn3zoh+ACSU09eRurfwKjmCnw7i-_0KX7tA2jWqtu=vvQepLQ@mail.gmail.com/T/#u Michael Brand. org-player and switch to lexical binding in org.el. Sun, 17 Jan 2016 19:58:38 +0100
- Loading branch information