unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11514: 24.0.97; gnus-user-agent no longer sets up Gcc
@ 2012-05-18 21:23 Romain Francoise
  2012-05-21 11:46 ` Sven Joachim
  0 siblings, 1 reply; 5+ messages in thread
From: Romain Francoise @ 2012-05-18 21:23 UTC (permalink / raw)
  To: 11514

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.





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

* bug#11514: 24.0.97; gnus-user-agent no longer sets up Gcc
  2012-05-18 21:23 bug#11514: 24.0.97; gnus-user-agent no longer sets up Gcc Romain Francoise
@ 2012-05-21 11:46 ` Sven Joachim
  2012-05-21 23:29   ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Joachim @ 2012-05-21 11:46 UTC (permalink / raw)
  To: Romain Francoise; +Cc: Lars Magne Ingebrigtsen, 11514, Katsumi Yamaoka

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 seems to have been introduced by the following change in the
emacs-24 branch:

,----
| revno: 107813
| author: Lars Magne Ingebrigtsen <larsi@gnus.org>
| committer: Katsumi Yamaoka <yamaoka@jpl.org>
| 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:

--8<---------------cut here---------------start------------->8---
=== 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

--8<---------------cut here---------------end--------------->8---

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

Cheers,
       Sven





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

* bug#11514: 24.0.97; gnus-user-agent no longer sets up Gcc
  2012-05-21 11:46 ` Sven Joachim
@ 2012-05-21 23:29   ` Katsumi Yamaoka
  2012-05-22  7:38     ` Romain Francoise
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2012-05-21 23:29 UTC (permalink / raw)
  To: 11514-done; +Cc: Lars Magne Ingebrigtsen, Romain Francoise, Sven Joachim

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  <larsi@gnus.org>

	* 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 <larsi@gnus.org>
>| committer: Katsumi Yamaoka <yamaoka@jpl.org>
>| 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.





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

* bug#11514: 24.0.97; gnus-user-agent no longer sets up Gcc
  2012-05-21 23:29   ` Katsumi Yamaoka
@ 2012-05-22  7:38     ` Romain Francoise
  2012-06-07 23:00       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Romain Francoise @ 2012-05-22  7:38 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: Lars Magne Ingebrigtsen, 11514, Sven Joachim

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> 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:
> [...]

Which is rather suboptimal... if the user explicitly configured
`gnus-user-agent' then we should start enough Gnus bits to make Gcc
(and other Gnus features) work. If that's not possible then it should
complain loudly about the downgrade, or refuse to work at all. Losing
outgoing mail isn't nice.

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

Works for me, thanks!





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

* bug#11514: 24.0.97; gnus-user-agent no longer sets up Gcc
  2012-05-22  7:38     ` Romain Francoise
@ 2012-06-07 23:00       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-06-07 23:00 UTC (permalink / raw)
  To: Romain Francoise; +Cc: Katsumi Yamaoka, 11514, Sven Joachim

Romain Francoise <romain@orebokech.com> writes:

> Which is rather suboptimal... if the user explicitly configured
> `gnus-user-agent' then we should start enough Gnus bits to make Gcc
> (and other Gnus features) work. If that's not possible then it should
> complain loudly about the downgrade, or refuse to work at all. Losing
> outgoing mail isn't nice.

No, it's not, but we really kinda have to start all of Gnus to make Gcc
handling work completely.  So if you have `gnus-user-agent', and just
start Emacs to send off a single email, then you'd be sitting there
waiting for Gnus to start.

I've added a warning message to Ma Gnus now, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

end of thread, other threads:[~2012-06-07 23:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18 21:23 bug#11514: 24.0.97; gnus-user-agent no longer sets up Gcc Romain Francoise
2012-05-21 11:46 ` Sven Joachim
2012-05-21 23:29   ` Katsumi Yamaoka
2012-05-22  7:38     ` Romain Francoise
2012-06-07 23:00       ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).