info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error in gnus-delay-article and extension


From: Cecil Westerhof
Subject: Error in gnus-delay-article and extension
Date: Tue, 22 Dec 2009 00:01:34 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

I am working with GNUS 5.11.

When looking at gnus-delay-article I see the following statement:
    (string-match
            "\\([0-9][0-9][0-9]?[0-9]?\\)-\\([0-9]+\\)-\\([0-9]+\\)"
            delay)

First of all should the regular expression not be (year should always be
four long):
            "\\([0-9][0-9][0-9][0-9]\\)-\\([0-9]+\\)-\\([0-9]+\\)"

Secondly I have been playing a little:
    (setq delay "2009-12-22")

    (string-match "\\([0-9][0-9][0-9][0-9]\\)-\\([0-9]+\\)-\\([0-9]+\\)"
                  delay)

    (match-string 1 delay)

    (match-string 2 delay)

    (match-string 3 delay)

    (match-string 0 delay)

The string-match gives 0, so the match is found. But the first three
match-string do give nil.
And the last gives:
    Debugger entered--Lisp error: (args-out-of-range "2009-12-22" 973 976)
      match-string(0 "2009-12-22")
      eval((match-string 0 delay))
      eval-last-sexp-1(nil)
      eval-last-sexp(nil)
      call-interactively(eval-last-sexp)

What is happening here?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


reply via email to

[Prev in Thread] Current Thread [Next in Thread]