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: Open Hypspec with w3m Date: Fri, 28 Jan 2011 12:29:47 -0700 Organization: XMission http://xmission.com/ Message-ID: <87bp30bzdg.fsf@notengoamigos.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296845486 15893 80.91.229.12 (4 Feb 2011 18:51:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Feb 2011 18:51:26 +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 Jan 28 20:40:40 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 1PiuBT-00016p-PY for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Jan 2011 20:40:39 +0100 Original-Received: from localhost ([127.0.0.1]:53319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiuBT-0000Ff-15 for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Jan 2011 14:40:39 -0500 Original-Path: usenet.stanford.edu!newsfeed.news.ucla.edu!news.snarked.org!xmission!nnrp.xmission!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: 67.214.244.122 Original-X-Trace: news.xmission.com 1296242989 29654 67.214.244.122 (28 Jan 2011 19:29:49 GMT) Original-X-Complaints-To: abuse@xmission.com Original-NNTP-Posting-Date: Fri, 28 Jan 2011 19:29:49 +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:hslfb5KvAO1jcCg/iJIzFcw1Xgo= Original-Xref: usenet.stanford.edu gnu.emacs.help:184654 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:78960 Archived-At: I have been spending a bit of my free time learning Common Lisp (and enjoying it). Part of learning Common Lisp is getting to know the HyperSpec. The fact that Emacs includes a function 'hyperspec-lookup that makes this a matter of a few keystrokes is very helpful. However, by default this opens up the page in Firefox, and I would pretty much always like to open the HyperSpec in w3m. I would change the default browse-url-browser-function, but I generally want to open URLs with Firefox. For Common Lisp buffers I make 'browse-url-browser-function a local variable and set it to 'w3m-browse-url. --8<---------------cut here---------------start------------->8--- (add-hook 'lisp-mode-hook 'jadoea-lispstuff) ;; my python configuration (defun jadoea-lispstuff () "Custom Lisp Configurator. Turn on flyspell-prog-mode. Clean up whitespace on save (leave tabs). Make browse-url-browser-function buffer-local and set it to browse-url-w3m." (flyspell-prog-mode) (add-hook 'before-save-hook (lambda () (jadoea-clean-whitespace t nil)) nil t) (make-local-variable 'browse-url-browser-function) (setq browse-url-browser-function 'w3m-browse-url)) --8<---------------cut here---------------end--------------->8--- This works great as long as I am in a Common Lisp buffer, but I find myself constant wanting to look up stuff from the HyperSpec while in a Slime REPL, or some other type of buffer. So is there a way to override 'hyperspec-lookup so that it always behaves as if browse-url-browser-function was 'w3m-browse-url? I build Emacs from source, and I maintain my own branch so that I can easily deploy Emacs on various machines. So I considered simply hacking common-lisp-hyperspec to do what I wanted. However, that hardly seems like the cleanest way to do this sort of thing. Any suggestions? Thanks, Jason