From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pedro Insua Newsgroups: gmane.emacs.help Subject: Re: How to setup w3m-el as a default browser on GNU system? Date: Fri, 18 Jun 2010 10:52:38 +0200 Message-ID: <20100618085238.GA13330@Zsdrums> References: <87k4pxkbjd.fsf@debian-laptop.localdomain> <20100617170705.GA4799@Zsdrums> <87ljad4bty.fsf@debian-laptop.localdomain> <20100617212840.GB4799@Zsdrums> <87fx0l4a31.fsf@debian-laptop.localdomain> <20100617221853.GC4799@Zsdrums> <87ocf92sox.fsf@debian-laptop.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1276851073 3659 80.91.229.12 (18 Jun 2010 08:51:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Jun 2010 08:51:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 18 10:51:11 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OPXI6-0002G9-JX for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Jun 2010 10:51:10 +0200 Original-Received: from localhost ([127.0.0.1]:45475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPXI5-0001QB-K1 for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Jun 2010 04:51:09 -0400 Original-Received: from [140.186.70.92] (port=40083 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPXHX-0001KX-K8 for help-gnu-emacs@gnu.org; Fri, 18 Jun 2010 04:50:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPXHW-0002hR-9G for help-gnu-emacs@gnu.org; Fri, 18 Jun 2010 04:50:35 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:38964) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPXHW-0002hI-57 for help-gnu-emacs@gnu.org; Fri, 18 Jun 2010 04:50:34 -0400 Original-Received: by wyf28 with SMTP id 28so693187wyf.0 for ; Fri, 18 Jun 2010 01:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:content-transfer-encoding:in-reply-to:universe :user-agent; bh=vhGIDEn8/YdvyPdfDWxwtIgtmhcGZEME3Uxa7uhOhgc=; b=C/VvF+DIH3U2wkwmh8P4qZDTTCmXE3G5ge6QVxbVe+kmTW1VpzNxfbWK/2ZhGlpTpB ZrbhdA/RHcPkDL6iisZniMyFh6QUow5wWOnL2MnYiKNTpcGEOO1aNvTlXBosTKCV/gBK Gw0WyL2In26nwovZ24/lMA/g7BUxYj/aa9YqM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:universe:user-agent; b=b/vO7RO3BFudTES7hYq86nCJAc9ocIVuzv179dAdxYd5KcmY55JgvEp8vGSnSnxCj4 rX3niE8LnsQ2YePG9SU4LsdwugEvT4Ec9oKK6JgXEHuKGc5vjfrI1e8igBE5eSLocium AbSKZtlu8JNvIwtBvnvbxyI+zKqAwJ6L1/Q8s= Original-Received: by 10.227.157.198 with SMTP id c6mr694584wbx.173.1276851033166; Fri, 18 Jun 2010 01:50:33 -0700 (PDT) Original-Received: from localhost (207.88.165.83.dynamic.mundo-r.com [83.165.88.207]) by mx.google.com with ESMTPS id p17sm63903985wbe.20.2010.06.18.01.50.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 18 Jun 2010 01:50:32 -0700 (PDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87ocf92sox.fsf@debian-laptop.localdomain> Universe: www.gnu.org User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73922 Archived-At: On Fri, Jun 18, 2010 at 12:35:42AM +0200, Paul Chany wrote: > Pedro Insua writes: > > > On Thu, Jun 17, 2010 at 11:34:42PM +0200, Paul Chany wrote: > >> Pedro Insua writes: > >> > >> > On Thu, Jun 17, 2010 at 10:56:57PM +0200, Paul Chany wrote: > >> >> Pedro Insua writes: > >> >> > >> >> > On Thu, Jun 17, 2010 at 03:56:38PM +0200, Paul Chany wrote: > >> >> >> I need this setup because when in org-mode and want follow a > >> >> >> link to a file://path/some.html then an xterm being started and > >> >> >> on it w3m as a default browser. I try to setup Emacs and > >> >> >> org-mode to open this file in Emacs buffer in w3m-el but > >> >> >> without any success. What am I missing here? > >> >> > http://www.emacswiki.org/emacs/BrowseUrl > >> >> > >> >> Thanks! I follow advices red here and setup variables: > >> >> ‘browse-url-browser-function’ > >> >> ‘browse-url-generic-program’ > >> >> > >> >> I have now in my .emacs file: > >> >> '(browse-url-browser-function (quote w3m-browse-url)) > >> >> '(browse-url-generic-program "w3m-browse-url") > >> >> > >> >> and still when I C-c C-o on a file://path/some.html link, an xterm > >> >> appeare and on it w3m with the opened file! :( > >> >> > >> >> What am I missing here? > >> > > >> > mmm, I'm Debian user too.. do you have w3m-el package installed? > >> > >> Yes, and I can open from an org file a http://path/some.html within > >> Emacs with w3m-el, but can't open a file file://path/some.html in the > >> same way because in the letter case I get opened xterm and on it w3m > >> instead to get the file opened within Emacs with w3m-el. :( > >> > > Well.. the 'trick' is in configure: org-file-apps > > I was tried to configure it already but without any success. > I have now in my .emacs file: > '(org-file-apps (quote ((auto-mode . emacs) ("\\.x?html?\\'" . default) > ("\\.pdf\\'" . default)))) > > so the default browser is: w3m (not Emacs-w3m). > In the org-file-apps customization buffer there is a Value Menu for > Exstension: \.x?html?\'. In this menu there are the options: > 0 = Visit with Emacs > 1 = Use default > 2 = Use the system command > 3 = Command > 4 = Lisp form > > When choosed 0 the link file://path/some.html was opened within Emacs > buffer for editing and not for viewing. > When choosed 1 the abowe mentioned link was opened in an xterm with w3m. > Options 2 and 3 was tried by me but without any success. Say I was tried > as Command 'w3m-browse-url' but get the same as with option 1. > In the case of option 4 I dont' know how could I configure Emacs to use > Emacs-w3m to open such a link. > > Any advices? Hi again! I think i've get the solution!! xD Well, the first, set w3m as default browser of Emacs: '(browse-url-browser-function (quote w3m)) Then, set org-file-apps to use the default browser: (add-to-list 'org-file-apps '("\\.x?html?\\'" browse-url file)) This work for me... bye! -- Porqué loitar e matar, se podes amar e sonhar /"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \