From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/73560 Path: news.gmane.org!not-for-mail From: "Robert D. Crawford" Newsgroups: gmane.emacs.gnus.general Subject: Re: Survey: how do you view links in a external browser? Date: Sun, 24 Oct 2010 10:42:54 -0500 Message-ID: <87ocaj38ch.fsf@gmail.com> References: <87eibfya00.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1287952858 10970 80.91.229.12 (24 Oct 2010 20:40:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 24 Oct 2010 20:40:58 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M21929@lists.math.uh.edu Sun Oct 24 22:40:57 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PA7N7-0007lY-UX for ding-account@gmane.org; Sun, 24 Oct 2010 22:40:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PA7Mj-0001k6-L0; Sun, 24 Oct 2010 15:40:29 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PA3Ck-0007Oq-NH for ding@lists.math.uh.edu; Sun, 24 Oct 2010 11:13:54 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PA3Cj-0001GV-JT for ding@lists.math.uh.edu; Sun, 24 Oct 2010 11:13:54 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PA3Ci-0008Eu-00 for ; Sun, 24 Oct 2010 18:13:52 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PA3Ci-00033j-F9 for ding@gnus.org; Sun, 24 Oct 2010 18:13:52 +0200 Original-Received: from 99-3-91-133.lightspeed.nsvltn.sbcglobal.net ([99.3.91.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Oct 2010 18:13:52 +0200 Original-Received: from robdcraw by 99-3-91-133.lightspeed.nsvltn.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Oct 2010 18:13:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 71 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 99-3-91-133.lightspeed.nsvltn.sbcglobal.net Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:dCmHr8rgbLxi0/9H2Q1y0lkTILk= X-Spam-Score: -1.0 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:73560 Archived-At: jidanni@jidanni.org writes: > How do fellows usually view links in a external browser when reading a > message in gnus? Well, I use emacs/w3 for almost all of my browsing. I am only partially sighted and emacs/w3 gives me the best experience. Some pages don't cooperate with w3 and I open them in w3m. Other times I use firefox under orca. Below is what you will want to do. I've commented within the defun. (defun rdc-gnus-open-in-browser (&optional arg) "opens the link under point in browser numeric argument calls alternate browser" (interactive "p") ;; the next few lines are not useful to you ;; (dtk-speak "Opening URL in GUI browser") ;; (let ((emacspeak-speak-messages nil)) (goto-char (point-min)) (search-forward-regexp "link") ;; the next line moves into the word "link" (backward-char 2) (if (= arg 4) (setq browser-command-string "chrome ") (setq browser-command-string "firefox ")) (shell-command (concat browser-command-string "\"" (if (eq browse-url-browser-function 'browse-url-w3) (w3-view-this-url) (w3m-print-this-url) "\"" nil nil)))) This is what I use for rss feed links and should give you a starting point to adapt it to opening regular urls. I just tested it under w3m and it fails. Sorry, but I don't have the time to figure out how to do it properly. The problem is w3m-print-this-url. You need a function that returns the url, not sends it to the kill-ring. Not sure what I was thinking when I wrote it. > But to view them externally, the best we can do is copy/kill the region > containing the link, then change to our Firefox etc. browser window, and > paste it into the URL bar, and hit RET. You have to think outside the box. Almost anything is possible within emacs, you just have to have the motivation to figure out how to do it. All of emacs was created by people who had an itch to scratch. I just sent myself an email containing a text link. While point was on the link I called browse-url-firefox via M-x. It asked me what url with the default being the link at point. Assign a key to call this function and Bob's your uncle. > Rather cavewomanish in this day and age. The tools are there you just have to put in the effort to learn how to use them. > Or one can click them, and then in emacs-w3m hit M. Browsing the same > link twice. > > It's all because gnus-version "Gnus v5.13" lacks right click menus. Seems a bit rude for someone who is both asking for help and unwilling to search out the tools to help themselves. rdc -- Robert D. Crawford robdcraw@gmail.com