From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: pdf files with openwith only, and only this. Date: Thu, 4 Jul 2019 07:44:08 -0400 Message-ID: References: <87ef36xdxk.fsf@yandex.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000093bba2058cd97f31" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33999) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj0A3-0000CN-Hm for emacs-orgmode@gnu.org; Thu, 04 Jul 2019 07:44:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hj0A2-0007rj-7f for emacs-orgmode@gnu.org; Thu, 04 Jul 2019 07:44:23 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:38097) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hj0A1-0007ms-Ni for emacs-orgmode@gnu.org; Thu, 04 Jul 2019 07:44:22 -0400 Received: by mail-wr1-x42c.google.com with SMTP id p11so794394wro.5 for ; Thu, 04 Jul 2019 04:44:21 -0700 (PDT) In-Reply-To: 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: Joseph Vidal-Rosset Cc: Colin Baxter , "Liste-emacs-orgmode@gnu.org" --00000000000093bba2058cd97f31 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I don't think org-ref is responsible, except that it installs pdf-tools. When I click on a link like [[./2019-07-04.pdf]] it opens in acrobat for me. I don't have anything fancy org-file-apps is a variable defined in `org.el'. Its value is ((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default)) which I guess means on osx that it gets opened with "open". It looks like you can do this #+BEGIN_SRC emacs-lisp (setf (cdr (assoc "\\.pdf\\'" org-file-apps)) "evince %s") #+END_SRC to make it open in evince. John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Thu, Jul 4, 2019 at 7:24 AM Joseph Vidal-Rosset < joseph.vidal.rosset@gmail.com> wrote: > Dear Colin (cc. John), > > Many thanks ! Unfortunately, I have always the same result. Here is the > message: > > Viewing with pdf-view-mode > pdf-info-encrypted-p: pdf-info-epdfinfo-program is not executable > > is org-ref the culprit? I cc. to John Kitchin. > > Best wishes, > > Jo. > > Le jeu. 4 juil. 2019 =C3=A0 13:00, Colin Baxter a =C3= =A9crit : > > > > Dear Joseph, > > >>>>> Joseph Vidal-Rosset writes: > > > > > Hi the list, I do not want to use pdf-tools to view pdf in emacs, > > > I want only to use an external program (evince) to view pdf > > > files. Unfortunately, links to pdf do not work with openwith and > > > my emacs open on a pdf. I cannot delete pdft-tools that is a > > > dependency of org-ref that I am using. A solution for my setup > > > would be welcome. > > > > Try this: > > > > (add-hook 'org-mode-hook > > '(lambda () > > (delete '("\\.pdf\\'" . default) org-file-apps) > > (add-to-list 'org-file-apps '("\\.pdf\\'" . "evince %s")))) > > > > Best wishes, > > > > Colin Baxter > > www.Colin-Baxter.com > > --00000000000093bba2058cd97f31 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't think org-ref is responsible, except that it i= nstalls pdf-tools. When I click on a link like=C2=A0
[[./2019-07-04.pdf]= ] it opens in acrobat for me.

I don't have anything = fancy
org-file-apps is a variable defined in `org.el'.
Its= value is
((auto-mode . emacs) ("\\.mm\\'" . default) (&q= uot;\\.x?html?\\'" . default)
=C2=A0("\\.pdf\\'" = . default))

which I guess means on osx that it get= s opened with "open".

It looks like you = can do this

#+BEGIN_SRC emacs-lisp
(setf (cdr (= assoc "\\.pdf\\'" org-file-apps)) "evince %s")
#= +END_SRC

to make it open in evince.
=

John

---= --------------------------------
Professor John Kitchin=C2=A0
Doherty= Hall A207F
Department of Chemical Engineering
Carnegie Mellon Univer= sity
Pittsburgh, PA 15213
412-268-7803

On Thu, Jul 4, 2019 at 7:24 AM Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com= > wrote:
Dear= Colin (cc. John),

Many thanks ! Unfortunately, I have always the same result. Here is the mes= sage:

Viewing with pdf-view-mode
pdf-info-encrypted-p: pdf-info-epdfinfo-program is not executable

is org-ref the culprit? I cc. to John Kitchin.

Best wishes,

Jo.

Le jeu. 4 juil. 2019 =C3=A0 13:00, Colin Baxter <m43cap@yandex.com> a =C3=A9crit : >
> Dear Joseph,
> >>>>> Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com= > writes:
>
>=C2=A0 =C2=A0 =C2=A0> Hi the list, I do not want to use pdf-tools to= view pdf in emacs,
>=C2=A0 =C2=A0 =C2=A0> I want only to use an external program (evince= ) to view pdf
>=C2=A0 =C2=A0 =C2=A0> files. Unfortunately, links to pdf do not work= with openwith and
>=C2=A0 =C2=A0 =C2=A0> my emacs open on a pdf. I cannot delete pdft-t= ools that is a
>=C2=A0 =C2=A0 =C2=A0> dependency of org-ref that I am using. A solut= ion for my setup
>=C2=A0 =C2=A0 =C2=A0> would be welcome.
>
> Try this:
>
> (add-hook 'org-mode-hook
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '(lambda ()
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(delete '("\\.= pdf\\'" . default) org-file-apps)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(add-to-list 'org-f= ile-apps '("\\.pdf\\'" . "evince %s"))))
>
> Best wishes,
>
> Colin Baxter
> www.Colin-Baxter.com

--00000000000093bba2058cd97f31--