From: npostavs@users.sourceforge.net
To: hackerb9@member.fsf.org
Cc: 25874@debbugs.gnu.org
Subject: bug#25874: 24.4; sendmail-query-user-about-smtp allows nil function
Date: Sun, 26 Feb 2017 22:26:11 -0500 [thread overview]
Message-ID: <87d1e4e2lo.fsf@users.sourceforge.net> (raw)
In-Reply-To: <CAO+cPoOsdQUOEwWfALWejTYCFoQHFzCfXWCd81mNySrP7RRBCw@mail.gmail.com> (hackerb9@member.fsf.org's message of "Sat, 25 Feb 2017 10:20:42 -0800")
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
tags 25874 patch
quit
hackerb9@member.fsf.org writes:
> 3. Emacs will prompt "Send mail via: "
>
> (This is sendmail.el:sendmail-query-user-about-smtp asking how you
> would like to send mail. Valid responses are: "mail client",
> "transport", or "smtp")
>
> 4. Hit the Enter key, assuming Emacs will pick a reasonable default
>
> 5. Be surprised when you get a mysterious error message:
How about making Emacs give a reasonable default then:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1116 bytes --]
From 449169796a4a14abc4ff34aa78c5308b53ee20a3 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 26 Feb 2017 22:17:28 -0500
Subject: [PATCH v1] Set default when asking for send-mail-function
(Bug#25874).
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp): Pass first
option as default for `completing-read'.
---
lisp/mail/sendmail.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 70c8ea1f93..42b688fbab 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -555,8 +555,9 @@ sendmail-query-user-about-smtp
(goto-char (point-min))
(display-buffer (current-buffer))
(let ((completion-ignore-case t))
- (completing-read "Send mail via: "
- options nil 'require-match)))))
+ (completing-read
+ (format "Send mail via (default %s): " (caar options))
+ options nil 'require-match nil nil (car options))))))
(customize-save-variable 'send-mail-function
(cdr (assoc-string choice options t)))))
\f
--
2.11.1
next prev parent reply other threads:[~2017-02-27 3:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-25 18:20 bug#25874: 24.4; sendmail-query-user-about-smtp allows nil function hackerb9
2017-02-27 3:26 ` npostavs [this message]
2017-03-07 4:11 ` npostavs
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1e4e2lo.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=25874@debbugs.gnu.org \
--cc=hackerb9@member.fsf.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 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).