* I can not change the behavior of open the link which is a CHM file [[file+sys://kk.chm]]
@ 2013-07-09 12:04 chris
2013-07-09 13:46 ` Nick Dokos
0 siblings, 1 reply; 6+ messages in thread
From: chris @ 2013-07-09 12:04 UTC (permalink / raw)
To: Emacs Org-mode
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
I set variable "org-file-apps" like this:
(setq org-file-apps
'(;; default
(auto-mode . emacs)
("\\.mm\\'" . default)
;; ("\\.x?html?\\'" . default)
("\.x?html\'" . "firefox %s")
("\\.pdf\\'" . default)
("\\.pdf::\\([[:digit:]]+\\)\\'" . "okular -p %1 %s")
;; extras
("\\.chm\\'" . "kchmviewer %s") ;; TODO open CHM file with external program.
))
But when I open a CHM file, Emacs does not open it with "kchmviewer", just open
CHM in Emacs.
What's wrong ?
--
E M A C S
s e l o h
c t t n i
p a t f
a r t
e o
l
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone}
IRC(freenode): stardiviner \\ Twitter: @numbchild \\
GnuPG Key fingerprint
>>> 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: I can not change the behavior of open the link which is a CHM file [[file+sys://kk.chm]]
2013-07-09 12:04 I can not change the behavior of open the link which is a CHM file [[file+sys://kk.chm]] chris
@ 2013-07-09 13:46 ` Nick Dokos
2013-07-09 14:08 ` Jambunathan K
0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2013-07-09 13:46 UTC (permalink / raw)
To: emacs-orgmode
chris <numbchild@gmail.com> writes:
> I set variable "org-file-apps" like this:
>
>
> (setq org-file-apps
> '(;; default
> (auto-mode . emacs)
> ("\\.mm\\'" . default)
> ;; ("\\.x?html?\\'" . default)
> ("\.x?html\'" . "firefox %s")
> ("\\.pdf\\'" . default)
> ("\\.pdf::\\([[:digit:]]+\\)\\'" . "okular -p %1 %s")
> ;; extras
> ("\\.chm\\'" . "kchmviewer %s") ;; TODO open CHM file with external program.
> ))
>
> But when I open a CHM file, Emacs does not open it with "kchmviewer", just open
> CHM in Emacs.
>
> What's wrong ?
Nothing is wrong. org-file-apps applies only to links that org-mode
knows about (e.g. when you follow a link to a CHM file from an org file
- that should work). In order to affect emacs as a whole, you need to
modify one of your mailcap files - read the manual page mailca[(5) for
the details. It's probably best to put it in your personal mailcap file,
~/.mailcap, but if your machine is used by other people who might also
want the association, you might want to put it into /etc/mailcap. I have
no idea how Windows does these things, so if you are running on Windows
you might need additional help.
mailcap maps content type (e.g. chemical/x-chemdraw) to processor:
chemical/x-chemdraw; kchmviewer %s
You might also need to provide an association between a filename suffix
and a content type. That is done in /etc/mime.types or ~/.mime.types:
chemical/x-chemdraw chm
My /etc/mime.types already contained this association.
This is the general mechanism and *all* programs that claim to deal
with MIME content use it, including emacs. org-file-apps should be
used only to impose *exceptions* to this rule (e.g. you might want to
treat some content types differently if they are found as targets of
links from org files).
--
Nick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: I can not change the behavior of open the link which is a CHM file [[file+sys://kk.chm]]
2013-07-09 13:46 ` Nick Dokos
@ 2013-07-09 14:08 ` Jambunathan K
2013-07-09 15:50 ` Nick Dokos
2013-07-10 1:19 ` chris
0 siblings, 2 replies; 6+ messages in thread
From: Jambunathan K @ 2013-07-09 14:08 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> In order to affect emacs as a whole, you need to modify one of your
> mailcap files
This will work as well.
(setcdr (assq 'system org-file-apps-defaults-gnu ) "xdg-open %s")
If xdg-open is not available, one can replace it with gnome-open or
kde-open.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: I can not change the behavior of open the link which is a CHM file [[file+sys://kk.chm]]
2013-07-09 14:08 ` Jambunathan K
@ 2013-07-09 15:50 ` Nick Dokos
2013-07-09 16:38 ` Jambunathan K
2013-07-10 1:19 ` chris
1 sibling, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2013-07-09 15:50 UTC (permalink / raw)
To: Jambunathan K; +Cc: Nick Dokos, emacs-orgmode
On 07/09/2013 10:08 AM, Jambunathan K wrote:
> Nick Dokos <ndokos@gmail.com> writes:
>
>> In order to affect emacs as a whole, you need to modify one of your
>> mailcap files
> This will work as well.
>
> (setcdr (assq 'system org-file-apps-defaults-gnu ) "xdg-open %s")
>
> If xdg-open is not available, one can replace it with gnome-open or
> kde-open.
I don't understand: how will changing org-file-apps-defaults-gnu
affect the rest of emacs?
E.g. if I receive a chem attachment and I use e.g. mh-e to read my mail,
how will that help me?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: I can not change the behavior of open the link which is a CHM file [[file+sys://kk.chm]]
2013-07-09 15:50 ` Nick Dokos
@ 2013-07-09 16:38 ` Jambunathan K
0 siblings, 0 replies; 6+ messages in thread
From: Jambunathan K @ 2013-07-09 16:38 UTC (permalink / raw)
To: Nick Dokos; +Cc: Nick Dokos, emacs-orgmode
Nick Dokos <nick@dokosmarshall.org> writes:
> On 07/09/2013 10:08 AM, Jambunathan K wrote:
>> Nick Dokos <ndokos@gmail.com> writes:
>>
>>> In order to affect emacs as a whole, you need to modify one of your
>>> mailcap files
>> This will work as well.
>>
>> (setcdr (assq 'system org-file-apps-defaults-gnu ) "xdg-open %s")
>>
>> If xdg-open is not available, one can replace it with gnome-open or
>> kde-open.
> I don't understand: how will changing org-file-apps-defaults-gnu
> affect the rest of emacs?
> E.g. if I receive a chem attachment and I use e.g. mh-e to read my
> mail, how will that help me?
Did I forget `Conditions apply'?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: I can not change the behavior of open the link which is a CHM file [[file+sys://kk.chm]]
2013-07-09 14:08 ` Jambunathan K
2013-07-09 15:50 ` Nick Dokos
@ 2013-07-10 1:19 ` chris
1 sibling, 0 replies; 6+ messages in thread
From: chris @ 2013-07-10 1:19 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 744 bytes --]
Excerpts from [ Jambunathan K ] //// On [2013-07-09 19:38:35 +0530]:
> Nick Dokos <ndokos@gmail.com> writes:
>
> > In order to affect emacs as a whole, you need to modify one of your
> > mailcap files
>
> This will work as well.
>
> (setcdr (assq 'system org-file-apps-defaults-gnu ) "xdg-open %s")
This is great, thanks. A good and simple method.
>
> If xdg-open is not available, one can replace it with gnome-open or
> kde-open.
--
E M A C S
s e l o h
c t t n i
p a t f
a r t
e o
l
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone}
IRC(freenode): stardiviner \\ Twitter: @numbchild \\
GnuPG Key fingerprint
>>> 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-10 1:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-09 12:04 I can not change the behavior of open the link which is a CHM file [[file+sys://kk.chm]] chris
2013-07-09 13:46 ` Nick Dokos
2013-07-09 14:08 ` Jambunathan K
2013-07-09 15:50 ` Nick Dokos
2013-07-09 16:38 ` Jambunathan K
2013-07-10 1:19 ` chris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.