all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Open in org-mode link 'file://path/file.html' with w3m-el
Date: Thu, 17 Jun 2010 00:41:29 +0200	[thread overview]
Message-ID: <87iq5i7g86.fsf@fh-trier.de> (raw)
In-Reply-To: mailman.10.1276721218.15244.help-gnu-emacs@gnu.org

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



       reply	other threads:[~2010-06-16 22:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.10.1276721218.15244.help-gnu-emacs@gnu.org>
2010-06-16 22:41 ` Andreas Politz [this message]
2010-06-16 20:41 Open in org-mode link 'file://path/file.html' with w3m-el Paul Chany

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iq5i7g86.fsf@fh-trier.de \
    --to=politza@fh-trier.de \
    --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.
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.