Gnus development mailing list
 help / color / mirror / Atom feed
* nnweb: Search for MID via Google Groups broken
@ 2008-11-15 22:50 Reiner Steib
  0 siblings, 0 replies; only message in thread
From: Reiner Steib @ 2008-11-15 22:50 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

Hi,

Google Groups' search output changed once again.  Previously,
"http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source" (%s ->
Message-Id w/o "<" and ">") used to return the original article
(within <pre>...</pre> tags of an html page).  Now, this URL returns a
page where you need to go thru "More Options" and "Show Original" to
get there.

Replacing `nnweb-google-wash-article' with the following code seems to
fix the problem, but the approach is ugly because it is not really a
wash function anymore.

Testing and suggestions for a more clear approach welcome...

--8<---------------cut here---------------start------------->8---
(defun nnweb-google-wash-article ()
  (let ((case-fold-search t) url)
    (goto-char (point-min))
    (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 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))))
--8<---------------cut here---------------end--------------->8---

The attached patch include this plus a definition and wash for the
article lookup on <http://howardk.freenix.org/> (via Google).

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1159 bytes --]

Index: message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 7.251
retrieving revision 7.252
diff -u -u -r7.251 -r7.252
--- message.el	24 Mar 2008 18:09:11 -0000	7.251
+++ message.el	24 Mar 2008 18:16:27 -0000	7.252
@@ -5059,12 +5059,16 @@
    ;; Check the length of the signature.
    (message-check 'signature
      (goto-char (point-max))
-     (if (> (count-lines (point) (point-max)) 5)
-	 (y-or-n-p
-	  (format
-	   "Your .sig is %d lines; it should be max 4.  Really post? "
-	   (1- (count-lines (point) (point-max)))))
-       t))
+     (if (not (re-search-backward message-signature-separator nil t))
+	 t
+       (if (>= (count-lines (1+ (point-at-eol)) (point-max)) 5)
+	   (if (message-gnksa-enable-p 'signature)
+	       (y-or-n-p
+		(format "Signature is excessively long (%d lines).  Really post? "
+			(count-lines (1+ (point-at-eol)) (point-max))))
+	     (message "Denied posting -- Excessive signature.")
+	     nil)
+	 t)))
    ;; Ensure that text follows last quoted portion.
    (message-check 'quoting-style
      (goto-char (point-max))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-15 22:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-15 22:50 nnweb: Search for MID via Google Groups broken Reiner Steib

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).