From: Whitfield Diffie <the.whitfield.diffie@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Setting mark in minibuffer prompt
Date: Sun, 8 Jul 2012 10:54:14 -0700 [thread overview]
Message-ID: <CAOgUEJ+Shq8iJo9NBBk9owt6QX5CyXuOYd4vQu8=tpYtxkUCvw@mail.gmail.com> (raw)
In-Reply-To: <7A0C0DE9B626433FB3A172ACCC2E10E9@us.oracle.com>
[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]
> IIUC, you want point to remain after the inserted `default-directory', and you
> want mark at some position to the left of that. ...
You did understand correctly and the code you sent seems to solve
the problem. The essential point I didn't understand was the need to
use the minibuffer-setup-hook. Many thanks.
Virtue being its own punishment, I am enclosing a related question
I asked almost exactly two years ago in case the answer is equally
simple
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?
I realize it is not obvious what use this would be. Don't trust
me; I have something up my sleeve.
Many thanks,
Whit
I have attached the code I wrote to do this but I am not happy
with the technique because I had to insert the cursor ``by hand.''
Unfortunately what is attached is rather long because it is not an
example; it implements a line editor.
Very gratefully,
Whit
[-- Attachment #2: read-keyphrase.el --]
[-- Type: application/octet-stream, Size: 5861 bytes --]
next prev parent reply other threads:[~2012-07-08 17:54 UTC|newest]
Thread overview: 12+ 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 [this message]
2012-07-08 18:07 ` how to customize `read-passwd' [was: Setting mark in minibuffer prompt] Drew Adams
2012-07-11 4:44 ` Whitfield Diffie
[not found] <mailman.1294.1337271903.855.help-gnu-emacs@gnu.org>
2012-05-18 10:57 ` Setting mark in minibuffer prompt José A. Romero L.
2012-05-18 20:12 ` Stefan Monnier
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='CAOgUEJ+Shq8iJo9NBBk9owt6QX5CyXuOYd4vQu8=tpYtxkUCvw@mail.gmail.com' \
--to=the.whitfield.diffie@gmail.com \
--cc=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.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.
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).