From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 43386@debbugs.gnu.org
Subject: bug#43386: 27.1; Regression in `report-emacs-bug'
Date: Mon, 14 Sep 2020 18:15:01 +0200 [thread overview]
Message-ID: <87y2lcs5bu.fsf@gnus.org> (raw)
In-Reply-To: <831rj4be24.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 14 Sep 2020 17:58:27 +0300")
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
next prev parent reply other threads:[~2020-09-14 16:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-09-15 13:28 ` Lars Ingebrigtsen
2020-09-15 14:51 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2lcs5bu.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=43386@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.