From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Frankie Y. Liu" Subject: Re: org-file-apps regex matching against path not link Date: Thu, 12 Apr 2018 15:41:04 -0700 Message-ID: References: <87po34use0.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c1ccb9a68d6d40569ae739c" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6ktv-0001ZF-Cf for emacs-orgmode@gnu.org; Thu, 12 Apr 2018 18:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6ktu-0002sp-E5 for emacs-orgmode@gnu.org; Thu, 12 Apr 2018 18:41:07 -0400 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:36436) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6ktu-0002sC-7Q for emacs-orgmode@gnu.org; Thu, 12 Apr 2018 18:41:06 -0400 Received: by mail-wm0-x22f.google.com with SMTP id x82so1033114wmg.1 for ; Thu, 12 Apr 2018 15:41:06 -0700 (PDT) In-Reply-To: <87po34use0.fsf@nicolasgoaziou.fr> 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" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --94eb2c1ccb9a68d6d40569ae739c Content-Type: text/plain; charset="UTF-8" Hi Nicolas, For: \\.pdf:\\([0-9]+\\)\\' [0-9]+ vs \d+ same issue, since the path not the link is being matched. Example: file:foo.pdf::1 will be matching on file:foo.pdf and the ::1 is dropped. Therefore it doesn't matter what you put after :: it is not being used. On Thu, Apr 12, 2018 at 12:38 PM, Nicolas Goaziou wrote: > Hello, > > "Frankie Y. Liu" writes: > > > I wanted to open a pdf at a particular page, the instructions under > > org-file-apps suggested using > > > > (add-to-list 'org-file-apps '("\\.pdf::\\(\\d+\\)\\'" . "evince -p %1 > > %s")) > > What is "\d+"? You may want to try [0-9]+ insteal. > > Regards, > > -- > Nicolas Goaziou > --94eb2c1ccb9a68d6d40569ae739c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Nicolas,

For:

\\.pdf:\\([0-9]+\\)\\'

[0-9]+ vs \d+ same i= ssue, since the path not the link is being matched.

Example:=C2=A0
file:foo.pdf::1 will be matching on file:foo.pdf= and the ::1 is dropped.

Therefore it doesn't = matter what you put after :: it is not being used.




<= br>
On Thu, Apr 12, 2018 at 12:38 PM, Nicolas Goa= ziou <mail@nicolasgoaziou.fr> wrote:
Hello,

"Frankie Y. Liu" <f= rankie.y.liu@gmail.com> writes:

> I wanted to open a pdf at a particular page, the instructions under > org-file-apps suggested using
>
> (add-to-list 'org-file-apps '("\\.pdf::\\(\\d+\\)\\'&= quot; . "evince -p %1
> %s"))

What is "\d+"? You may want to try [0-9]+ insteal.

Regards,

--
Nicolas Goaziou

--94eb2c1ccb9a68d6d40569ae739c--