* open an article in google groups
@ 2009-05-28 18:35 Leo
2009-05-28 20:27 ` Reiner Steib
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2009-05-28 18:35 UTC (permalink / raw)
To: info-gnus-english
Hi there,
I wonder if anyone know how to relate an article with its location in
google groups. I am trying to write a command to view articles in google
groups. I found it useful at times. Many thanks.
At the moment, I am appending the msg-id to
http://groups.google.com/groups?selm= to get the target url but this
does not work reliably.
Leo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: open an article in google groups
2009-05-28 18:35 open an article in google groups Leo
@ 2009-05-28 20:27 ` Reiner Steib
2009-05-28 23:26 ` Leo
0 siblings, 1 reply; 10+ messages in thread
From: Reiner Steib @ 2009-05-28 20:27 UTC (permalink / raw)
To: info-gnus-english
On Thu, May 28 2009, Leo wrote:
> I wonder if anyone know how to relate an article with its location in
> google groups. I am trying to write a command to view articles in google
> groups. I found it useful at times. Many thanks.
,----[ (info "(gnus)Finding the Parent") ]
| Here's an example setting that will first try the current method, and
| then ask Google if that fails:
|
| (setq gnus-refer-article-method
| '(current
| (nnweb "google" (nnweb-type google))))
`----
,----[ (info "(gnus)Choosing Commands") ]
| `G j'
| `j'
| Ask for an article number or `Message-ID', and then go to that
| article (`gnus-summary-goto-article').
`----
> At the moment, I am appending the msg-id to
> http://groups.google.com/groups?selm= to get the target url but this
> does not work reliably.
In Gnus, this is done in `nnweb.el'. Whenever Google changes the HTML
pages, it may break. I'm not sure about the current state. I have an
uncommitted patch for `nnweb.el' here (not really tested):
--8<---------------cut here---------------start------------->8---
--- nnweb.el 22 Jan 2009 07:02:16 -0000 7.40
+++ nnweb.el 28 May 2009 20:25:02 -0000
@@ -71,6 +71,11 @@
(address . "http://groups.google.com/groups")
(base . "http://groups.google.com")
(identifier . nnweb-google-identity))
+ (howardk
+ (id . "http://howardk.freenix.org/msgid.cgi?STYPE=msgid&MSGI=<%s>&GOOGLE=on")
+ (article . nnweb-howardk-wash-article)
+ (reference . identity)
+ (identifier . nnweb-howardk-identity))
(gmane
(article . nnweb-gmane-wash-article)
(id . "http://gmane.org/view.php?group=%s")
@@ -303,7 +308,27 @@
;;; groups.google.com
;;;
+;; Updated for Google's changed interface 2008-11
(defun nnweb-google-wash-article ()
+ (let ((case-fold-search t) url)
+ (goto-char (point-min))
+ (if (or (re-search-forward "The requested message.*could not be found."
+ nil t)
+ (re-search-forward
+ (concat "href=\"\\(/group/[^/]+/msg/[[:alnum:]]+"
+ "\\?dmode=source\\)\">Show original</a>") nil t))
+ (setq url (format "%s%s&output=gplain"
+ (nnweb-definition 'base) (match-string 1)))
+ (gnus-message 3 "Requested article not found"))
+ (gnus-message 9 "URL: %s" url)
+ (erase-buffer)
+ (mm-with-unibyte-current-buffer
+ (mm-url-insert-file-contents url))
+ (unless (re-search-forward "^Message-ID:")
+ (gnus-message 3 "Requested article not found")
+ (erase-buffer))))
+
+(defun nnweb-howardk-wash-article ()
;; We have Google's masked e-mail addresses here. :-/
(let ((case-fold-search t)
(start-re "<pre>[\r\n ]*")
@@ -312,6 +337,7 @@
(if (save-excursion
(or (re-search-forward "The requested message.*could not be found."
nil t)
+ (re-search-forward "Couldn't find article" nil t)
(not (and (re-search-forward start-re nil t)
(re-search-forward end-re nil t)))))
;; FIXME: Don't know how to indicate "not found".
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: open an article in google groups
2009-05-28 20:27 ` Reiner Steib
@ 2009-05-28 23:26 ` Leo
2009-05-29 6:58 ` Reiner Steib
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2009-05-28 23:26 UTC (permalink / raw)
To: info-gnus-english
On 2009-05-28 21:27 +0100, Reiner Steib wrote:
> On Thu, May 28 2009, Leo wrote:
>
>> I wonder if anyone know how to relate an article with its location in
>> google groups. I am trying to write a command to view articles in google
>> groups. I found it useful at times. Many thanks.
>
> ,----[ (info "(gnus)Finding the Parent") ]
> | Here's an example setting that will first try the current method, and
> | then ask Google if that fails:
> |
> | (setq gnus-refer-article-method
> | '(current
> | (nnweb "google" (nnweb-type google))))
> `----
This is what I'm using. It allows one to retrieve article from google
groups and view it in gnus.
I wonder if it is possible to construct a url based on the article in
Gnus and view the article in the google groups in the browser. So it is
the reverse of nnweb.
Many thanks.
Leo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: open an article in google groups
2009-05-28 23:26 ` Leo
@ 2009-05-29 6:58 ` Reiner Steib
2009-05-29 11:43 ` Leo
2009-06-05 13:13 ` Sébastien Vauban
0 siblings, 2 replies; 10+ messages in thread
From: Reiner Steib @ 2009-05-29 6:58 UTC (permalink / raw)
To: info-gnus-english
On Fri, May 29 2009, Leo wrote:
> I wonder if it is possible to construct a url based on the article in
> Gnus and view the article in the google groups in the browser. So it is
> the reverse of nnweb.
See `rs-gnus-button-browse-mid' (and everything mentioning "google")
in [1][2].
The following opens the article in the browser when clicking (or using
RET) on a MID in References and Message-ID headers:
--8<---------------cut here---------------start------------->8---
(add-to-list
'gnus-header-button-alist
'("^\\(References\\|Message-I[Dd]\\):" "<\\([^<>]+\\)>"
1 (>= gnus-button-message-level 0) rs-gnus-button-browse-mid 1)
t) ;; append!
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
[1]
;; rs-gnus-article.el -- Auxiliary article mode commands for Gnus
;; $Id: rs-gnus-article.el,v 1.16 2008-03-22 12:25:10 ste Exp $
;; Author: Reiner Steib <Reiner.Steib@gmx.de>
;; Keywords: news
;; X-URL: http://theotp1.physik.uni-ulm.de/~ste/comp/emacs/gnus/rs-gnus-article.el
[2] I should remove the rs-gnus-read-* stuff as it is included in No
Gnus now.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: open an article in google groups
2009-05-29 6:58 ` Reiner Steib
@ 2009-05-29 11:43 ` Leo
2009-05-29 19:08 ` jidanni
2009-06-05 13:13 ` Sébastien Vauban
1 sibling, 1 reply; 10+ messages in thread
From: Leo @ 2009-05-29 11:43 UTC (permalink / raw)
To: info-gnus-english
On 2009-05-29 07:58 +0100, Reiner Steib wrote:
> See `rs-gnus-button-browse-mid' (and everything mentioning "google")
> in [1][2].
>
> The following opens the article in the browser when clicking (or using
> RET) on a MID in References and Message-ID headers:
Thank you. rs-gnus-article.el uses
http://www.google.de/groups?as_umsgid=%s&hl=en to construct the url. But
it fails on many articles just like
http://groups.google.com/groups?selm=.
For example, do you know why it can't find
http://groups.google.co.uk/group/comp.text.TeX/browse_thread/thread/a14a61e170743078?hl=en#
Thank you.
Leo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: open an article in google groups
2009-05-29 11:43 ` Leo
@ 2009-05-29 19:08 ` jidanni
2009-05-29 20:36 ` Leo
0 siblings, 1 reply; 10+ messages in thread
From: jidanni @ 2009-05-29 19:08 UTC (permalink / raw)
To: info-gnus-english
Leo <sdl.web@gmail.com> writes:
> For example, do you know why it can't find
> http://groups.google.co.uk/group/comp.text.TeX/browse_thread/thread/a14a61e170743078?hl=en#
Try the method mentioned in
http://al.howardknight.net/msgid.cgi?STYPE=msgid&MSGI=<87ab5gv8t0.fsf@jidanni.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: open an article in google groups
2009-05-29 19:08 ` jidanni
@ 2009-05-29 20:36 ` Leo
2009-05-29 21:35 ` jidanni
0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2009-05-29 20:36 UTC (permalink / raw)
To: info-gnus-english
On 2009-05-29 20:08 +0100, jidanni@jidanni.org wrote:
> Leo <sdl.web@gmail.com> writes:
>> For example, do you know why it can't find
>> http://groups.google.co.uk/group/comp.text.TeX/browse_thread/thread/a14a61e170743078?hl=en#
> Try the method mentioned in
> http://al.howardknight.net/msgid.cgi?STYPE=msgid&MSGI=<87ab5gv8t0.fsf@jidanni.org>
Could you elaborate on this?
I looked at the link and it contains:
,----
| Whiskers <catwheezel@operamail.com> writes:
| > http://al.howardknight.net/msgid.cgi?STYPE=msgid&MSGI=<87hc062bpa.fsf@jidanni.org>
| Ah, vs. http://groups.google.com/groups/search?as_umsgid=87hc062bpa.fsf@jidanni.org
| proves that Google Group's Message ID search sometimes can't even find
| messages that are on its own disks:
| http://groups.google.com/group/tw.bbs.soc.politics.dpp/msg/012f79e9d7b104ab
|
| Goodbye Google, hello Howard Knight!
`----
http://groups.google.com/groups/search?as_umsgid= is no better than the
other two options listed in previous posts and
http://al.howardknight.net/msgid.cgi?STYPE=msgid&MSGI= is not google
groups.
So I really don't know where to look for the method mentioned.
Thank you.
Leo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: open an article in google groups
2009-05-29 20:36 ` Leo
@ 2009-05-29 21:35 ` jidanni
2009-05-29 22:18 ` Leo
0 siblings, 1 reply; 10+ messages in thread
From: jidanni @ 2009-05-29 21:35 UTC (permalink / raw)
To: info-gnus-english
What I'm saying is, consider the Message-ID in
http://groups.google.co.uk/group/comp.text.tex/msg/3eea7ffe075bfd53?hl=en&dmode=source
Well, of
both http://groups.google.com/groups/search?as_umsgid=m0tz36ysse.fsf@cam.ac.uk and
http://al.howardknight.net/msgid.cgi?STYPE=msgid&MSGI=<m0tz36ysse.fsf@cam.ac.uk>
only the latter finds it!
howardknight works all the time, Google only half.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: open an article in google groups
2009-05-29 21:35 ` jidanni
@ 2009-05-29 22:18 ` Leo
0 siblings, 0 replies; 10+ messages in thread
From: Leo @ 2009-05-29 22:18 UTC (permalink / raw)
To: info-gnus-english
On 2009-05-29 22:35 +0100, jidanni@jidanni.org wrote:
> What I'm saying is, consider the Message-ID in
> http://groups.google.co.uk/group/comp.text.tex/msg/3eea7ffe075bfd53?hl=en&dmode=source
>
> Well, of
> both http://groups.google.com/groups/search?as_umsgid=m0tz36ysse.fsf@cam.ac.uk and
> http://al.howardknight.net/msgid.cgi?STYPE=msgid&MSGI=<m0tz36ysse.fsf@cam.ac.uk>
> only the latter finds it!
>
> howardknight works all the time, Google only half.
OK, thanks.
Now is clear that google groups just does not support msg-id search fully.
--
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: open an article in google groups
2009-05-29 6:58 ` Reiner Steib
2009-05-29 11:43 ` Leo
@ 2009-06-05 13:13 ` Sébastien Vauban
1 sibling, 0 replies; 10+ messages in thread
From: Sébastien Vauban @ 2009-06-05 13:13 UTC (permalink / raw)
To: info-gnus-english-mXXj517/zsQ
Hi Reiner,
Reiner Steib wrote:
> Leo wrote:
>
>> I wonder if it is possible to construct a url based on the article in Gnus
>> and view the article in the google groups in the browser. So it is the
>> reverse of nnweb.
>
> The following opens the article in the browser when clicking (or using RET)
> on a MID in References and Message-ID headers:
>
> (add-to-list
> 'gnus-header-button-alist
> '("^\\(References\\|Message-I[Dd]\\):" "<\\([^<>]+\\)>"
> 1 (>= gnus-button-message-level 0) rs-gnus-button-browse-mid 1)
> t) ;; append!
I've added the following code to my `.gnus':
--8<---------------cut here---------------start------------->8---
;; auxiliary article mode commands for Gnus
(require 'rs-gnus-article)
;; initialization
(rs-gnus-buttons)
;; TODO Could be limited to news headers only
(eval-after-load "gnus-art"
'(setq gnus-visible-headers
(concat (format
"^\\(%s\\):"
(regexp-opt
'("Message-ID" "X-Spam-Level" "X-Report-Spam")))
"\\|" gnus-visible-headers)))
;; open the article in the browser when clicking (or using `RET') on a MID
;; in `References' and `Message-ID' headers
(eval-after-load "gnus-art"
'(add-to-list
'gnus-header-button-alist
'("^\\(References\\|Message-I[Dd]\\):" "<\\([^<>]+\\)>"
1 (>= gnus-button-message-level 0) rs-gnus-button-browse-mid 1)
t)) ;; append!
--8<---------------cut here---------------end--------------->8---
And I see the button on the Message-ID, which opens well Firefox... but
doesn't find the article in Google Groups. Not even for your article I'm
replying to!
Am I missing something?
Best regards,
Seb
--
Sébastien Vauban
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-06-05 13:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-28 18:35 open an article in google groups Leo
2009-05-28 20:27 ` Reiner Steib
2009-05-28 23:26 ` Leo
2009-05-29 6:58 ` Reiner Steib
2009-05-29 11:43 ` Leo
2009-05-29 19:08 ` jidanni
2009-05-29 20:36 ` Leo
2009-05-29 21:35 ` jidanni
2009-05-29 22:18 ` Leo
2009-06-05 13:13 ` Sébastien Vauban
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 NNTP newsgroup(s).