From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Define Keyboard Shortcut for "Open in Emacs" Date: Tue, 07 Apr 2015 15:09:31 +0200 Message-ID: References: <877fttjf5y.fsf@yale.edu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfTG8-0006R7-1j for emacs-orgmode@gnu.org; Tue, 07 Apr 2015 09:09:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfTG3-0003xF-So for emacs-orgmode@gnu.org; Tue, 07 Apr 2015 09:09:39 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:37874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfTG3-0003x4-Mm for emacs-orgmode@gnu.org; Tue, 07 Apr 2015 09:09:35 -0400 Received: by wiaa2 with SMTP id a2so18009528wia.0 for ; Tue, 07 Apr 2015 06:09:35 -0700 (PDT) In-Reply-To: <877fttjf5y.fsf@yale.edu> (Jorge A. Alfaro-Murillo's message of "Fri, 03 Apr 2015 13:27:21 -0400") 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: "Jorge A. Alfaro-Murillo" Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) writes: > Rainer M Krug writes: > >> I would like to open pdfs in emacs (using pdf-viewer) but there=20 >> is only a shortcut (C-c C-o) to open a pdf externally, and no=20 >> shortcut for the menu item below "Open in Emacs" in the context=20 >> menu.=20 >>=20 >> How can I define a shortcut for this command (or re-use C-c=20 >> C-o)? > > If you want C-c C-o to open in emacs, you can configure your=20 > org-file-apps: > > #+BEGIN_SRC emacs-lisp > (eval-after-load "org" > '(if (assoc "\\.pdf\\'" org-file-apps) > (setcdr (assoc "\\.pdf\\'" org-file-apps) 'emacs) > (add-to-list 'org-file-apps '("\\.pdf\\'" . 'emacs) t))) > #+END_SRC Good idea - I will keep this in mind and see. > > Alternatively, if you are on Linux, you could make your=20 > emacsclient your default pdf-viewer: Nope - Mac. Thanks, Rainer > > #+BEGIN_SRC shell > xdg-mime default emacsclient.desktop application/pdf > #+END_SRC > > Then the external program called by C-c C-o would also be emacs =3D) > > Best, =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJVI9cLAAoJENvXNx4PUvmCUz4H/2DuQG86yHy4dwRiAhMzV9gG X6XkQh6T4kftsrLRGvCoidbY9h5+QSCKPk3bgFVxrw8wZKayy3PTrdtgUQiQVxYr 40nglBcAgQTdcj++v49/skcLiFQf46ITNzRaLztSDKQ8rxXIGMz7EvXV2bXQ37iq qtMSB2xZpul4eZJV2ocddH+5DYyQ5n/o20ttXI4jYNCcxnExfW8t7++ElL1yaF0a MEa1T73ndoixH8UYr7H3viXIqqJ15hYRkmtmHBxdB3iuEvTZ+tdU7MVIOuwr8o60 C0r3Uo2fp97wB6lsU4MCPFS8fklUnjA7SygXcs/x2ws5k9o/K0Xx0oiNZtO6h1g= =n1ch -----END PGP SIGNATURE----- --=-=-=--