help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How can use the Hyperlinks in org-mode?


From: Shahab Shahsavari Alavidjeh
Subject: Re: How can use the Hyperlinks in org-mode?
Date: Thu, 15 Oct 2015 09:22:52 +0330
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Navy Cheng <navych@126.com> writes:


> I use [[file:picture/xxx.jpg]] to link a picture and the .jpg file is opened
> by emacs. However I want to open the .jpg with ristretto. How can I specify
> the default picture viewer?

C-c C-o actually runs (org-open-at-point) command in an org buffer

>From Documentation:

      When point is on a link, follow it.  Normally, files will be
      opened by an appropriate application.  If the optional prefix
      argument ARG is non-nil, Emacs will visit the file.  With
      a double prefix argument, try to open outside of Emacs, in the
      application the system uses for this file type.

In this documentation screen phrase `appropriate application' means
"What Emacs thinks is appropriate" not "What O.S. thinks is
appropriate".

If you want to change the default behavior of C-c C-o you should pass an
argument to it (Which Emacs decides where to open it and it tries to
open it itself if possible), if you pass a single prefix argument ( C-u
C-c C-o ) you'll instruct it to open file inside of Emacs explicitly. If
you want it to open file outside of Emacs you should use two prefix
arguments, which should be like this `C-u C-u C-c C-o'

Emacs by default configured to open many mime-types inside Emacs, (you
can see default modes for mime types in `C-h v auto-mode-alist' ) and
org-mode follows these associations by default. If you want org-mode to open 
image
files outside Emacs without bothering to use prefix arguments, you can
change file type association by manipulating this list, but IMO that's
not an good idea, because it change the behavior everywhere. Much better
idea is to manipulate `org-file-apps' list.

Therefore I can refer you to this stackoverflow answer which explains
how to change default C-c C-o behavior inside org-mode buffers:

      
http://stackoverflow.com/questions/3973896/emacs-org-mode-file-viewer-associations#3985552
      



reply via email to

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