GNU bug report logs - #43386
27.1; Regression in `report-emacs-bug'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 13 Sep 2020 21:31:02 UTC

Severity: normal

Tags: fixed, notabug

Found in version 27.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: drew.adams <at> oracle.com, 43386 <at> debbugs.gnu.org
Subject: bug#43386: 27.1; Regression in `report-emacs-bug'
Date: Mon, 14 Sep 2020 18:15:01 +0200
Eli Zaretskii <eliz <at> 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 <at> 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




This bug report was last modified 4 years and 301 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.