From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Proper use of 'org-file-apps' Date: Thu, 27 Jun 2013 09:33:41 -0400 Message-ID: <8761wzk79m.fsf@gmail.com> References: <20130627042713.GA688@smoon> <87hagk3xse.fsf@gmail.com> <20130627065829.GB688@smoon> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsCKc-00011z-Ob for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 09:33:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsCKa-0003f6-1Z for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 09:33:49 -0400 Received: from plane.gmane.org ([80.91.229.3]:44969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsCKZ-0003ev-SC for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 09:33:47 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UsCKY-0002Ij-RM for emacs-orgmode@gnu.org; Thu, 27 Jun 2013 15:33:46 +0200 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jun 2013 15:33:46 +0200 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Jun 2013 15:33:46 +0200 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: emacs-orgmode@gnu.org Vladimir Lomov writes: > ** 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. > 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