* bug#43386: 27.1; Regression in `report-emacs-bug'
@ 2020-09-13 21:30 Drew Adams
2020-09-13 23:22 ` Lars Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2020-09-13 21:30 UTC (permalink / raw)
To: 43386
From emacs -Q, when I use C-c C-c to send a bug report, it used to just
ask me how to send it, with "mail client" being the default.
Now it asks me whether <my
host>.i-did-not-set--mail-host-address--so-tickle-me is really my email
address. When I say no, it just ends the interaction.
This is a regression. What's more, after I edit that default From field
to provide my email address, it asks whether I want to save this. I
answer yes, but it makes no difference. Another M-x report-emacs-bug,
at least in the same session, shows that it still uses that default From
text.
All of this is a regression, I believe. I can easily use M-x
report-emacs-bug from emacs -Q with other releases, and not have to jump
through any such hoops.
In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)
of 2020-08-12 built on CIRROCUMULUS
Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.18362
System Description: Microsoft Windows 10 Pro (v10.0.1903.18362.1016)
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#43386: 27.1; Regression in `report-emacs-bug'
2020-09-13 21:30 bug#43386: 27.1; Regression in `report-emacs-bug' Drew Adams
@ 2020-09-13 23:22 ` Lars Ingebrigtsen
2020-09-13 23:56 ` Drew Adams
0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-13 23:22 UTC (permalink / raw)
To: Drew Adams; +Cc: 43386
Drew Adams <drew.adams@oracle.com> writes:
>>From emacs -Q, when I use C-c C-c to send a bug report, it used to just
> ask me how to send it, with "mail client" being the default.
>
> Now it asks me whether <my
> host>.i-did-not-set--mail-host-address--so-tickle-me is really my email
> address. When I say no, it just ends the interaction.
It asks you to edit the From address, which you should do. (But it
should place point on the From line instead of leaving it at the end of
the buffer; I've now fixed this on the trunk.)
> This is a regression.
Nope.
> What's more, after I edit that default From field to provide my email
> address, it asks whether I want to save this. I answer yes, but it
> makes no difference. Another M-x report-emacs-bug, at least in the
> same session, shows that it still uses that default From text.
It doesn't ask me that. Perhaps you're thinking of the next question
you're getting -- which mail transport to use?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#43386: 27.1; Regression in `report-emacs-bug'
2020-09-13 23:22 ` Lars Ingebrigtsen
@ 2020-09-13 23:56 ` Drew Adams
2020-09-13 23:58 ` Lars Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2020-09-13 23:56 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 43386
> >>From emacs -Q, when I use C-c C-c to send a bug report, it used to just
> > ask me how to send it, with "mail client" being the default.
> >
> > Now it asks me whether <my
> > host>.i-did-not-set--mail-host-address--so-tickle-me is really my email
> > address. When I say no, it just ends the interaction.
>
> It asks you to edit the From address, which you should do. (But it
> should place point on the From line instead of leaving it at the end of
> the buffer; I've now fixed this on the trunk.)
I should not have to do that each time. No.
> > This is a regression.
>
> Nope.
I believe it is. I don't see it in any earlier Emacs release.
> > What's more, after I edit that default From field to provide my email
> > address, it asks whether I want to save this. I answer yes, but it
> > makes no difference. Another M-x report-emacs-bug, at least in the
> > same session, shows that it still uses that default From text.
>
> It doesn't ask me that. Perhaps you're thinking of the next question
> you're getting -- which mail transport to use?
No. That's a separate question. That one I expect,
and that one I get also in earlier releases.
And after going through the whole thing once
(including answering whether I want to save the
updated email address), the next time in the same
session I don't get that do-you-want-to-save-it
question.
But even after saying I wanted to save it, I still
get, in the same session, the same old <my host>.
i-did-not-set--mail-host-address--so-tickle-me
address, and not the edited and saved address.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#43386: 27.1; Regression in `report-emacs-bug'
2020-09-13 23:56 ` Drew Adams
@ 2020-09-13 23:58 ` Lars Ingebrigtsen
2020-09-14 0:11 ` Drew Adams
0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-13 23:58 UTC (permalink / raw)
To: Drew Adams; +Cc: 43386
Drew Adams <drew.adams@oracle.com> writes:
>> > What's more, after I edit that default From field to provide my email
>> > address, it asks whether I want to save this. I answer yes, but it
>> > makes no difference. Another M-x report-emacs-bug, at least in the
>> > same session, shows that it still uses that default From text.
>>
>> It doesn't ask me that. Perhaps you're thinking of the next question
>> you're getting -- which mail transport to use?
>
> No. That's a separate question. That one I expect,
> and that one I get also in earlier releases.
>
> And after going through the whole thing once
> (including answering whether I want to save the
> updated email address), the next time in the same
> session I don't get that do-you-want-to-save-it
> question.
What is the question it asks you, exactly?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#43386: 27.1; Regression in `report-emacs-bug'
2020-09-13 23:58 ` Lars Ingebrigtsen
@ 2020-09-14 0:11 ` Drew Adams
2020-09-14 0:18 ` Lars Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2020-09-14 0:11 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 43386
> What is the question it asks you, exactly?
"Save this mail sending choice? (y or n)"
That's posed after I edit the address, try C-c C-c
again, and tell it I want to use "mail client".
It correctly pops up my mail client's (Outlook)
new mail window (where I can paste the bug report
text). But in Emacs I get that follow-up prompt
asking whether to save the mail sending choice.
I think when I filed the bug report I was
misremembering the question to be about saving
the email address instead of saving my choice of
"mail client".
In any case, in Emacs 26.3 (and prior), even
though the From has that crazy text, when I use
C-c C-c and tell Emacs to use my mail client,
the mail client window pops up perfectly, and
yes, my mail client knows what my email address
is. The buffer *sent mail to bug-gnu-emacs@gnu.org*
still has the crazy From text, but Emacs doesn't
bother me. C-c C-c and saying "mail client" is
sufficient. I'm not prevented from filling out
a mail message in my client and sending it.
Nothing annoying in Emacs 26.3 (or prior).
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#43386: 27.1; Regression in `report-emacs-bug'
2020-09-14 0:11 ` Drew Adams
@ 2020-09-14 0:18 ` Lars Ingebrigtsen
2020-09-14 0:29 ` Drew Adams
2020-09-14 14:58 ` Eli Zaretskii
0 siblings, 2 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-14 0:18 UTC (permalink / raw)
To: Drew Adams; +Cc: 43386
Drew Adams <drew.adams@oracle.com> writes:
>> What is the question it asks you, exactly?
>
> "Save this mail sending choice? (y or n)"
Yes, that's about saving the MTA setup, and has nothing to do with the
From address.
> In any case, in Emacs 26.3 (and prior), even
> though the From has that crazy text, when I use
> C-c C-c and tell Emacs to use my mail client,
> the mail client window pops up perfectly, and
> yes, my mail client knows what my email address
> is. The buffer *sent mail to bug-gnu-emacs@gnu.org*
> still has the crazy From text, but Emacs doesn't
> bother me.
Emacs now requires that the From address is valid, as you've
discovered. (Sending bug reports from an "emacs -Q" is a pretty strange
choice anyway, but that's up to you.)
Things seem to be working as designed, so I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#43386: 27.1; Regression in `report-emacs-bug'
2020-09-14 0:18 ` Lars Ingebrigtsen
@ 2020-09-14 0:29 ` Drew Adams
2020-09-14 14:58 ` Eli Zaretskii
1 sibling, 0 replies; 11+ messages in thread
From: Drew Adams @ 2020-09-14 0:29 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 43386
> >> What is the question it asks you, exactly?
> >
> > "Save this mail sending choice? (y or n)"
>
> Yes, that's about saving the MTA setup, and has nothing to do with the
> From address.
>
> > In any case, in Emacs 26.3 (and prior), even
> > though the From has that crazy text, when I use
> > C-c C-c and tell Emacs to use my mail client,
> > the mail client window pops up perfectly, and
> > yes, my mail client knows what my email address
> > is. The buffer *sent mail to bug-gnu-emacs@gnu.org*
> > still has the crazy From text, but Emacs doesn't
> > bother me.
>
> Emacs now requires that the From address is valid, as you've
> discovered. (Sending bug reports from an "emacs -Q" is a pretty strange
> choice anyway, but that's up to you.)
>
> Things seem to be working as designed, so I'm closing this bug report.
That makes no sense whatsoever.
IF a user says to use THE MAIL CLIENT then it's up
to the user to provide the From field TO THE MAIL
CLIENT. And typically the mail client will always
prefill that field correctly - the client knows the
user.
This is a ridiculous annoyance. My guess is that
whoever implemented this did not take into account
the use case of sending via THE MAIL CLIENT.
The mail client makes NO USE of the From field
from Emacs. (At least mine makes no use of it.)
Please DTRT, and fix this regression.
And yes, there are good reasons to sometimes submit
a bug report using emacs -Q. I don't usually do
that, but sometimes I do.
Emacs should certainly NOT assume that there's NO
reason for it to support sending a report from
emacs -Q. It's never done that, and it never should.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#43386: 27.1; Regression in `report-emacs-bug'
2020-09-14 0:18 ` Lars Ingebrigtsen
2020-09-14 0:29 ` Drew Adams
@ 2020-09-14 14:58 ` Eli Zaretskii
2020-09-14 16:15 ` Lars Ingebrigtsen
1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2020-09-14 14:58 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 43386
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 14 Sep 2020 02:18:23 +0200
> Cc: 43386@debbugs.gnu.org
>
> > In any case, in Emacs 26.3 (and prior), even
> > though the From has that crazy text, when I use
> > C-c C-c and tell Emacs to use my mail client,
> > the mail client window pops up perfectly, and
> > yes, my mail client knows what my email address
> > is. The buffer *sent mail to bug-gnu-emacs@gnu.org*
> > still has the crazy From text, but Emacs doesn't
> > bother me.
>
> Emacs now requires that the From address is valid, as you've
> discovered. (Sending bug reports from an "emacs -Q" is a pretty strange
> choice anyway, but that's up to you.)
>
> Things seem to be working as designed, so I'm closing this bug report.
I think Drew is right here: we have a bug on our hands.
Look at the code:
;; Query the user for the SMTP method, so that we can skip
;; questions about From header validity if the user is going to
;; use mailclient, anyway.
(when (or (and (derived-mode-p 'message-mode)
(eq message-send-mail-function 'sendmail-query-once))
(and (not (derived-mode-p 'message-mode))
(eq send-mail-function 'sendmail-query-once)))
(sendmail-query-user-about-smtp)
(when (derived-mode-p 'message-mode)
(setq message-send-mail-function (message-default-send-mail-function))))
(or report-emacs-bug-no-confirmation
;; mailclient.el does not need a valid From
(if (derived-mode-p 'message-mode)
(eq message-send-mail-function 'message-send-mail-with-mailclient)
(eq send-mail-function 'mailclient-send-it))
;; Not narrowing to the headers, but that's OK.
(let ((from (mail-fetch-field "From")))
(when (and (or (not from)
(message-bogus-recipient-p from)
;; This is the default user-mail-address. On
;; today's systems, it seems more likely to
;; be wrong than right, since most people
;; don't run their own mail server.
(string-match (format "\\<%s@%s\\>"
(regexp-quote (user-login-name))
(regexp-quote (system-name)))
from))
(not (yes-or-no-p
(format-message "Is `%s' really your email address? "
from))))
As you see, we _know_ that mailclient.el doesn't care about the faux
From address, and we have some logic to detect when this is the case.
But that logic doesn't work, because the conditions fail to match:
(when (or (and (derived-mode-p 'message-mode)
(eq message-send-mail-function 'sendmail-query-once))
(and (not (derived-mode-p 'message-mode))
(eq send-mail-function 'sendmail-query-once)))
(sendmail-query-user-about-smtp)
(when (derived-mode-p 'message-mode)
(setq message-send-mail-function (message-default-send-mail-function))))
The call to sendmail-query-user-about-smtp is the one that asks about
how to send, and allows to select mailclient. But the conditions to
call it are false, and the rest is history.
I think this breakage is somehow related to our attempt to clean up
the sendmail.el/message.el mess. So I suggest to look at how things
are supposed to work when message-mode is used by default, and see why
we miss the question about mailclient before asking about the From
address.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#43386: 27.1; Regression in `report-emacs-bug'
2020-09-14 14:58 ` Eli Zaretskii
@ 2020-09-14 16:15 ` Lars Ingebrigtsen
2020-09-15 13:28 ` Lars Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-14 16:15 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 43386
Eli Zaretskii <eliz@gnu.org> writes:
> The call to sendmail-query-user-about-smtp is the one that asks about
> how to send, and allows to select mailclient. But the conditions to
> call it are false, and the rest is history.
Yes, it's due to
commit 3a59cc84069376802ba8fd731b524d78db58262c
Author: Stefan Monnier <monnier@iro.umontreal.ca>
AuthorDate: Tue Jul 30 16:37:01 2019 -0400
* lisp/gnus/message.el: Reduce redundancy with send-mail-function
which changed the default of message-send-mail-function.
However, even with that fixed, the code there is misguided. emacsbug
queries for the method:
(when (or (and (derived-mode-p 'message-mode)
(eq message-send-mail-function 'sendmail-query-once))
(and (not (derived-mode-p 'message-mode))
(eq send-mail-function 'sendmail-query-once)))
(sendmail-query-user-about-smtp)
but doesn't do anything with it -- sendmail-query-user-about-smtp just
returns a function.
This is how that function is supposed to be used:
(defun sendmail-query-once ()
"Query for `send-mail-function' and send mail with it.
This also saves the value of `send-mail-function' via Customize."
;; If send-mail-function is already setup, we're incorrectly called
;; a second time, probably because someone's using an old value
;; of send-mail-function.
(if (not (eq send-mail-function #'sendmail-query-once))
(funcall send-mail-function)
(let ((function (sendmail-query-user-about-smtp)))
(funcall function)
(when (y-or-n-p "Save this mail sending choice?")
(setq send-mail-function function)
(customize-save-variable 'send-mail-function function)))))
Notice that we offer to set it -- after we've seen that the user can
send successfully, which we can't do from that hook.
So to make this work sensibly requires some refactoring of the code.
I'll have a look at it tomorrowish.
--
(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:[~2020-09-15 14:51 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-13 21:30 bug#43386: 27.1; Regression in `report-emacs-bug' Drew Adams
2020-09-13 23:22 ` Lars Ingebrigtsen
2020-09-13 23:56 ` Drew Adams
2020-09-13 23:58 ` Lars Ingebrigtsen
2020-09-14 0:11 ` Drew Adams
2020-09-14 0:18 ` Lars Ingebrigtsen
2020-09-14 0:29 ` Drew Adams
2020-09-14 14:58 ` Eli Zaretskii
2020-09-14 16:15 ` Lars Ingebrigtsen
2020-09-15 13:28 ` Lars Ingebrigtsen
2020-09-15 14:51 ` Eli Zaretskii
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).