From: "François Pinard" <pinard@iro.umontreal.ca>
To: emacs-orgmode@gnu.org
Subject: Re: Nice blog post - Org-mode in Your Pocket Is a GNU-Shaped Devil
Date: Fri, 05 Apr 2013 06:59:23 -0400 [thread overview]
Message-ID: <86txnluttg.fsf@iro.umontreal.ca> (raw)
In-Reply-To: <8762027avj.fsf@bzg.ath.cx> (Bastien's message of "Thu, 04 Apr 2013 14:12:32 +0200")
Bastien <bzg@altern.org> 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 "<a href=\"\\([^\"]+\\)\">Link</a>")
(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çois
next prev parent reply other threads:[~2013-04-05 10:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 9:28 Nice blog post - Org-mode in Your Pocket Is a GNU-Shaped Devil Rainer M. Krug
2013-04-04 9:55 ` Russell Adams
2013-04-04 9:59 ` Christian Moe
2013-04-04 10:57 ` Rainer M. Krug
2013-04-04 11:48 ` François Pinard
2013-04-04 12:12 ` Bastien
2013-04-04 16:39 ` Haider Rizvi
2013-04-05 23:10 ` Bastien
2013-04-05 10:59 ` François Pinard [this message]
2013-04-04 12:41 ` Rainer M. Krug
2013-04-04 17:41 ` Suvayu Ali
2013-04-05 11:18 ` François Pinard
2013-04-05 12:37 ` Suvayu Ali
2013-04-05 21:28 ` Gareth Smith
2013-04-05 22:25 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86txnluttg.fsf@iro.umontreal.ca \
--to=pinard@iro.umontreal.ca \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).