From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/9336 Path: news.gmane.org!not-for-mail From: Hadron Newsgroups: gmane.emacs.gnus.user Subject: Re: How to copy URL's to clipboard? Date: Sun, 15 Jul 2007 19:16:56 +0200 Message-ID: <87lkdhegdz.fsf@gmail.com> 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 1184521260 8485 80.91.229.12 (15 Jul 2007 17:41:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 15 Jul 2007 17:41:00 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Sun Jul 15 19:40:57 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 1IA85W-0003m9-Ki for gegu-info-gnus-english@m.gmane.org; Sun, 15 Jul 2007 19:40:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IA85V-00018g-2S for gegu-info-gnus-english@m.gmane.org; Sun, 15 Jul 2007 13:40:53 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 41 Original-X-Trace: individual.net Pp7xv/1TytCiO3lQS14WWw+vgvG0AFSx+oCtbzUkyKDr86sOZJ X-Orig-Path: news.individual.net!news Cancel-Lock: sha1:0QBjS19yMOrQEuxIZXzC3f3iXOo= sha1:wMJNkXFnA3ONGVOg7+W6o8M/Bvc= X-Face: 2h#||Cd#d%F*NCm59[_6/{1a@jy%; |j>{D~4^gKg(^i%7j0IK?+,/GmW&:CD5fEKb_! User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux) Original-Xref: shelby.stanford.edu gnu.emacs.gnus:79521 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:9336 Archived-At: Katsumi Yamaoka writes: >>>>>> 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: > > (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)))) > > 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. I got what I wanted with this: ,---- | (defun my-w3m-view-this-url() | (interactive) | (let ((w3m-goto-article-function 'browse-url)) | (w3m-safe-view-this-url))) | | (global-set-key (quote [f4]) 'browse-url) | (define-key w3m-mode-map [f4] 'my-w3m-view-this-url) `----