all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Whitfield Diffie'" <the.whitfield.diffie@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: how to customize `read-passwd' [was: Setting mark in minibuffer prompt]
Date: Sun, 8 Jul 2012 11:07:05 -0700	[thread overview]
Message-ID: <56703336BFC44E70AEFE1A16FB0DD7F0@us.oracle.com> (raw)
In-Reply-To: <CAOgUEJ+Shq8iJo9NBBk9owt6QX5CyXuOYd4vQu8=tpYtxkUCvw@mail.gmail.com>

> I am enclosing a related question I asked almost exactly
> two years ago in case the answer is equally simple

Please, in general, start a new thread for a new question.

> If I type (read-string "Prompt: ") I can line edit the typein with
> <crtl-a>, <ctrl-b>, <ctrl-k>, etc.  If I type (read-passwd "Prompt: ")
> the only characters that are not merely absorbed into the string are
> <ctrl-u> and either of the delete-backwards characters.

> Does anyone know how to get the cursor to come out in the
> right place as I back up down the row of dots that
> read-passwd echoes?

What I advise is to look at the code defining `read-passwd', and define your
function similarly.

What you see there is that `read-key' is called and each key that is read is
handled with a case analysis.  What you want is to add another case (or cases).
See how that code currently handles special lists of keys: `stop-keys' and
`rubout-keys'.  More pertinent perhaps is the treatment of `C-y'.

HTH.




  reply	other threads:[~2012-07-08 18:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17 15:25 Setting mark in minibuffer prompt Whitfield Diffie
2012-07-08 15:36 ` Fwd: " Whitfield Diffie
2012-07-08 16:15   ` Laurent Hoeltgen
2012-07-08 16:22   ` Thien-Thi Nguyen
2012-07-08 17:18     ` Whitfield Diffie
2012-07-08 20:21       ` Thien-Thi Nguyen
2012-07-08 17:06   ` Drew Adams
2012-07-08 17:54     ` Whitfield Diffie
2012-07-08 18:07       ` Drew Adams [this message]
2012-07-11  4:44         ` how to customize `read-passwd' [was: Setting mark in minibuffer prompt] Whitfield Diffie

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56703336BFC44E70AEFE1A16FB0DD7F0@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=the.whitfield.diffie@gmail.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.