* How can use the Hyperlinks in org-mode?
@ 2015-10-15 4:17 Navy Cheng
2015-10-15 5:52 ` Shahab Shahsavari Alavidjeh
0 siblings, 1 reply; 2+ messages in thread
From: Navy Cheng @ 2015-10-15 4:17 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
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?
My OS is debian.
Thank you!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How can use the Hyperlinks in org-mode?
2015-10-15 4:17 How can use the Hyperlinks in org-mode? Navy Cheng
@ 2015-10-15 5:52 ` Shahab Shahsavari Alavidjeh
0 siblings, 0 replies; 2+ messages in thread
From: Shahab Shahsavari Alavidjeh @ 2015-10-15 5:52 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-15 5:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 4:17 How can use the Hyperlinks in org-mode? Navy Cheng
2015-10-15 5:52 ` Shahab Shahsavari Alavidjeh
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).