From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87014 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Unable to sent agent queue Date: Mon, 25 Apr 2016 19:06:42 +0800 Message-ID: <87wpnmlzgd.fsf@ericabrahamsen.net> References: <87d1pical6.fsf@ucl.ac.uk> <87fuudndbc.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1461582526 5384 80.91.229.3 (25 Apr 2016 11:08:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Apr 2016 11:08:46 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M35235@lists.math.uh.edu Mon Apr 25 13:08:29 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aueNL-0005s4-BA for ding-account@gmane.org; Mon, 25 Apr 2016 13:08:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.86_2) (envelope-from ) id 1aueMF-0004y3-V5; Mon, 25 Apr 2016 06:07:16 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1aueMC-0004xU-Ld for ding@lists.math.uh.edu; Mon, 25 Apr 2016 06:07:12 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_2) (envelope-from ) id 1aueMB-0006IS-AS for ding@lists.math.uh.edu; Mon, 25 Apr 2016 06:07:12 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1aueM9-0000M0-1x for ding@gnus.org; Mon, 25 Apr 2016 13:07:09 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aueM7-0005KX-OJ for ding@gnus.org; Mon, 25 Apr 2016 13:07:08 +0200 Original-Received: from 123.118.189.146 ([123.118.189.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Apr 2016 13:07:07 +0200 Original-Received: from eric by 123.118.189.146 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Apr 2016 13:07:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 123.118.189.146 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:OlypK8775PoxXY+VZPE1UiGaMBY= X-Spam-Score: -1.2 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87014 Archived-At: Eric Abrahamsen writes: > Eric S Fraga writes: > >> On Friday, 22 Apr 2016 at 06:04, Eric Abrahamsen wrote: >>> I'm using Emacs (and thus Gnus) from git master. Can anyone confirm that >>> they have a similar setup, and using the queue still works? >> >> I use unplugged/queue all the time and it works fine for me. However, I >> am stuck on the last version of git from before it was merged in with >> gnus [1]. It could be that some recent changes in gnus have affected you? Well, more poking has revealed the following: Sending the queue calls `gnus-draft-send', which blanks out almost all the message related hooks, but not message-header-setup-hook. gnus-draft-send calls gnus-draft-setup --> message-mail --> message-setup --> message-setup-1, which runs the message-header-setup-hook. gnus-draft-setup contains a call to the macro gnus-setup-message. In that macro, the message-header-setup-hook is set to: (lambda () (gnus-inews-insert-gcc ,group)) During macro execution, "group" is let-bound to the dynamic variable gnus-newsgroup-name. (Here's where I think the bug is.) When the hook is run, gnus-inews-insert-gcc checks to see if gnus-message-archive-group is a function, and if it is, calls it with "group" as an argument. "group" is nil by the time the hook is run. My gnus-message-archive-group is indeed a function, which accepts a "group" argument, and tests it against regexps. My error was arising because "group" is nil, and I was assuming it was a string. I've worked around the error by guarding against a nil value for "group". I was originally totally guessing that this problem was related to lexical scoping, but now I'm more sure. I'm embarrassed to admit that I don't understand the interaction between lexical scoping and macro execution at all -- I'm hoping that this is my last real Elisp blind spot. I've worked around the error, and this may vanish as one of those mysterious Gnus bugs that no one else runs into. But it might also be worth raising on the emacs-devel list, just to learn what's actually happening. E