emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Proper use of 'org-file-apps'


From: Vladimir Lomov
Subject: Re: [O] Proper use of 'org-file-apps'
Date: Fri, 28 Jun 2013 08:56:12 +0900
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,
** Nick Dokos [2013-06-27 09:33:41 -0400]:

> Vladimir Lomov <address@hidden> writes:

>> ** Nick Dokos [2013-06-27 01:52:49 -0400]:

>>> Vladimir Lomov <address@hidden> writes:

>>>> #+BEGIN_SRC emacs-lisp :tangle org-apps-c.el
>>>>   (add-to-list 'load-path "/usr/share/emacs/site-lisp/org")
>>>>   (require 'org)
>>>>   (setq org-file-apps
>>>>    '( ("\\.pdf::\\(\\d+\\)\\'" . "run-me --page %1 %s")
>>>>       ("\\.pdf\\'" . "run-me %s")
>>>>     )
>>>>   )
>>>> #+END_SRC


>>> \d is Perl regexp syntax for matching a digit, but (afaik) not emacs
>>> syntax. Try

>>>>    '( ("\\.pdf::\\([0-9]+\\)\\'" . "run-me --page %1 %s")

>>>or

>>>>    '( ("\\.pdf::\\([[:digit:]]+\\)\\'" . "run-me --page %1 %s")

>>> instead.
>> D'oh, I had searched Emacs manual about meaning of \' but didn't try to
>> check if \d is acceptable. Nevertheless, 'org-file-apps' docstring must
>> be updated then, because this \\d part is from it.

> Yes, indeed. There's also the vexing question of backslashes. At least
> in my version of the C-h v org-file-apps output, the examples appear
> with single backslashes in the quoted strings, so if somebody just cuts
> and pastes, it is *not* going to work.

> Could you make a patch?

Something like that?

---
WBR, Vladimir Lomov

-- 
Are we running light with overbyte?

Attachment: 0001-Fix-docstring-for-org-file-apps.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]