From: Rainer M Krug <Rainer@krugs.de>
To: "Jorge A. Alfaro-Murillo" <jorge.alfaro-murillo@yale.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Define Keyboard Shortcut for "Open in Emacs"
Date: Tue, 07 Apr 2015 15:09:31 +0200 [thread overview]
Message-ID: <m2fv8c5blg.fsf@krugs.de> (raw)
In-Reply-To: <877fttjf5y.fsf@yale.edu> (Jorge A. Alfaro-Murillo's message of "Fri, 03 Apr 2015 13:27:21 -0400")
[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]
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
>> is only a shortcut (C-c C-o) to open a pdf externally, and no
>> shortcut for the menu item below "Open in Emacs" in the context
>> menu.
>>
>> How can I define a shortcut for this command (or re-use C-c
>> C-o)?
>
> If you want C-c C-o to open in emacs, you can configure your
> 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
> 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 =)
>
> Best,
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
prev parent reply other threads:[~2015-04-07 13:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 13:33 Define Keyboard Shortcut for "Open in Emacs" Rainer M Krug
2015-04-03 13:51 ` John Kitchin
2015-04-03 17:04 ` J. David Boyd
2015-04-03 17:35 ` Nicolas Goaziou
2015-04-07 13:06 ` Rainer M Krug
2015-04-03 17:27 ` Jorge A. Alfaro-Murillo
2015-04-04 21:44 ` Xavier Maillard
2015-04-04 22:56 ` Jorge A. Alfaro-Murillo
2015-04-05 4:59 ` Xavier Maillard
2015-04-06 13:44 ` Jorge A. Alfaro-Murillo
2015-04-07 4:53 ` Xavier Maillard
2015-04-07 13:09 ` Rainer M Krug [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2fv8c5blg.fsf@krugs.de \
--to=rainer@krugs.de \
--cc=emacs-orgmode@gnu.org \
--cc=jorge.alfaro-murillo@yale.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).