From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Fran=C3=A7ois_Pinard?= Subject: Re: Nice blog post - Org-mode in Your Pocket Is a GNU-Shaped Devil Date: Fri, 05 Apr 2013 06:59:23 -0400 Message-ID: <86txnluttg.fsf@iro.umontreal.ca> References: <87vc82r6fc.fsf@krugs.de> <87k3oir2a3.fsf@krugs.de> <86r4iqbjod.fsf@iro.umontreal.ca> <8762027avj.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO4Ml-0005Jd-9y for emacs-orgmode@gnu.org; Fri, 05 Apr 2013 06:59:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO4Mf-00082G-TG for emacs-orgmode@gnu.org; Fri, 05 Apr 2013 06:59:31 -0400 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:56405 helo=mercure.bureau.ubity.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO4Mf-000821-MA for emacs-orgmode@gnu.org; Fri, 05 Apr 2013 06:59:25 -0400 In-Reply-To: <8762027avj.fsf@bzg.ath.cx> (Bastien's message of "Thu, 04 Apr 2013 14:12:32 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Bastien writes: >> It took me about one hour (my Gnus programming is rather rusty) for >> adding a Gnus command opening many tabs at once, in a graphical >> browser, for all articles I retain in Gnus for reading. > That looks nice, is your hack public somewhere? No, but here it is, usage instructions follow. (defun fp-gnus-summary-open-links (arg) "Open links in a browser for processable articles, like for Hacker News." (interactive "P") (let ((articles (gnus-summary-work-articles arg))) (save-excursion (while articles (setq article (pop articles)) (gnus-summary-goto-article article) (gnus-summary-show-article t) (save-excursion (pop-to-buffer gnus-article-buffer) (re-search-forward "Link") (browse-url (match-string 1))) (gnus-summary-remove-process-mark article)))) (gnus-summary-position-point)) (defun my-gnus-summary-mode-hook () (define-key gnus-summary-mode-map "\C-cnl" 'fp-gnus-summary-open-links) ;; ... ) (add-hook 'gnus-summary-mode-hook 'my-gnus-summary-mode-hook) The function selects articles according to the process/mark convention, and I want it to fail whenever an article does not have a "Link" button (that's why I do not catch the error if "re-search" fails). So, I use it this way. In an RSS summary buffer, I use C-k to "read" without opening any subject I want to skip. Once done, I use "x M P A C-c n l" to remove all article I C-k'ed, add a process mark on everything else, then transfer marked articles into a graphical browser, one tab per article. Transferred articles also get "read" in the summary buffer. I also use this bit of Emacs Lisp code in ~/.emacs, which is related: ;; Chrome (really xdg-open) ;; ------------------------ (defun browse-url-xdg-open (url &optional new-window) "Ask the default browser to load URL. Default to the URL around or before point." (interactive (browse-url-interactive-arg "URL: ")) (shell-command (concat "xdg-open " (shell-quote-argument (browse-url-encode-url url))= ))) (setq browse-url-browser-function 'browse-url-xdg-open) Fran=C3=A7ois