emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vladimir Lomov <lomov.vl@gmail.com>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Proper use of 'org-file-apps'
Date: Thu, 27 Jun 2013 15:58:29 +0900	[thread overview]
Message-ID: <20130627065829.GB688@smoon> (raw)
In-Reply-To: <87hagk3xse.fsf@gmail.com>

** 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.

Thank you Nick, [[:digit:]] works fine.

---
WBR, Vladimir Lomov

-- 
My family history begins with me, but yours ends with you.
		-- Iphicrates

  reply	other threads:[~2013-06-27  6:58 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 [this message]
2013-06-27 13:33     ` Nick Dokos
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=20130627065829.GB688@smoon \
    --to=lomov.vl@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /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).