emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Define Keyboard Shortcut for "Open in Emacs"


From: Rainer M Krug
Subject: Re: [O] Define Keyboard Shortcut for "Open in Emacs"
Date: Tue, 07 Apr 2015 15:09:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

address@hidden (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:      address@hidden

Skype:      RMkrug

PGP: 0x0F52F982

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]