From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38882 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: specifying the charset of the query string with nnir/imap Date: Sun, 23 Sep 2001 12:05:00 +0200 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035174679 24923 80.91.224.250 (21 Oct 2002 04:31:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:31:19 +0000 (UTC) Cc: ding@gnus.org Return-Path: Return-Path: Original-Received: (qmail 6256 invoked from network); 23 Sep 2001 10:04:58 -0000 Original-Received: from dolk.extundo.com (195.42.214.242) by gnus.org with SMTP; 23 Sep 2001 10:04:58 -0000 Original-Received: from barbar.josefsson.org (slipsten.extundo.com [195.42.214.241]) (authenticated bits=0) by dolk.extundo.com (8.12.0/8.12.0) with ESMTP id f8NA4x0r024813; Sun, 23 Sep 2001 12:05:00 +0200 Original-To: Daiki Ueno In-Reply-To: (Daiki Ueno's message of "Sun, 23 Sep 2001 11:48:14 +0900") Mail-Copies-To: nobody User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.105 Original-Lines: 71 Xref: main.gmane.org gmane.emacs.gnus.general:38882 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38882 Daiki Ueno writes: > I'm using nnir 1.72. Maybe it would be nice to have search functionality built into Gnus. How about using a backend interface for the interface? Then you don't need to specify the backend to search with nnir, which I found a bit cumbersome and inflexible. We could keep the current simple interface -- press `G G' to search the current group, or the currently processed marked groups for a simple string -- but also add a fancy "advanced query" form using all kind of weird widgets. What about the following backend interface? IMAP can implement this, and I guess nnfolder could implement at least the `text' primitive easily using `search-forward', and nnml could implement it using `grep'. Of course, nnml and nnfolder could use Glimpse, Swish++ etc as well if so configured. `(nnchoke-request-search-capability &optional GROUP SERVER)' This function should return the list of search functions which the server (or group, if GROUP is non-nil) supports. The search functions include `and', `or', `not', `text', `to', `from', `subject', `cc', `head', `header', `body' and `charset'. If searching is not supported, the empty list should be returned. It is sufficient to implement the `text' search function to get a useful search interface, the other functions are only used by the advanced query interface. There should be no result data returned. `(nnchoke-request-search-group GROUP QUERY &optional SERVER)' This function should search the group for articles matching QUERY, returning a range of articles that match the query (or nil if no articles match). The QUERY is a flexible expression looking something like: (and (subject "Something") (text "Something else")) The meaning of the primitives is hopefully obvious, however some details: `header' The `header' primitive takes two arguments, one string indicating the header to search and one to indicate the string to search for. E.g. `(header "bcc" "myself")'. `head' On other other hand, the `head' primitive only takes one argument and searches the entire header. `charset' This is a pseduo-primitive, used to wrap other search primitives that should search using a certain character set. E.g. `(charset "iso-8859-1" (subject "räksmörgås"))'. There should be no result data returned. `(nnchoke-request-search-server QUERY &optional SERVER)' This function should search all groups in the server, returning a alist containing `group range' elements where GROUP is the non-fully qualified name of the group where the RANGE articles match the search query (or nil if no articles match). See `nnchoke-request-search-group' for the syntax of QUERY. This function is typically only implemented if the backend can efficiently search all groups. There should be no result data returned.