* 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
* Re: Error in gnus-delay-article and extension
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>
1 sibling, 0 replies; 3+ messages in thread
From: Dan Christensen @ 2009-12-22 4:05 UTC (permalink / raw)
To: info-gnus-english
I'll just comment on your second question:
Cecil Westerhof <Cecil@decebal.nl> writes:
> 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)
Hmm, here's what I get:
(setq delay "2009-12-22")
"2009-12-22"
(string-match "\\([0-9][0-9][0-9][0-9]\\)-\\([0-9]+\\)-\\([0-9]+\\)"
delay)
0
(match-string 1 delay)
"2009"
(match-string 2 delay)
"12"
(match-string 3 delay)
"22"
(match-string 0 delay)
"2009-12-22"
Dan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Error in gnus-delay-article and extension
[not found] ` <mailman.26.1261454765.1956.info-gnus-english@gnu.org>
@ 2009-12-22 4:22 ` Cecil Westerhof
0 siblings, 0 replies; 3+ messages in thread
From: Cecil Westerhof @ 2009-12-22 4:22 UTC (permalink / raw)
To: info-gnus-english
Dan Christensen <jdc@uwo.ca> writes:
> Hmm, here's what I get:
>
> (setq delay "2009-12-22")
> "2009-12-22"
>
> (string-match "\\([0-9][0-9][0-9][0-9]\\)-\\([0-9]+\\)-\\([0-9]+\\)"
> delay)
> 0
>
> (match-string 1 delay)
> "2009"
>
> (match-string 2 delay)
> "12"
>
> (match-string 3 delay)
> "22"
>
> (match-string 0 delay)
> "2009-12-22"
Very strange, when doing it in the message buffer it works. But when I
copy those statements to the scratch buffer it goes wrong again. Looks
like the scratch buffer acts differently.
--
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).