[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117312: Warn about read-passwd in batch mode
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs-24 r117312: Warn about read-passwd in batch mode |
Date: |
Thu, 26 Jun 2014 19:00:48 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117312
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17839
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-06-26 15:00:42 -0400
message:
Warn about read-passwd in batch mode
* doc/lispref/minibuf.texi (Intro to Minibuffers): Batch mode is basic.
(Reading a Password): Mention batch mode.
* lisp/subr.el (read-passwd): Warn about batch mode.
modified:
doc/lispref/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6155
doc/lispref/minibuf.texi
minibuf.texi-20091113204419-o5vbwnq5f7feedwu-6199
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/subr.el subr.el-20091113204419-o5vbwnq5f7feedwu-151
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2014-06-21 08:17:29 +0000
+++ b/doc/lispref/ChangeLog 2014-06-26 19:00:42 +0000
@@ -1,3 +1,8 @@
+2014-06-26 Glenn Morris <address@hidden>
+
+ * minibuf.texi (Intro to Minibuffers): Batch mode is basic.
+ (Reading a Password): Mention batch mode. (Bug#17839)
+
2014-06-21 Eli Zaretskii <address@hidden>
* positions.texi (Screen Lines): Clarify how columns are counted
=== modified file 'doc/lispref/minibuf.texi'
--- a/doc/lispref/minibuf.texi 2014-03-18 01:19:03 +0000
+++ b/doc/lispref/minibuf.texi 2014-06-26 19:00:42 +0000
@@ -101,7 +101,9 @@
When Emacs is running in batch mode, any request to read from the
minibuffer actually reads a line from the standard input descriptor that
-was supplied when Emacs was started.
+was supplied when Emacs was started. This supports only basic input:
+none of the special minibuffer features (history, completion,
+password hiding, etc.) are available in batch mode.
@node Text from Minibuffer
@section Reading Text Strings with the Minibuffer
@@ -2123,7 +2125,8 @@
@defun read-passwd prompt &optional confirm default
This function reads a password, prompting with @var{prompt}. It does
not echo the password as the user types it; instead, it echoes @samp{.}
-for each character in the password.
+for each character in the password. (Note that in batch mode, the
+input is not hidden.)
The optional argument @var{confirm}, if address@hidden, says to read the
password twice and insist it must be the same both times. If it isn't
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-06-26 13:47:37 +0000
+++ b/lisp/ChangeLog 2014-06-26 19:00:42 +0000
@@ -1,3 +1,7 @@
+2014-06-26 Glenn Morris <address@hidden>
+
+ * subr.el (read-passwd): Warn about batch mode. (Bug#17839)
+
2014-06-26 Daiki Ueno <address@hidden>
* emacs-lisp/package.el (package--check-signature):
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2014-06-14 16:37:15 +0000
+++ b/lisp/subr.el 2014-06-26 19:00:42 +0000
@@ -2006,6 +2006,7 @@
Optional DEFAULT is a default password to use instead of empty input.
This function echoes `.' for each character that the user types.
+Note that in batch mode, the input is not hidden!
Once the caller uses the password, it can erase the password
by doing (clear-string STRING)."
@@ -2045,7 +2046,11 @@
(add-hook 'after-change-functions hide-chars-fun nil 'local))
(unwind-protect
(let ((enable-recursive-minibuffers t))
- (read-string prompt nil t default)) ; t = "no history"
+ (read-string
+ (if noninteractive
+ (format "%s[INPUT WILL NOT BE HIDDEN!] " prompt) ; bug#17839
+ prompt)
+ nil t default)) ; t = "no history"
(when (buffer-live-p minibuf)
(with-current-buffer minibuf
;; Not sure why but it seems that there might be cases where the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117312: Warn about read-passwd in batch mode,
Glenn Morris <=