* Bug with gnus agent when processing message queue and having archive alist
@ 2012-04-06 16:04 Matt Ford
2012-04-06 18:04 ` Matt Ford
2012-04-10 18:48 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 11+ messages in thread
From: Matt Ford @ 2012-04-06 16:04 UTC (permalink / raw)
To: ding
Hi,
If I come back from unplugged mode and try to send the queue with `J S'
and I have the following set then:
(setq gnus-message-archive-group
'(("Manchester:INBOX" "nnimap+Manchester:INBOX")
("Dancingfrog:INBOX" "nnimap+Dancingfrog:INBOX")))
things fail like this...
gnus-inews-insert-gcc: Wrong type argument: stringp, nil
Which also explains my previous double post, so sorry about that. Any
suggested work arounds?
Cheers,
--
Matt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-06 16:04 Bug with gnus agent when processing message queue and having archive alist Matt Ford
@ 2012-04-06 18:04 ` Matt Ford
2012-04-06 19:39 ` Matt Ford
2012-04-10 18:48 ` Lars Magne Ingebrigtsen
1 sibling, 1 reply; 11+ messages in thread
From: Matt Ford @ 2012-04-06 18:04 UTC (permalink / raw)
To: ding
This is probably related to the fact that doing a `C-u m' on a topic
item with the gnus-message-archive-group configured with an a-list also
fails.
I'm guessing in both cases there is no group set for the regexs to match
to. Wildcard match doesn't help either (but I'm a bit out of my depth
with this).
--
Matt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-06 18:04 ` Matt Ford
@ 2012-04-06 19:39 ` Matt Ford
2012-04-10 18:49 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Matt Ford @ 2012-04-06 19:39 UTC (permalink / raw)
To: ding
Okay, here's a patch to make it work. Probably not the right one but it
does the job. Essentially if the gnus-message-archive-group is set then
the gnus-inews-insert-gcc function will try a string comparison on the
optional group parameter even if the group parameter is not set.
Providing an empty string stops the wrong type error.
Cheers,
Matt.
--- gnus-msg.el.old 2012-04-06 20:33:36.196856856 +0100
+++ gnus-msg.el 2012-04-06 20:24:09.382615209 +0100
@@ -1729,7 +1729,7 @@
(defun gnus-inews-insert-gcc (&optional group)
"Insert the Gcc to say where the article is to be archived."
- (let* ((group (or group gnus-newsgroup-name))
+ (let* ((group (or group gnus-newsgroup-name ""))
(group (when group (gnus-group-decoded-name group)))
(var (or gnus-outgoing-message-group gnus-message-archive-group))
(gcc-self-val
--
Matt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-06 16:04 Bug with gnus agent when processing message queue and having archive alist Matt Ford
2012-04-06 18:04 ` Matt Ford
@ 2012-04-10 18:48 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10 18:48 UTC (permalink / raw)
To: Matt Ford; +Cc: ding
Matt Ford <matt@dancingfrog.co.uk> writes:
> things fail like this...
>
> gnus-inews-insert-gcc: Wrong type argument: stringp, nil
`(setq debug-on-error t)', repeat the bug and post the resulting
backtrace.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-06 19:39 ` Matt Ford
@ 2012-04-10 18:49 ` Lars Magne Ingebrigtsen
2012-04-10 21:15 ` Matt Ford
0 siblings, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10 18:49 UTC (permalink / raw)
To: Matt Ford; +Cc: ding
Matt Ford <matt@dancingfrog.co.uk> writes:
> + (let* ((group (or group gnus-newsgroup-name ""))
I suspect that's not the correct fix, since it does actions later based
on whether `group' is nil or not.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-10 18:49 ` Lars Magne Ingebrigtsen
@ 2012-04-10 21:15 ` Matt Ford
2012-04-10 22:38 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Matt Ford @ 2012-04-10 21:15 UTC (permalink / raw)
To: ding
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Matt Ford <matt@dancingfrog.co.uk> writes:
>
>> things fail like this...
>>
>> gnus-inews-insert-gcc: Wrong type argument: stringp, nil
>
> `(setq debug-on-error t)', repeat the bug and post the resulting
> backtrace.
Here it is: the string "Manchester:" is the first regex of my alist.
There's no check before the string-match to see if group has actually
been defined which is why forcing it "" works...
It's easy to invoke the bug, in title mode use the arrow keys to move
the cursor to a title heading and `C-u m'. One sees it also on return
from unplugged mode.
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("Manchester:" nil)
(if (string-match (caar var) group) (progn (cdar var)))
(when (string-match (caar var) group) (cdar var))
(cond ((stringp (caar var)) (when (string-match (caar var) group) (cdar var))) ((functionp (car var)) (funcall (car var) group)) (t (eval (car var))))
(setq result (cond ((stringp (caar var)) (when (string-match (caar var) group) (cdar var))) ((functionp (car var)) (funcall (car var) group)) (t (eval (car var)))))
(not (setq result (cond ((stringp (caar var)) (when (string-match (caar var) group) (cdar var))) ((functionp (car var)) (funcall (car var) group)) (t (eval (car var))))))
(and var (not (setq result (cond ((stringp (caar var)) (when (string-match (caar var) group) (cdar var))) ((functionp (car var)) (funcall (car var) group)) (t (eval (car var)))))))
(while (and var (not (setq result (cond ((stringp (caar var)) (when (string-match ... group) (cdar var))) ((functionp (car var)) (funcall (car var) group)) (t (eval (car var))))))) (setq var (cdr var)))
(cond ((null gnus-message-archive-method) nil) ((stringp var) (list var)) ((null var) nil) ((and (listp var) (stringp (car var))) var) ((functionp var) (funcall var group)) (t (while (and var (not (setq result (cond (... ...) (... ...) (t ...))))) (setq var (cdr var))) result))
(let* ((group (or group gnus-newsgroup-name)) (group (when group (gnus-group-decoded-name group))) (var (or gnus-outgoing-message-group gnus-message-archive-group)) (gcc-self-val (and group (gnus-group-find-parameter group (quote gcc-self)))) result (groups (cond ((null gnus-message-archive-method) nil) ((stringp var) (list var)) ((null var) nil) ((and (listp var) (stringp (car var))) var) ((functionp var) (funcall var group)) (t (while (and var (not ...)) (setq var (cdr var))) result))) name) (when (or groups gcc-self-val) (when (stringp groups) (setq groups (list groups))) (save-excursion (save-restriction (message-narrow-to-headers) (goto-char (point-max)) (insert "Gcc: ") (if gcc-self-val (progn (insert (if ... ... ...)) (if (not ...) (insert "\n") (gnus-delete-line))) (while (setq n
ame (pop groups)) (let (...) (insert ...)) (when groups (insert " "))) (insert "\n"))))))
gnus-inews-insert-gcc()
run-hooks(message-header-setup-hook)
message-setup-1(((To . "") (Subject . "")) nil nil nil)
message-setup(((To . "") (Subject . "")) nil nil nil nil nil)
message-mail()
gnus-group-mail((4))
call-interactively(gnus-group-mail nil nil)
recursive-edit()
debug(error (error "No such part"))
signal(error ("No such part"))
gnus-article-read-summary-keys(2)
call-interactively(gnus-article-read-summary-keys nil nil)
--
Matt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-10 21:15 ` Matt Ford
@ 2012-04-10 22:38 ` Lars Magne Ingebrigtsen
2012-04-10 22:48 ` Matt Ford
0 siblings, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10 22:38 UTC (permalink / raw)
To: Matt Ford; +Cc: ding
Matt Ford <matt@dancingfrog.co.uk> writes:
> Here it is: the string "Manchester:" is the first regex of my alist.
> There's no check before the string-match to see if group has actually
> been defined which is why forcing it "" works...
I've applied the patch below to No Gnus. Does it fix the problem?
> It's easy to invoke the bug, in title mode use the arrow keys to move
> the cursor to a title heading and `C-u m'. One sees it also on return
> from unplugged mode.
Title heading?
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index 500ace9..507f040 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -1670,11 +1670,13 @@ this is a reply."
(not
(setq result
(cond
- ((stringp (caar var))
+ ((and group
+ (stringp (caar var)))
;; Regexp.
(when (string-match (caar var) group)
(cdar var)))
- ((functionp (car var))
+ ((and group
+ (functionp (car var)))
;; Function.
(funcall (car var) group))
(t
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-10 22:38 ` Lars Magne Ingebrigtsen
@ 2012-04-10 22:48 ` Matt Ford
2012-04-10 22:52 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Matt Ford @ 2012-04-10 22:48 UTC (permalink / raw)
To: ding
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
>> It's easy to invoke the bug, in title mode use the arrow keys to move
>> the cursor to a title heading and `C-u m'. One sees it also on return
>> from unplugged mode.
>
> Title heading?
Apologies, by title heading I mean topic heading in the Group buffer - basically
any line that's not a group when kicking of a message using `C-u m'.
--
Matt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-10 22:48 ` Matt Ford
@ 2012-04-10 22:52 ` Lars Magne Ingebrigtsen
2012-04-12 10:25 ` Matt Ford
0 siblings, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10 22:52 UTC (permalink / raw)
To: Matt Ford; +Cc: ding
Matt Ford <matt@dancingfrog.co.uk> writes:
> Apologies, by title heading I mean topic heading in the Group buffer -
> basically any line that's not a group when kicking of a message using
> `C-u m'.
Ah, right.
Well, with the change I applied, I'm not getting any backtrace...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-10 22:52 ` Lars Magne Ingebrigtsen
@ 2012-04-12 10:25 ` Matt Ford
2012-04-12 18:35 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Matt Ford @ 2012-04-12 10:25 UTC (permalink / raw)
To: ding
hmm - doesn't quite work for me. It now looks to be trying to evaluate
the regex rather than matching it.
Debugger entered--Lisp error: (invalid-function "Manchester:")
("Manchester:" "nnimap+Manchester:Sent Items")
eval(("Manchester:" "nnimap+Manchester:Sent Items"))
gnus-inews-insert-gcc()
run-hooks(message-header-setup-hook)
message-setup-1(((To . "") (Subject . "")) nil nil nil)
message-setup(((To . "") (Subject . "")) nil nil nil nil nil)
message-mail()
gnus-group-mail((4))
call-interactively(gnus-group-mail nil nil)
Here's my setting:
(setq gnus-message-archive-group '(("Manchester:" "nnimap+Manchester:Sent Items")
("Dancingfrog:" "nnimap+Dancingfrog:[Google Mail]/Sent Mail")
(quote "sent")))
Perhaps a final check is needed?
(cond
((and group
(stringp (caar var)))
;; Regexp.
(when (string-match (caar var) group)
(cdar var)))
((and group
(functionp (car var)))
;; Function.
(funcall (car var) group))
((and (functionp (car var))
(eval (car var))))))))
--
Matt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug with gnus agent when processing message queue and having archive alist
2012-04-12 10:25 ` Matt Ford
@ 2012-04-12 18:35 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-12 18:35 UTC (permalink / raw)
To: Matt Ford; +Cc: ding
Matt Ford <matt@dancingfrog.co.uk> writes:
> Perhaps a final check is needed?
Yup. I've now applied a new patch to No and Ma to try to fix this.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-04-12 18:35 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-06 16:04 Bug with gnus agent when processing message queue and having archive alist Matt Ford
2012-04-06 18:04 ` Matt Ford
2012-04-06 19:39 ` Matt Ford
2012-04-10 18:49 ` Lars Magne Ingebrigtsen
2012-04-10 21:15 ` Matt Ford
2012-04-10 22:38 ` Lars Magne Ingebrigtsen
2012-04-10 22:48 ` Matt Ford
2012-04-10 22:52 ` Lars Magne Ingebrigtsen
2012-04-12 10:25 ` Matt Ford
2012-04-12 18:35 ` Lars Magne Ingebrigtsen
2012-04-10 18:48 ` Lars Magne Ingebrigtsen
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).