Max Nikulin <maniku...@gmail.com> writes: > Currently I believe that instead of injecting up to 6 entries into > `org-file-apps' for various combinations of page, anchor, and search > pattern, it is better to add single record with function handler. Notice > that the approach presented above is not affected by the bug with > multiple regexp group. Its additional advantage is that shell is not > involved, so peculiar file names can not cause execution of some code > when quoting and escaping are messed up. > > I think a set of functions for popular PDF viewers (evince, zathura, > okular, xpdf, xpopple, firefox, chromium & Co., etc.) should be defined > in some package, but I am in doubts if it suitable for Org core. > > Proof of concept implementation.
Thanks for taking time to implement this proof of concept! I think that it is a very good idea for Org core to support search terms in file links that are handled by Free Software. Moreover, I think that we should, by default, auto-detect and use Free Software to open file links, when such software is installed on user machine (unless the user explicitly instruct otherwise). I see Free Software support as dedicated files like ol-evince, ol-okular, etc. The file functionality and common function may probably be factored out into ol-file library. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92