From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: how to customize `read-passwd' [was: Setting mark in minibuffer prompt] Date: Sun, 8 Jul 2012 11:07:05 -0700 Message-ID: <56703336BFC44E70AEFE1A16FB0DD7F0@us.oracle.com> References: <7A0C0DE9B626433FB3A172ACCC2E10E9@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341770855 30883 80.91.229.3 (8 Jul 2012 18:07:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 8 Jul 2012 18:07:35 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "'Whitfield Diffie'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 08 20:07:34 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SnvtO-0000TM-1F for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jul 2012 20:07:34 +0200 Original-Received: from localhost ([::1]:60105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnvtM-00014S-Pa for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jul 2012 14:07:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnvtG-00013k-L8 for help-gnu-emacs@gnu.org; Sun, 08 Jul 2012 14:07:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnvtE-00035v-VU for help-gnu-emacs@gnu.org; Sun, 08 Jul 2012 14:07:26 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:33936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnvtE-00035d-OW for help-gnu-emacs@gnu.org; Sun, 08 Jul 2012 14:07:24 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q68I7IDB018451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 8 Jul 2012 18:07:19 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q68I7IAN009299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Jul 2012 18:07:18 GMT Original-Received: from abhmt102.oracle.com (abhmt102.oracle.com [141.146.116.54]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q68I7Hih009741; Sun, 8 Jul 2012 13:07:17 -0500 Original-Received: from dradamslap1 (/10.159.186.64) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 08 Jul 2012 11:07:17 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac1dMrDTpAMWkpvRROa6ENH1RXmu0AAAN2/g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85733 Archived-At: > 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 > , , , etc. If I type (read-passwd "Prompt: ") > the only characters that are not merely absorbed into the string are > 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.