unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: Moving files from lisp/gnus/ to lisp/net/?
Date: Mon, 25 Oct 2004 16:13:56 +0200	[thread overview]
Message-ID: <ilulldunavv.fsf@latte.josefsson.org> (raw)
In-Reply-To: E1CM4ey-00051Y-WB@fencepost.gnu.org

Richard Stallman <rms@gnu.org> writes:

> I would think that the current definition of read-passwd fits the
> first criterion but not the second.  The new definition, depending on
> password.el, I think doesn't fit either one; it may as well be
> autoloaded from the new file.

I agree, thanks for explaining.  I have installed an updated node on
the password cache interface, in lispref/minibuf.texi.  Complete text
below.  I'm not a native speaker, so please review and improve it.

20.9 Reading a Password
=======================

To read a password to pass to another program, you can use the function
`read-passwd'.

   Passwords are sometimes needed several times throughout an Emacs
session.  Then it can be useful to avoid having to ask for a password
more than once.  Passwords are entered into the password cache using
the function `password-cache-add'.  To read a password, possibly
retrieving the password from the cache without querying the user, you
can use the function `password-read'.  The two calls can be combined
into the function `password-read-and-add' that read a password and
store it in the cache.

   Typically users do not use the same password for all services.  The
password cache mechanism use a `key' string to differentiate among the
passwords.  The `key' string is typically a fixed string chosen to be
related to what the password is used for.  For example, a password used
when connecting to a IMAP mail server called `mail.example.org', could
use a `key' string of `imap:mail.example.org'.  You can use any string,
as long as it is reasonably unique.

   Passwords in the cache typically expire after a while (controlled by
the variable `password-cache-expiry'), but you can force removal of a
password using the function `password-cache-remove'.  This is useful
when there is a problem with the password, to avoid using the same
incorrect password from the cache in the future.

 -- Function: read-passwd prompt &optional confirm default
     This function reads a password, prompting with PROMPT.  It does
     not echo the password as the user types it; instead, it echoes `.'
     for each character in the password.

     The optional argument CONFIRM, if non-`nil', says to read the
     password twice and insist it must be the same both times.  If it
     isn't the same, the user has to type it over and over until the
     last two times match.

     The optional argument DEFAULT specifies the default password to
     return if the user enters empty input.  If DEFAULT is `nil', then
     `read-passwd' returns the null string in that case.

 -- Function: password-read prompt key
     Read a password from the user, using `read-passwd', prompting with
     PROMPT.  If a password has been stored in the password cache,
     using `password-cache-add' on the same KEY, it is returned
     directly, without querying the user.

 -- Function: password-cache-add key password
     Add a password to the password cache, indexed under the given KEY.
     The password is later retrieved using `password-read' called with
     the same KEY.

 -- Function: password-cache-remove key
     Remove a password from the cache, indexed under the given KEY.

 -- Function: password-read-and-add prompt &optional key
     Read a password, prompting with PROMPT, and possibly add it to the
     cache, indexed using the KEY string.  This is one-call interface
     to `password-read' and `password-cache-add'.

 -- Variable: password-cache-expiry
     This variable specify for how many seconds passwords are retained
     in the password cache before they are expired.  For high security,
     use a low value (below a minute).  For more lax security, use a
     setting of `14400' corresponding to half a work day (4 hours).

 -- Variable: password-cache
     This variable toggle whether or not the password cache is used at
     all.  The default is non-`nil', i.e., to use the cache.

  reply	other threads:[~2004-10-25 14:13 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15 19:26 Moving files from lisp/gnus/ to lisp/net/? Simon Josefsson
2004-10-15 19:37 ` Simon Josefsson
2004-10-15 23:27   ` Miles Bader
2004-10-16  2:08     ` Ted Zlatanov
2004-10-16 13:52   ` Richard Stallman
2004-10-17 13:45     ` Simon Josefsson
2004-10-18 13:58       ` Richard Stallman
2004-10-24 12:24         ` Simon Josefsson
2004-10-25 13:13           ` Richard Stallman
2004-10-25 14:13             ` Simon Josefsson [this message]
2004-10-27 10:47               ` Richard Stallman
2004-10-27 19:08                 ` Simon Josefsson
2004-10-29  4:32                   ` Richard Stallman
2004-10-29 21:25                     ` Simon Josefsson
2004-11-01 20:09                       ` Ted Zlatanov
2004-11-01 20:31                         ` Simon Josefsson
2004-11-02 18:30                           ` Ted Zlatanov
2004-11-02 21:15                             ` Stefan Monnier
2007-11-02 15:02               ` Richard Stallman
2007-11-05 10:16                 ` Simon Josefsson
2007-11-06  8:38                   ` Richard Stallman
2007-11-06 14:01                     ` Daiki Ueno
2007-11-07  7:55                       ` Richard Stallman
2007-11-08  0:46                         ` Daiki Ueno
2007-11-08 17:40                           ` Richard Stallman
     [not found]                             ` <54a15d860711081633k364caf30r3b75464be8a060fa@mail.gmail.com>
2007-11-09 13:40                               ` Fwd: " Daiki Ueno
     [not found]                               ` <E1IqbtM-0003DR-P8@fencepost.gnu.org>
2007-11-10  4:53                                 ` Daiki Ueno
2007-11-10  7:07                                   ` Daiki Ueno
2007-11-10 20:03                                     ` Stefan Monnier
2007-11-11  0:04                                       ` Daiki Ueno
2007-11-11 19:33                                         ` Richard Stallman
2007-11-12  8:54                                           ` Daiki Ueno
2007-11-13  5:10                                             ` Richard Stallman
2007-11-14  3:45                                               ` Daiki Ueno
2007-11-14  5:44                                                 ` Michael Albinus
2007-11-14 14:54                                                   ` Stefan Monnier
2007-11-14 15:13                                                     ` Michael Albinus
2007-11-14 17:30                                                       ` Stefan Monnier
2007-11-15  3:08                                                     ` Richard Stallman
2007-11-15  3:47                                                       ` Stefan Monnier
2007-11-16  4:28                                                         ` Richard Stallman
2007-11-15  0:23                                                 ` Miles Bader
2007-11-15  3:08                                                 ` Richard Stallman
2007-11-11  5:22                                     ` Richard Stallman
2007-11-10 19:53                   ` Tom Tromey
2004-10-15 20:05 ` Miles Bader
2004-10-15 21:15   ` Simon Josefsson
2004-10-16  7:43     ` Thien-Thi Nguyen
2004-10-16 13:44       ` Miles Bader
2004-10-15 20:44 ` Stefan Monnier
2004-10-15 21:06   ` Simon Josefsson
2004-10-15 21:32   ` Lars Magne Ingebrigtsen
2004-10-15 21:47     ` Simon Josefsson
2004-10-15 21:52     ` Stefan Monnier
2004-10-18  1:04     ` Miles Bader
2004-10-18 13:59       ` Richard Stallman
2004-10-20 10:27       ` Lars Magne Ingebrigtsen
2004-10-20 10:50         ` Miles Bader
2004-10-20 11:22           ` Ralf Angeli
2004-10-20 11:39             ` Ralf Angeli
2004-10-21  1:09             ` Miles Bader
2004-10-20 11:32           ` Lars Magne Ingebrigtsen
2004-10-20 11:56             ` Karl Fogel
2004-10-20 12:38               ` David Kastrup
2004-10-20 13:06                 ` Stefan Monnier
2004-10-20 12:34             ` David Kastrup
2004-10-21  1:28             ` Miles Bader
2004-10-21  5:03               ` Lars Magne Ingebrigtsen
2004-10-21  5:49                 ` Miles Bader
2004-10-21 10:05                 ` Kim F. Storm
2004-10-23  7:48                   ` Lars Magne Ingebrigtsen
2004-10-25  1:02                     ` Miles Bader
2004-10-25 10:14                       ` Simon Josefsson
2004-10-25 17:46                         ` Lars Magne Ingebrigtsen
2004-10-25 22:41                           ` Miles Bader
2004-10-27 17:21                             ` Lars Magne Ingebrigtsen
2004-10-28  2:21                               ` Miles Bader
2004-10-26  7:28                           ` Kai Grossjohann
2004-10-27 17:21                             ` Lars Magne Ingebrigtsen
2004-10-16 13:52 ` Richard Stallman
2004-10-18 17:54   ` Ted Zlatanov
2004-10-18 21:36     ` Reiner Steib
2004-10-21 18:45       ` Ted Zlatanov
2004-10-22  0:25         ` Miles Bader
2004-10-24 12:13           ` Simon Josefsson
2004-10-24 12:20             ` Miles Bader
2004-10-24 13:41               ` Simon Josefsson
2004-10-24 22:18                 ` Stefan
2004-10-25 10:08                   ` Simon Josefsson
2004-10-25 11:55                     ` Stefan
2004-10-25 13:07                       ` Simon Josefsson
2004-10-26  9:05                     ` Richard Stallman
2004-10-26  9:26                       ` Simon Josefsson
2004-10-19 16:45     ` Richard Stallman
2004-10-21 18:45       ` Ted Zlatanov
2004-10-23  4:49         ` Richard Stallman
2004-10-24 12:59   ` Simon Josefsson
2004-10-24 13:05   ` Move sha1.el and hex-util.el from lisp/gnus/ to lisp/net/ (was: Re: Moving files from lisp/gnus/ to lisp/net/?) Simon Josefsson
2004-10-25 13:13     ` Richard Stallman
2004-10-25 14:23       ` Move sha1.el and hex-util.el from lisp/gnus/ to lisp/net/ Simon Josefsson

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=ilulldunavv.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    /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).