From: Shahab Shahsavari Alavidjeh <zzgraph@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How can use the Hyperlinks in org-mode?
Date: Thu, 15 Oct 2015 09:22:52 +0330 [thread overview]
Message-ID: <87eggwn0ej.fsf@fedora22.zzgraph> (raw)
In-Reply-To: <20151015041735.GA12835@debian> (Navy Cheng's message of "Thu, 15 Oct 2015 12:17:35 +0800")
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
prev parent reply other threads:[~2015-10-15 5:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 4:17 How can use the Hyperlinks in org-mode? Navy Cheng
2015-10-15 5:52 ` Shahab Shahsavari Alavidjeh [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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eggwn0ej.fsf@fedora22.zzgraph \
--to=zzgraph@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
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).