From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62088 Path: news.gmane.org!not-for-mail From: Andreas Seltenreich Newsgroups: gmane.emacs.gnus.general Subject: Re: nnweb + Gmane search Date: Fri, 24 Feb 2006 22:58:18 +0100 Message-ID: <87r75smnb9.fsf@gate450.dyndns.org> References: <877j9lob4v.fsf@gate450.dyndns.org> <87hd8pmtjf.fsf@gate450.dyndns.org> <87u0bqf4pn.fsf@gate450.dyndns.org> <87acdduewd.fsf@gate450.dyndns.org> <87vevqcs10.fsf_-_@gate450.dyndns.org> <871wyd9m04.fsf@gate450.dyndns.org> <87fymquu3x.fsf@gate450.dyndns.org> <877j7xemvm.fsf@gate450.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1140818622 14172 80.91.229.2 (24 Feb 2006 22:03:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Feb 2006 22:03:42 +0000 (UTC) Original-X-From: ding-owner+m10616@lists.math.uh.edu Fri Feb 24 23:03:40 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FCl2F-0002vh-2j for ding-account@gmane.org; Fri, 24 Feb 2006 23:03:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FCl2A-0007E9-00; Fri, 24 Feb 2006 16:03:30 -0600 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FCkxJ-0007E1-00 for ding@lists.math.uh.edu; Fri, 24 Feb 2006 15:58:29 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1FCkxE-000065-Ve for ding@lists.math.uh.edu; Fri, 24 Feb 2006 15:58:29 -0600 Original-Received: from smtp2.rz.uni-karlsruhe.de ([129.13.185.218]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FCkxE-0007ao-00 for ; Fri, 24 Feb 2006 22:58:24 +0100 Original-Received: from rzstud1.stud.uni-karlsruhe.de (rzstud1.stud.uni-karlsruhe.de [193.196.41.33]) by smtp2.rz.uni-karlsruhe.de with esmtp (Exim 4.50 #1) id 1FCkxB-0002rA-OY; Fri, 24 Feb 2006 22:58:23 +0100 Original-Received: from uwi7 by rzstud1.stud.uni-karlsruhe.de with local (Exim 3.36 #1) id 1FCkxH-00051D-00 for ding@gnus.org; Fri, 24 Feb 2006 22:58:27 +0100 Original-To: ding@gnus.org X-PGP-Key: 0x2C006B340F8C8C1B X-Now-Playing: Primordial / The Gathering wilderness X-Face: $:F<87a[gD1?#R6S3j21cr1&C&7bd63GHC.tSdskUb}hhwG(ci*=D5kJ<_N+p9q(7-,PnG. Et.Yh (Reiner Steib's message of "Fri, 24 Feb 2006 15:31:50 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:62088 Archived-At: --=-=-= (removed gmane-discuss) Reiner Steib writes: > On Fri, Feb 24 2006, Andreas Seltenreich wrote: > > Andreas, would you like to provide an update for the manual > (texi/gnus.texi)? I'd like to have this example... Oh, there's even a gnus-coding.texi in there. I guess I should have read that before starting to work on nnweb :-) > ,----[ (info "(gnus)Foreign Groups") ] > | If you use the `google' search engine, you can limit the search to > | a particular group by using a match string like `shaving > | group:alt.sysadmin.recovery'. > `---- > > ... moved to (info "(gnus)Web Searches") and have some additional > examples such as restricting a search to a certain author, newsgroup > or subject (if possible) for both, Gmane and Google in (info > "(gnus)Web Searches"). Hmm, that paragraph about solid groups not being useful seems out of date, too. Was it written at a time when solid groups weren't backed up by hash tables, or am I missing something? --8<---------------cut here---------------start------------->8--- `nnweb' groups don't really lend themselves to being solid groups--they have a very fleeting idea of article numbers. In fact, each time you enter an `nnweb' group (not even changing the search pattern), you are likely to get the articles ordered in a different manner. Not even using duplicate suppression (*note Duplicate Suppression::) will help, since `nnweb' doesn't even know the `Message-ID' of the articles before reading them using some search engines (Google, for instance). The only possible way to keep track of which articles you've read is by scoring on the `Date' header--mark all articles posted before the last date you read the group as read. --8<---------------cut here---------------end--------------->8--- > It's not a problem if you're not familiar with > texinfo: You write it; we can fix the markup before committing it. > (While at it, "dejanews" could be removed in the manual.) I'm more concerned about my English skills than texinfo. > Andreas, do we simply need to change... > > - (mm-decode-coding-region (point-min) (point-max) 'utf-8) > + (mm-decode-coding-region (point-min) (point-max)) > > ... or anything else? It still doesn't work for me without explicit decoding using mm-url-use-external + wget. However, it seems to decode fine implicitly when using internal fetching. I dunno if there is a more elegant way to solve this than testing for mm-url-use-external. And wouldn't using external programs nevertheless break or unbreak depending on the system locale? Btw, internal url fetching yields a \0d at the end of the buffer, which makes nnweb-gmane-create-mapping throw an error. I've attached a patch. >> http://search.gmane.org/nov.php?query=gnus+nnweb > > Installed. Thanks. > > Is it also possible to submit the "Sort by" flag (Relevance, Date, > Reverse Date) to nov.php? At the moment one could achieve that by customising nnweb-type-definition: --8<---------------cut here---------------start------------->8--- (defun my-nnweb-gmane-search-by-date (search) (mm-url-insert (concat (nnweb-definition 'address) "?" (mm-url-encode-www-form-urlencoded `(("query" . ,search) ("sort" . "date") ("HITSPERPAGE" . ,(number-to-string nnweb-max-hits)))))) (setq buffer-file-name nil) (set-buffer-multibyte t) (mm-decode-coding-region (point-min) (point-max) 'utf-8) t) (push '(gmane-by-date (article . nnweb-gmane-wash-article) (id . "http://gmane.org/view.php?group=%s") (reference . identity) (map . nnweb-gmane-create-mapping) (search . my-nnweb-gmane-search-by-date) (address . "http://search.gmane.org/nov.php") (identifier . nnweb-gmane-identity)) nnweb-type-definition) --8<---------------cut here---------------end--------------->8--- regards, andreas --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=nnweb.patch Index: lisp/nnweb.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnweb.el,v retrieving revision 7.17 diff -u -r7.17 nnweb.el --- lisp/nnweb.el 24 Feb 2006 14:01:44 -0000 7.17 +++ lisp/nnweb.el 24 Feb 2006 21:55:56 -0000 @@ -471,7 +471,7 @@ (forward-line 1) ;; Thanks to Olly Betts we now have NOV lines in our buffer! (while (not (eobp)) - (unless (eolp) + (unless (or (eolp) (looking-at "\x0d")) (let ((header (nnheader-parse-nov))) (let ((xref (mail-header-xref header)) (from (mail-header-from header)) Index: lisp/ChangeLog =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v retrieving revision 7.1034 diff -u -r7.1034 ChangeLog --- lisp/ChangeLog 24 Feb 2006 20:49:02 -0000 7.1034 +++ lisp/ChangeLog 24 Feb 2006 21:56:00 -0000 @@ -1,3 +1,7 @@ +2006-02-24 Andreas Seltenreich + + * nnweb.el (nnweb-gmane-create-mapping): Don't choke on ^M. + 2006-02-20 Lars Magne Ingebrigtsen * gnus-int.el (gnus-open-server): Respect gnus-batch-mode. --=-=-=--