GNU bug report logs -
#63816
29.0.91; Don't prompt to save `send-mail-function' if in `emacs -q'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Wed, 31 May 2023 20:10:01 UTC
Severity: normal
Found in version 29.0.91
Fixed in version 29.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 63816 <at> debbugs.gnu.org (full text, mbox):
> From: Drew Adams <drew.adams <at> oracle.com>
> Date: Wed, 31 May 2023 20:05:54 +0000
>
> emacs -Q
> M-x report-emacs-bug
> Write a bug report, then `C-c C-c'.
> Confirm sending a report.
> Hit `RET' to accept `mail client' as the send method.
>
> You're prompted to save that choice:
>
> Save this mail sending choice? (y or n) y
>
> This prompt makes no sense. You anyway get this error message:
>
> Setting 'send-mail-function' temporarily since "emacs -q" would
> overwrite customizations
Can you try the patch below and see if solves this?
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index f686c04..f88f69d 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -455,12 +455,14 @@ report-emacs-bug-hook
(setq send-mail-function (sendmail-query-user-about-smtp))
(when (derived-mode-p 'message-mode)
(setq message-send-mail-function (message-default-send-mail-function))
- (add-hook 'message-sent-hook
- (lambda ()
- (when (y-or-n-p "Save this mail sending choice?")
- (customize-save-variable 'send-mail-function
- send-mail-function)))
- nil t)))
+ (unless (or (null user-init-file)
+ (and (null custom-file) init-file-had-error))
+ (add-hook 'message-sent-hook
+ (lambda ()
+ (when (y-or-n-p "Save this mail sending choice?")
+ (customize-save-variable 'send-mail-function
+ send-mail-function)))
+ nil t))))
(or report-emacs-bug-no-confirmation
;; mailclient.el does not need a valid From
(eq send-mail-function 'mailclient-send-it)
This bug report was last modified 1 year and 340 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.