Re: greedy substitution in org-open-file

2021-03-21 Thread Maxim Nikulin
On 13/02/2021 11:38, Kyle Meyer wrote: +(defun org--open-file-format-spec (format specification) + (with-temp-buffer +(insert format) +(goto-char (point-min)) +(while (search-forward "%" nil t) + (cond ((eq (char-after) ?%) + (delete-char 1)) +((lookin

Re: greedy substitution in org-open-file

2021-03-03 Thread Maxim Nikulin
Discussion of the original patch: https://orgmode.org/list/4b51d104.9090...@jboecker.de/T/#u https://lists.gnu.org/archive/html/emacs-orgmode/2010-01/msg00450.html https://orgmode.org/list/4bb9c078.9050...@jboecker.de/ The patch may make it a little easier to break things by misconfiguring org-f

Re: greedy substitution in org-open-file

2021-02-15 Thread Maxim Nikulin
On 13/02/2021 11:38, Kyle Meyer wrote: All right, here's a format-spec-inspired fix. At the very least it needs doc updates and a comment or two. Thank you. I am hardly familiar with elisp so it would be difficult for me to express the same. My comments are mostly a matter of taste. Sorry,

Re: greedy substitution in org-open-file

2021-02-12 Thread Kyle Meyer
Maxim Nikulin writes: > On 12/02/2021 14:16, Kyle Meyer wrote: >> Not relevant for the underlying issue, but doesn't xpdf require a colon >> before the page number (i.e. ":%1")? > > At least for the application in debian & ubuntu xpdf package, page > number should be specified without a colon. I

Re: greedy substitution in org-open-file

2021-02-12 Thread Maxim Nikulin
On 12/02/2021 14:16, Kyle Meyer wrote: #+begin_src elisp (setq org-file-apps '(("\\.pdf::\\([0-9]+\\)\\'" . "xpdf %s %1"))) #+end_src Not relevant for the underlying issue, but doesn't xpdf require a colon before the page number (i.e. ":%1")? At least for the application in debian & ubunt

Re: greedy substitution in org-open-file

2021-02-11 Thread Kyle Meyer
Maxim Nikulin writes: > Looking into the code related to 'pty problem with > start-process-shell-command, I have realized that the following case is > not handled correctly: > > #+begin_src elisp >(setq org-file-apps '(("\\.pdf::\\([0-9]+\\)\\'" . "xpdf %s %1"))) > #+end_src Not relevant fo

greedy substitution in org-open-file

2021-01-20 Thread Maxim Nikulin
Looking into the code related to 'pty problem with start-process-shell-command, I have realized that the following case is not handled correctly: #+begin_src elisp (setq org-file-apps '(("\\.pdf::\\([0-9]+\\)\\'" . "xpdf %s %1"))) #+end_src I hope, I adapted an example from [[help:org-file-a