From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63816: 29.0.91; Don't prompt to save `send-mail-function' if in `emacs -q' Date: Sat, 03 Jun 2023 11:24:05 +0300 Message-ID: <835y859cnu.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36934"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63816@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 03 10:24:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q5MYh-0009Jo-5X for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Jun 2023 10:24:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5MYN-0005SC-4B; Sat, 03 Jun 2023 04:24:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5MYM-0005S4-Er for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 04:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q5MYM-0002tU-6p for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 04:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5MYM-0005sC-2W for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 04:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2023 08:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63816 X-GNU-PR-Package: emacs Original-Received: via spool by 63816-submit@debbugs.gnu.org id=B63816.168578060322532 (code B ref 63816); Sat, 03 Jun 2023 08:24:02 +0000 Original-Received: (at 63816) by debbugs.gnu.org; 3 Jun 2023 08:23:23 +0000 Original-Received: from localhost ([127.0.0.1]:41501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5MXj-0005rM-G7 for submit@debbugs.gnu.org; Sat, 03 Jun 2023 04:23:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5MXg-0005r8-Lx for 63816@debbugs.gnu.org; Sat, 03 Jun 2023 04:23:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5MXb-0002ka-49; Sat, 03 Jun 2023 04:23:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9UTvxyghlqLR2NG6wKVncLECkCRq+qznjUwWAo0OmIE=; b=Z9TXIUKwoAYe q4hqnjcONa90MGTOEmid7htJu6w85NySFbrO99E5/S4VnNpr14vuExDfXTQt6VsSIY9EObLFVQLYP Ct+lUyFg8LPZOsYGy9YFek8hZSI4n6QiqDXPokSTuYcgX5IYP3LmJZaG6J/B//2Gi5Ti9+GryVqcS IZBPlBLcj4xT2gAtQRPS/EdPoUMkF8yRAa/7BP8Luj7e2+MJ+CCryDYHNDOBfMhXAmwgu61J3Dbvs 27QqMVP3JgWBqqJZU5ZJS7vtaf4qhikAp6d8KlRPOlNqZhf4ZIhXrVKe4OBpZrVg6tJ+bVBcgTwa/ MVy3Ygo/wfZ/KGtCD/N4+Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5MXa-0007TZ-L4; Sat, 03 Jun 2023 04:23:14 -0400 In-Reply-To: (message from Drew Adams on Wed, 31 May 2023 20:05:54 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262808 Archived-At: > From: Drew Adams > 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)