From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/9319 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.user Subject: Re: How to copy URL's to clipboard? Date: Fri, 13 Jul 2007 13:24:15 +0900 Organization: Emacsen advocacy group Message-ID: References: <87myy32bzt.fsf@gmail.com> <874pkadkxw.fsf@gmail.com> <87odihdcnm.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184301629 16808 80.91.229.12 (13 Jul 2007 04:40:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Jul 2007 04:40:29 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Fri Jul 13 06:40:27 2007 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I9Cx8-0007GJ-BZ for gegu-info-gnus-english@m.gmane.org; Fri, 13 Jul 2007 06:40:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I9Cx7-0001mk-Sd for gegu-info-gnus-english@m.gmane.org; Fri, 13 Jul 2007 00:40:25 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 28 Original-NNTP-Posting-Host: orlando.hostforweb.net Original-X-Trace: quimby.gnus.org 1184300663 819 216.246.45.90 (13 Jul 2007 04:24:23 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Fri, 13 Jul 2007 04:24:23 +0000 (UTC) X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:C6XZrwyQ0WfeN8mIz/BMds0UhdQ= Original-Xref: shelby.stanford.edu gnu.emacs.gnus:79504 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:9319 Archived-At: >>>>> Katsumi Yamaoka wrote: > For such a link expressed with a plain text, you can bind the > same key to just the function `browse-url-firefox'. For example: I forgot to write the way to map the `vv' key to `browse-url-firefox' also in emacs-w3m buffers. Here it is: --8<---------------cut here---------------start------------->8--- (define-key w3m-mode-map "v" (make-sparse-keymap)) (define-key w3m-mode-map "vb" 'w3m-bookmark-view) (define-key w3m-mode-map "vv" (lambda nil (interactive) (let* ((w3m-content-type-alist (copy-sequence w3m-content-type-alist)) (html (cdr (assoc "text/html" w3m-content-type-alist)))) (setq w3m-content-type-alist (delq html w3m-content-type-alist)) (setq html (copy-sequence html)) ;; Make sure to use Firefox. (setcar (nthcdr 2 html) 'browse-url-firefox) (push html w3m-content-type-alist) (w3m-external-view-this-url)))) --8<---------------cut here---------------end--------------->8--- This should be added to your ~/.emacs-w3m.el file, not anywhere else. Note that it remaps the key for the `w3m-bookmark-view' command into `vb'. I think customizing too much the keymap is not a good idea, though. In emacs-w3m buffers, you can use the `M' command instead.