Gnus development mailing list
 help / color / mirror / Atom feed
From: ShengHuo ZHU <zsh@cs.rochester.edu>
Subject: Re: -request-set-mark interface
Date: 16 Feb 2001 11:51:54 -0500	[thread overview]
Message-ID: <5bbss2muz9.fsf@avocet.cs.rochester.edu> (raw)
In-Reply-To: <Pine.LNX.4.30.0102161715040.5276-100000@slipsten.extundo.com> (Simon Josefsson's message of "Fri, 16 Feb 2001 17:28:37 +0100 (CET)")

Simon Josefsson <jas@extundo.com> writes:

> On 16 Feb 2001, Paul Jarc wrote:
> 
> > The 5.8.8 info says:
> > #`(nnchoke-request-set-mark GROUP ACTION &optional SERVER)'
> > ...
> > #     ACTION is a list of mark setting requests, having this format:
> > #
> > #          (RANGE ACTION MARK)
> > #
> > #     Range is a range of articles you wish to update marks on.
> > ...
> > #     An example action list:
> > #
> > #          (((5 12 30) 'del '(tick))
> > #           ((10 . 90) 'add '(read expire))
> > #           ((92 94) 'del '(read)))
> >
> > Is this right?  It seems that the second action should be:
> >    (((10 . 90)) 'add '(read expire))
> > Can RANGE really be a single range (a number or cons of two numbers),
> > or is it always a list of ranges?
> 
> RANGE can be a cons of two numbers (like in the example, which I think is
> correct).  I don't think ranges are allowed to be a single number.  The
> range EBNF don't indicate that, and the gnus-range-* functions doesn't
> seem to handle it either.

Some range functions can handle a single range, such as
gnus-uncompress-range (search for "(listp (cdr", you will find many).
Unfortunately, some of them possibly return a single range. The below
function normalizes ranges.  I've put it into oGnus.

(defsubst gnus-range-normalize (range)
  "Normalize RANGE.
If RANGE is a single range, return (RANGE). Otherwise, return RANGE."
  (if (listp (cdr range)) (list range) range))

ShengHuo

-- 
(setq gnus-posting-styles 
      '((".*" (signature (format "(setq gnus-posting-styles 
      '%S)" gnus-posting-styles)))))



      reply	other threads:[~2001-02-16 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-16 15:45 Paul Jarc
2001-02-16 16:28 ` Simon Josefsson
2001-02-16 16:51   ` ShengHuo ZHU [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5bbss2muz9.fsf@avocet.cs.rochester.edu \
    --to=zsh@cs.rochester.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).