From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Earl Newsgroups: gmane.emacs.help Subject: Re: Open Hypspec with w3m Date: Fri, 28 Jan 2011 17:29:02 -0700 Organization: XMission http://xmission.com/ Message-ID: <87mxmkft81.fsf@notengoamigos.org> References: <87bp30bzdg.fsf@notengoamigos.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296261751 3788 80.91.229.12 (29 Jan 2011 00:42:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 Jan 2011 00:42:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 29 01:42:27 2011 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 1PiytX-0005hw-4K for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Jan 2011 01:42:27 +0100 Original-Received: from localhost ([127.0.0.1]:47287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiytW-00056Y-LR for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Jan 2011 19:42:26 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!xmission!nnrp.xmission!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: 67.214.244.122 Original-X-Trace: news.xmission.com 1296260946 3218 67.214.244.122 (29 Jan 2011 00:29:06 GMT) Original-X-Complaints-To: abuse@xmission.com Original-NNTP-Posting-Date: Sat, 29 Jan 2011 00:29:06 +0000 (UTC) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAABGdBTUEAALGPC/xhBQAAAAFz UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlw SFlzAAASmwAAEpsB4JJZDAAAAAl2cEFnAAAAMAAAADAAzu6MVwAAAaFJREFUSMe1VtuxxSAIzIz9 2Iyl2Aj1bBX0k5+LrwjGjJyPy2ROwtGNBJbVCwwwy1UNoOL3f+SBxkj15Lr4NsboN24DWMZxYQNA TjGmjC1gswJiqBbpDeANYMwXBFyAFB5L7ADMBcoSDgAFBSDHR2tA8ABMSB4AawB76pAnILsKx2lm 1VfpgUi3kxrySylRHdmQj40Jva2/jl8EY3Twv/phhsC9nIQR0hnAOUptYsL3RxvAk+YIH2AWsvTH GYBgKn8GaPYm5jNANaCQ8WfAzyH9x0crFfGl9X4QVdg8gEqN2KjBHi6V/iBq6iyAxTqd+Yvupwai VwM9LZkxQ6otihmS6H+mHlK5URwi0UQgWxHoxS5JagBSed7IzJRCallS2pg2QsamcGUFNSHgLZUv augJIUualv1Bv6+yVat1oeMq92s/mBBWQJH7dQX7CnpvWWs/4CazpHlB2RR1BFSzNGdIaTbbLil8 U76BKKU0GztapXP3C78bNYQ6MTQybY8OkIaITf9HPzyHkXE4YXs4mf5VDz+jAepj3RTQ3Ubv0SPy 9AcCrfKh0TBgvgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxMS0wMS0wM1QxMDo1MDo1NC0wNzowMIgC s0IAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTAtMDQtMDVUMTM6MjQ6NDgtMDY6MDCtwF/YAAAAAElF TkSuQmCC User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:IcpQeSZNK1ntJXbugWCf19YMHcU= Original-Xref: usenet.stanford.edu gnu.emacs.help:184666 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:78821 Archived-At: On Fri, Jan 28 2011, Stefan Monnier wrote: >> So is there a way to override 'hyperspec-lookup so that it always >> behaves as if browse-url-browser-function was 'w3m-browse-url? > > You can use defadvice (with `around' advice) on hyperspec-lookup to > let-bind browse-url-browser-function for the duration of that > function. That worked perfectly. Thank you. > PS: Another attack vector is to globally set > browse-url-browser-function to a function that either invokes > emacs-23m or firefox depending on the URL. Some Emacs maintainer I > know might even be willing to accept patches to provide such a feature > more generally, e.g. via a configuration variable that lists URL > patterns that should use emacs-w3m. I would love to try and do that, despite the fact that the defadvice solution seems to do precisely what I want. I think that should be within my grasp. You do realize, of course, that you are essentially volunteering to look over some potentially very bad Elisp. The only reason that I needed your advice is that I haven't made it all the way through the Elisp manual :). Either way, thanks for the challenge. Jason