Subject: bug#11514: closed (Re: bug#11514: 24.0.97; gnus-user-agent no longer sets up Gcc)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 21 May 2012 23:31:02 +0000

Your bug report

#11514: 24.0.97; gnus-user-agent no longer sets up Gcc

which was filed against the emacs,gnus package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
11514: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11514
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#11514: 24.0.97; gnus-user-agent no longer sets up Gcc
From: Katsumi Yamaoka <[email-masked]>
To: [email-masked]
Cc: Lars Magne Ingebrigtsen <[email-masked]>, Romain Francoise <[email-masked]>, Sven Joachim <[email-masked]>
Date: Tue, 22 May 2012 08:29:09 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Sven Joachim wrote:
> On 2012-05-18 23:23 +0200, Romain Francoise wrote:

>> If you put the following in /tmp/foo.el:
>>
>> (setq mail-user-agent 'gnus-user-agent
>>       gnus-message-archive-group "nnimap+foo:Sent")
>>
>> then start Emacs with `emacs -Q -l /tmp/foo.el' then do `C-x m', the
>> resulting Message buffer doesn't have a Gcc header. In Emacs 23 and
>> 24.0.92, the Gcc header was (correctly, I think) added to the buffer.
>>
>> Note: whether or not Gnus is started beforehand doesn't make a difference.

This is the issue of only a case where Gnus is running, since
Gcc is Gnus' feature and the `gnus-user-agent' agent behaves
like the `message-user-agent' agent now if Gnus is not alive:

2012-02-09  Lars Ingebrigtsen  <[email-masked]>

	* gnus-msg.el (gnus-msg-mail): Use `message-mail' if Gnus isn't
	running.

(So, why one uses `C-x m' rather than `m'?  Ok, he mey be in a
non-Gnus window.)

> This seems to have been introduced by the following change in the
> emacs-24 branch:

> ,----
>| revno: 107813
>| author: Lars Magne Ingebrigtsen <[email-masked]>
>| committer: Katsumi Yamaoka <[email-masked]>
>| branch nick: emacs-24
>| timestamp: Wed 2012-04-11 22:31:16 +0000
>| message:
>|   gnus-art.el (article-wash-html): Fix non-ASCII characters when
>| washing HTML (bug#7410).
>|   gnus-msg.el (gnus-inews-insert-gcc): Protect against when we don't
>| have a group name.
>|   gnus-start.el (gnus-read-newsrc-el-file): Protect against broken
>| .newsrc.el files.
> `----

> The diff for gnus-msg.el is this:

> === modified file 'lisp/gnus/gnus-msg.el'
> --- lisp/gnus/gnus-msg.el	2012-03-14 22:15:04 +0000
> +++ lisp/gnus/gnus-msg.el	2012-04-11 22:31:16 +0000
> @@ -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

> It corresponds to commit bf5aff3ff7c87 in the no-gnus branch in Gnus
> git.

Reverting this change does not help.  I believe the right fix is
to modify `gnus-msg-mail' so as to bind `gnus-newsgroup-name' to
a string like `gnus-group-mail' does.  Fixed in the emacs-24 branch.

Subject: 24.0.97; gnus-user-agent no longer sets up Gcc
From: Romain Francoise <[email-masked]>
To: [email-masked]
Date: Fri, 18 May 2012 23:23:36 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

If you put the following in /tmp/foo.el:

(setq mail-user-agent 'gnus-user-agent
      gnus-message-archive-group "nnimap+foo:Sent")

then start Emacs with `emacs -Q -l /tmp/foo.el' then do `C-x m', the
resulting Message buffer doesn't have a Gcc header. In Emacs 23 and
24.0.92, the Gcc header was (correctly, I think) added to the buffer.

Note: whether or not Gnus is started beforehand doesn't make a difference.