all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Open in org-mode link 'file://path/file.html' with w3m-el
@ 2010-06-16 20:41 Paul Chany
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Chany @ 2010-06-16 20:41 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I have setup custom-variable 'browse-url-browser-function' to
'w3m-browse-url' but it works only with links 'http://etc./index.html

When in an org file have a link 'file://path/index.html' I want to open
it with w3m-browse-url too but don't know how to setup this?

I tried setup the customn-variable
'(org-file-apps (quote ((auto-mode . emacs) ("\\.x?html?\\'"
. w3m-browse-url) ("\\.pdf\\'" . default))))

but this doesn't work. I don't know how to write the Lisp form to this
to work?

How can I setup org-file-apps to open a html file with w3m-el?

Any advices will be appreciated!

-- 
Regards,
Paul Chany
You can freely correct my English.
http://csanyi-pal.info




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Open in org-mode link 'file://path/file.html' with w3m-el
       [not found] <mailman.10.1276721218.15244.help-gnu-emacs@gnu.org>
@ 2010-06-16 22:41 ` Andreas Politz
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Politz @ 2010-06-16 22:41 UTC (permalink / raw)
  To: help-gnu-emacs

Paul Chany <csanyipal@gmail.com> writes:

> Hi,
>
> I have setup custom-variable 'browse-url-browser-function' to
> 'w3m-browse-url' but it works only with links 'http://etc./index.html
>
> When in an org file have a link 'file://path/index.html' I want to open
> it with w3m-browse-url too but don't know how to setup this?
>
> I tried setup the customn-variable
> '(org-file-apps (quote ((auto-mode . emacs) ("\\.x?html?\\'"
> . w3m-browse-url) ("\\.pdf\\'" . default))))
>
> but this doesn't work. I don't know how to write the Lisp form to this
> to work?
>
> How can I setup org-file-apps to open a html file with w3m-el?
>
> Any advices will be appreciated!

According to (describe-variable 'org-file-apps) the cdr can't be a
function but a sexp, where the variable `file' holds the file-name of the
link.  So I propose

(add-to-list 'org-file-apps '("\\.html\\'" . (browse-url-of-file file)))

...or any other browse-function accepting a file-name as argument.

-ap



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-16 22:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.10.1276721218.15244.help-gnu-emacs@gnu.org>
2010-06-16 22:41 ` Open in org-mode link 'file://path/file.html' with w3m-el Andreas Politz
2010-06-16 20:41 Paul Chany

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.