From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Lomov Subject: Re: Proper use of 'org-file-apps' Date: Thu, 27 Jun 2013 15:58:29 +0900 Message-ID: <20130627065829.GB688@smoon> References: <20130627042713.GA688@smoon> <87hagk3xse.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Us6A9-0000yl-QV for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 02:58:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Us6A8-0002U0-DR for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 02:58:37 -0400 Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]:42946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Us6A8-0002Tw-61 for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 02:58:36 -0400 Received: by mail-lb0-f182.google.com with SMTP id r11so217112lbv.41 for ; Wed, 26 Jun 2013 23:58:35 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87hagk3xse.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nick Dokos Cc: emacs-orgmode@gnu.org ** Nick Dokos [2013-06-27 01:52:49 -0400]: > Vladimir Lomov 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