GNU bug report logs -
#14166
24.3.50; report-emacs-bug and mail-user-agent == 'gnus-user-agent
Previous Next
Reported by: michael_heerdegen <at> web.de
Date: Tue, 9 Apr 2013 14:22:02 UTC
Severity: normal
Found in version 24.3.50
Done: Katsumi Yamaoka <yamaoka <at> jpl.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14166 in the body.
You can then email your comments to 14166 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14166
; Package
emacs
.
(Tue, 09 Apr 2013 14:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
michael_heerdegen <at> web.de
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 09 Apr 2013 14:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
the problem is the following (with my setup):
- I have an active gnus; currently, I'm having a summary buffer showing
the emacs-dev newsgroup. I need it for reference for the composition
of a bug report.
- I do M-x report-emacs-bug
The result is that the mail composition buffer will have a TO field of
"emacs-devel <at> gnu.org" instead of "bug-gnu-emacs <at> gnu.org".
`report-emacs-bug' uses the posting-style of the group I'm currently
reading. Surprising, and not very useful.
Background: I use mail-user-agent == 'gnus-user-agent. Not sure if
there are other related settings.
And I have this element in `gnus-posting-styles':
("\\(?:\\(?:g\\(?:\\(?:mane\\|nu\\)\\.emacs\\.devel\\)\\)\\)\\'"
(TO "emacs-devel <at> gnu.org")
(BCC #1="michael_heerdegen <at> web.de")
. #2=((FCC nil)))
mainly because I read emacs-devel as a group, but want to reply always
to the mailing list (I know about S L, but I want also to be able to use
the standard reply commands. Please tell me if that's a bad idea).
I debugged a bit. Here is what's going on:
M-x report-emacs-bug
--> compose-mail
--> (get mail-user-agent 'composefunc) == 'gnus-msg-mail
--> (gnus-setup-message 'message
(message-mail to subject other-headers continue
nil yank-action send-actions return-action))
The macro `gnus-setup-message' binds `#:group' to the value of
`gnus-newsgroup-name', which is "nntp+Gmane:gmane.emacs.devel" in my
case.
Then it does this:
(add-hook 'message-mode-hook
(if (memq ,config '(reply-yank reply))
(lambda ()
(gnus-configure-posting-styles ,group))
(lambda ()
;; There may be an old " *gnus article copy*" buffer.
(let (gnus-article-copy)
(gnus-configure-posting-styles ,group)))))
At the end, running `message-mode-hook' changes the TO field
according to the posting style via `gnus-configure-posting-styles'.
Thanks,
Michael.
In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
of 2013-04-04 on dex, modified by Debian
(emacs-snapshot package, version 2:20130403-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description: Debian GNU/Linux 7.0 (wheezy)
Configured using:
`configure --build x86_64-linux-gnu --host x86_64-linux-gnu
--prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man
--with-pop=yes
--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
--without-compress-info --with-crt-dir=/usr/lib/x86_64-linux-gnu/
--with-x=yes --with-x-toolkit=gtk3 --with-imagemagick=yes
CFLAGS='-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2'
CPPFLAGS='-D_FORTIFY_SOURCE=2' LDFLAGS='-g -Wl,--as-needed
-znocombreloc''
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14166
; Package
emacs,gnus
.
(Wed, 10 Apr 2013 05:56:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 14166 <at> debbugs.gnu.org (full text, mbox):
Michael Heerdegen wrote:
> the problem is the following (with my setup):
> - I have an active gnus; currently, I'm having a summary buffer showing
> the emacs-dev newsgroup. I need it for reference for the composition
> of a bug report.
> - I do M-x report-emacs-bug
> The result is that the mail composition buffer will have a TO field of
> "emacs-devel <at> gnu.org" instead of "bug-gnu-emacs <at> gnu.org".
> `report-emacs-bug' uses the posting-style of the group I'm currently
> reading. Surprising, and not very useful.
> Background: I use mail-user-agent == 'gnus-user-agent. Not sure if
> there are other related settings.
> And I have this element in `gnus-posting-styles':
> ("\\(?:\\(?:g\\(?:\\(?:mane\\|nu\\)\\.emacs\\.devel\\)\\)\\)\\'"
> (TO "emacs-devel <at> gnu.org")
> (BCC #1="michael_heerdegen <at> web.de")
> . #2=((FCC nil)))
> mainly because I read emacs-devel as a group, but want to reply always
> to the mailing list (I know about S L, but I want also to be able to use
> the standard reply commands. Please tell me if that's a bad idea).
[...]
There seem to be several solutions, however ideas I have are not
so good. For example:
1. To make `report-emacs-bug' bind `gnus-posting-styles' to nil
unconditionally while performing `compose-mail'. It has to load
gnus-msg.el, that provides `gnus-posting-styles', before binding
it to nil if Gnus is not running yet even if `mail-user-agent'
is not `gnus-user-agent'. Otherwise, `gnus-posting-styles' will
be made unbound. Note that a function `gnus-user-agent' uses,
that is `gnus-msg-mail', is autoloaded, and it involves many other
Gnus modules loading.
2. Similar to 1. But load gnus-msg.el and bind `gnus-posting-styles'
to nil if and only if `mail-user-agent' equals `gnus-user-agent'.
I think the source code for it will get ugly.
3. To make `gnus-msg-mail' bind `gnus-posting-styles' to nil if and
only if `this-command' is `report-emacs-bug'. It won't work if
`report-emacs-bug' is called non-interactively.
My second best is 2. What do others think?
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14166
; Package
emacs,gnus
.
(Wed, 10 Apr 2013 13:44:13 GMT)
Full text and
rfc822 format available.
Message #11 received at 14166 <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
> There seem to be several solutions, however ideas I have are not
> so good. For example:
>
> 1. To make `report-emacs-bug' bind `gnus-posting-styles' to nil
> unconditionally while performing `compose-mail'. It has to load
> gnus-msg.el, that provides `gnus-posting-styles', before binding
> it to nil if Gnus is not running yet even if `mail-user-agent'
> is not `gnus-user-agent'. Otherwise, `gnus-posting-styles' will
> be made unbound. Note that a function `gnus-user-agent' uses,
> that is `gnus-msg-mail', is autoloaded, and it involves many other
> Gnus modules loading.
>
> 2. Similar to 1. But load gnus-msg.el and bind `gnus-posting-styles'
> to nil if and only if `mail-user-agent' equals `gnus-user-agent'.
> I think the source code for it will get ugly.
>
> 3. To make `gnus-msg-mail' bind `gnus-posting-styles' to nil if and
> only if `this-command' is `report-emacs-bug'. It won't work if
> `report-emacs-bug' is called non-interactively.
>
> My second best is 2. What do others think?
Just want to mention `gnus-inhibit-posting-styles'. Maybe binding it is
more comfortable? Dunno, just an idea.
Regards,
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14166
; Package
emacs,gnus
.
(Thu, 11 Apr 2013 00:46:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 14166 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Michael Heerdegen wrote:
> Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
>> There seem to be several solutions, however ideas I have are not
>> so good. For example:
>>
>> 1. To make `report-emacs-bug' bind `gnus-posting-styles' to nil
>> unconditionally while performing `compose-mail'. It has to load
>> gnus-msg.el, that provides `gnus-posting-styles', before binding
>> it to nil if Gnus is not running yet even if `mail-user-agent'
>> is not `gnus-user-agent'. Otherwise, `gnus-posting-styles' will
>> be made unbound. Note that a function `gnus-user-agent' uses,
>> that is `gnus-msg-mail', is autoloaded, and it involves many other
>> Gnus modules loading.
>>
>> 2. Similar to 1. But load gnus-msg.el and bind `gnus-posting-styles'
>> to nil if and only if `mail-user-agent' equals `gnus-user-agent'.
>> I think the source code for it will get ugly.
>>
>> 3. To make `gnus-msg-mail' bind `gnus-posting-styles' to nil if and
>> only if `this-command' is `report-emacs-bug'. It won't work if
>> `report-emacs-bug' is called non-interactively.
>>
>> My second best is 2. What do others think?
> Just want to mention `gnus-inhibit-posting-styles'. Maybe binding it isThat
> more comfortable? Dunno, just an idea.
That will cause a problem similar to the one I mentioned in 1.
If Gnus is neither running nor loaded when performing
`report-emacs-bug', gnus-msg.el will be autoloaded under the condition
where `gnus-inhibit-posting-styles' is let-bound (to non-nil), and
`gnus-inhibit-posting-styles' will get void afterward.
Besides this, I came to realize that a user may want to use
`gnus-posting-styles' so as to add something like `Bcc: me', as
you do. So, either way is not so good.
Oh, I hit on a good idea! That's somewhat kludgy but works.
A quick hack is below. It binds the newsgroup name to
"report-emacs-bug" temporarily while performing `report-emacs-bug'.
So, if you want to add `Bcc: me' to a bug report, you can use
this element in `gnus-posting-styles':
("report-emacs-bug"
(Bcc "michael_heerdegen <at> web.de"))
WDYT?
[Message part 2 (text/x-patch, inline)]
--- emacsbug.el~ 2013-02-11 22:45:54.714731000 +0000
+++ emacsbug.el 2013-04-11 00:37:32.109258200 +0000
@@ -162,7 +162,12 @@
(setq message-end-point
(with-current-buffer (get-buffer-create "*Messages*")
(point-max-marker)))
- (compose-mail report-emacs-bug-address topic)
+ (if (eq mail-user-agent 'gnus-user-agent)
+ (progn
+ (require 'gnus) ;; It defines `gnus-newsgroup-name'.
+ (let ((gnus-newsgroup-name "report-emacs-bug"))
+ (compose-mail report-emacs-bug-address topic)))
+ (compose-mail report-emacs-bug-address topic))
;; The rest of this does not execute if the user was asked to
;; confirm and said no.
(when (eq major-mode 'message-mode)
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14166
; Package
emacs,gnus
.
(Thu, 11 Apr 2013 13:56:08 GMT)
Full text and
rfc822 format available.
Message #17 received at 14166 <at> debbugs.gnu.org (full text, mbox):
> + (if (eq mail-user-agent 'gnus-user-agent)
> + (progn
> + (require 'gnus) ;; It defines `gnus-newsgroup-name'.
> + (let ((gnus-newsgroup-name "report-emacs-bug"))
> + (compose-mail report-emacs-bug-address topic)))
> + (compose-mail report-emacs-bug-address topic))
Why would we need such a hack? `compose-mail' already receives very
clearly the destination address.
more to the point: we start with a call to Gnus's `composefunc' with an
explicit "to" address (with value report-emacs-bug-address). And we end
with a message that uses a different "to" address. So the problem seems
to be on Gnus's side only.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14166
; Package
emacs,gnus
.
(Thu, 11 Apr 2013 18:08:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 14166 <at> debbugs.gnu.org (full text, mbox):
On Tue, Apr 09 2013, Michael Heerdegen wrote:
> And I have this element in `gnus-posting-styles':
>
> ("\\(?:\\(?:g\\(?:\\(?:mane\\|nu\\)\\.emacs\\.devel\\)\\)\\)\\'"
> (TO "emacs-devel <at> gnu.org")
> (BCC #1="michael_heerdegen <at> web.de")
> . #2=((FCC nil)))
>
> mainly because I read emacs-devel as a group, but want to reply always
> to the mailing list (I know about S L, but I want also to be able to use
> the standard reply commands. Please tell me if that's a bad idea).
I read emacs-devel via gmane and use group parameters to reply to the
mailing list instead, see (info "(gnus)Group Parameters"). For example,
my group parameters for gmane.emacs.devel are
((subscribed . t)
(to-list . "emacs-devel <at> gnu.org"))
Also, gnus-mailing-list-insinuate can be used for the initial set-up.
Wolfgang
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14166
; Package
emacs,gnus
.
(Thu, 11 Apr 2013 19:00:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 14166 <at> debbugs.gnu.org (full text, mbox):
Wolfgang Jenkner <wjenkner <at> inode.at> writes:
> I read emacs-devel via gmane and use group parameters to reply to the
> mailing list instead, see (info "(gnus)Group Parameters"). For example,
> my group parameters for gmane.emacs.devel are
>
> ((subscribed . t)
> (to-list . "emacs-devel <at> gnu.org"))
Although I still think this problem should be fixed - this is a good
hint, many thanks! I tried this:
--8<---------------cut here---------------start------------->8---
(dolist (entry my-gnus-newsgroups-to-mailing-lists-mapping)
(add-to-list 'gnus-parameters
`(,(car entry) (subscribed . t) (to-list . ,(cdr entry)))))
--8<---------------cut here---------------end--------------->8---
where `my-gnus-newsgroups-to-mailing-lists-mapping' is an alist
((group-regexp . mailing-list-name) ...) I already had defined (I'm
indeed subscribed to all of those). And it seems to work very well,
without provoking this bug.
Regards,
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14166
; Package
emacs,gnus
.
(Thu, 11 Apr 2013 19:11:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 14166 <at> debbugs.gnu.org (full text, mbox):
On Thu, Apr 11 2013, Stefan Monnier wrote:
> more to the point: we start with a call to Gnus's `composefunc' with an
> explicit "to" address (with value report-emacs-bug-address). And we end
> with a message that uses a different "to" address. So the problem seems
> to be on Gnus's side only.
The Gnus callee behaves as documented, so you'd normally expect the
caller to put up with it. Personally, though, I don't think there's
a bug here at all, just an example of legitimate foot-shooting ;-)
Wolfgang
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14166
; Package
emacs,gnus
.
(Fri, 12 Apr 2013 01:58:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 14166 <at> debbugs.gnu.org (full text, mbox):
Wolfgang Jenkner wrote:
> On Thu, Apr 11 2013, Stefan Monnier wrote:
>> more to the point: we start with a call to Gnus's `composefunc' with an
>> explicit "to" address (with value report-emacs-bug-address). And we end
>> with a message that uses a different "to" address. So the problem seems
>> to be on Gnus's side only.
> The Gnus callee behaves as documented, so you'd normally expect the
> caller to put up with it. Personally, though, I don't think there's
> a bug here at all, just an example of legitimate foot-shooting ;-)
Thanks for your help. I'd like to fix this problem in this manner:
Background:
The composefunc of `gnus-user-agent' is `gnus-msg-mail', that is
called by not only `compose-mail' but also some Gnus internals.
A posting style corresponding to a currently opened group is
applied when running `gnus-msg-mail'. No problem if it is used
within Gnus. However, the posting style may get meaningless or
harmful if it is called outside of Gnus. This suggests that every
user will be able to be a foot-shooter.
・Rename `gnus-msg-mail' to `gnus-msg-mail-1'.
・Create `gnus-msg-mail' that calls `gnus-msg-mail-1' with `let'-
binding of `gnus-newsgroup-name' to "gnus-user-agent".
・Use `gnus-msg-mail' for composefunc exclusively. Make Gnus
internals use `gnus-msg-mail-1' instead of `gnus-msg-mail'.
・A user who want to use a posting style even when `compose-mail'
is used may add it for the group named "gnus-user-agent".
Those changes will be done within Gnus. Any other suggestion is
welcome. My only anxiety is such a pseudo group name.
Regards,
P.S. I'm not a posting style user.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14166
; Package
emacs,gnus
.
(Fri, 12 Apr 2013 07:44:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 14166 <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka wrote:
> Wolfgang Jenkner wrote:
>> On Thu, Apr 11 2013, Stefan Monnier wrote:
>>> more to the point: we start with a call to Gnus's `composefunc' with an
>>> explicit "to" address (with value report-emacs-bug-address). And we end
>>> with a message that uses a different "to" address. So the problem seems
>>> to be on Gnus's side only.
>> The Gnus callee behaves as documented, so you'd normally expect the
>> caller to put up with it. Personally, though, I don't think there's
>> a bug here at all, just an example of legitimate foot-shooting ;-)
> Thanks for your help. I'd like to fix this problem in this manner:
> Background:
> The composefunc of `gnus-user-agent' is `gnus-msg-mail', that is
> called by not only `compose-mail' but also some Gnus internals.
> A posting style corresponding to a currently opened group is
> applied when running `gnus-msg-mail'. No problem if it is used
> within Gnus. However, the posting style may get meaningless or
> harmful if it is called outside of Gnus. This suggests that every
> user will be able to be a foot-shooter.
After having consulted the Gnus code, I changed my mind as follows:
> ・Rename `gnus-msg-mail' to `gnus-msg-mail-1'.
Unnecessary.
> ・Create `gnus-msg-mail' that calls `gnus-msg-mail-1' with `let'-
> binding of `gnus-newsgroup-name' to "gnus-user-agent".
Change this to:
・Make `gnus-msg-mail' `let'-bind `gnus-newsgroup-name' to "".
> ・Use `gnus-msg-mail' for composefunc exclusively. Make Gnus
> internals use `gnus-msg-mail-1' instead of `gnus-msg-mail'.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Currently there's no Gnus internal that had better use
`gnus-msg-mail-1' instead of `gnus-msg-mail'.
> ・A user who want to use a posting style even when `compose-mail'
> is used may add it for the group named "gnus-user-agent".
Replace this paragraph with:
・The default posting style, that begins with ".*" and the like,
will be applied to a mail that `compose-mail' originates.
So, what I'm going to do now is simply to modify `gnus-msg-mail'.
Maybe an Info for this is unnecessary.
Regards,
Reply sent
to
Katsumi Yamaoka <yamaoka <at> jpl.org>
:
You have taken responsibility.
(Fri, 12 Apr 2013 15:23:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
michael_heerdegen <at> web.de
:
bug acknowledged by developer.
(Fri, 12 Apr 2013 15:23:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 14166-done <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka <yamaoka <at> jpl.org> wrote:
> So, what I'm going to do now is simply to modify `gnus-msg-mail'.
Done.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 11 May 2013 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 38 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.