Function: gnus-read-ephemeral-gmane-group-url
gnus-read-ephemeral-gmane-group-url is an interactive and
byte-compiled function defined in gnus-group.el.gz.
Signature
(gnus-read-ephemeral-gmane-group-url URL)
Documentation
Create an ephemeral Gmane group from URL.
Valid input formats include:
"http://thread.gmane.org/gmane.foo.bar/12300/focus=12399",
"http://thread.gmane.org/gmane.foo.bar/12345/",
"http://article.gmane.org/gmane.foo.bar/12345/",
"http://news.gmane.org/group/gmane.foo.bar/thread=12345"
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
(defun gnus-read-ephemeral-gmane-group-url (url)
"Create an ephemeral Gmane group from URL.
Valid input formats include:
\"http://thread.gmane.org/gmane.foo.bar/12300/focus=12399\",
\"http://thread.gmane.org/gmane.foo.bar/12345/\",
\"http://article.gmane.org/gmane.foo.bar/12345/\",
\"http://news.gmane.org/group/gmane.foo.bar/thread=12345\""
;; - Feel free to add other useful Gmane URLs here! Maybe the URLs should
;; be customizable?
;; - The URLs should be added to `gnus-button-alist'. Probably we should
;; prompt the user to decide: "View via `browse-url' or in Gnus? "
;; (`gnus-read-ephemeral-gmane-group-url')
(interactive (list (gnus-group-completing-read "Gmane URL")) gnus-group-mode)
(let (group start range)
(cond
;; URLs providing `group', `start' and `range':
((string-match
;; http://thread.gmane.org/gmane.emacs.devel/86326/focus=86525
"^http://thread\\.gmane\\.org/\\([^/]+\\)/\\([0-9]+\\)/focus=\\([0-9]+\\)$"
url)
(setq group (match-string 1 url)
start (string-to-number (match-string 2 url))
;; Ensure that `range' is large enough to ensure focus article is
;; included.
range (- (string-to-number (match-string 3 url))
start -1)))
;; URLs providing `group' and `start':
((or (string-match
;; http://article.gmane.org/gmane.comp.gnu.make.bugs/3584
"^http://\\(?:thread\\|article\\|permalink\\)\\.gmane\\.org/\\([^/]+\\)/\\([0-9]+\\)"
url)
(string-match
;; Don't advertise these in the doc string yet:
"^\\(?:nntp\\|news\\)://news\\.gmane\\.org/\\([^/]+\\)/\\([0-9]+\\)"
url)
(string-match
;; http://news.gmane.org/group/gmane.emacs.gnus.general/thread=65099/force_load=t
"^http://news\\.gmane\\.org/group/\\([^/]+\\)/thread=\\([0-9]+\\)"
url))
(setq group (match-string 1 url)
start (string-to-number (match-string 2 url))))
(t
(error "Can't parse URL %s" url)))
(gnus-read-ephemeral-gmane-group group start range)))