From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Proper use of 'org-file-apps'
Date: Thu, 27 Jun 2013 09:33:41 -0400 [thread overview]
Message-ID: <8761wzk79m.fsf@gmail.com> (raw)
In-Reply-To: 20130627065829.GB688@smoon
Vladimir Lomov <lomov.vl@gmail.com> writes:
> ** Nick Dokos [2013-06-27 01:52:49 -0400]:
>
>> Vladimir Lomov <lomov.vl@gmail.com> 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?
--
Nick
next prev parent reply other threads:[~2013-06-27 13:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 4:27 Proper use of 'org-file-apps' Vladimir Lomov
2013-06-27 5:52 ` Nick Dokos
2013-06-27 6:58 ` Vladimir Lomov
2013-06-27 13:33 ` Nick Dokos [this message]
2013-06-27 23:56 ` Vladimir Lomov
2013-06-28 2:14 ` Nick Dokos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8761wzk79m.fsf@gmail.com \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).