Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Error in gnus-delay-article and extension
@ 2009-12-21 23:01 Cecil Westerhof
  2009-12-22  4:05 ` Dan Christensen
       [not found] ` <mailman.26.1261454765.1956.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Cecil Westerhof @ 2009-12-21 23:01 UTC (permalink / raw)
  To: info-gnus-english

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-22  4:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-21 23:01 Error in gnus-delay-article and extension Cecil Westerhof
2009-12-22  4:05 ` Dan Christensen
     [not found] ` <mailman.26.1261454765.1956.info-gnus-english@gnu.org>
2009-12-22  4:22   ` Cecil Westerhof

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