all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Setting mark in minibuffer prompt
@ 2012-05-17 15:25 Whitfield Diffie
  2012-07-08 15:36 ` Fwd: " Whitfield Diffie
  0 siblings, 1 reply; 12+ messages in thread
From: Whitfield Diffie @ 2012-05-17 15:25 UTC (permalink / raw)
  To: help-gnu-emacs

    I am trying to write an interactive function that prompts for a
filename, placing point at the end of the prompt and mark somewhere
earlier in the path.  For example, I would like to be prompted:

        ~/notes-directory/2012.05.17/
                                      ^                  ^
                                      |                   |
                                 mark             point

so that if I type a <cr> I get today's notes directory but if I type
<c-x><c-x><c-k><cr>, I get the overall notes directory.

    It is certainly possible to get to this state by hand.  From
today's notes directory, I can type <c-x><c-f> and get the prompt

        Find file: ~/notes-directory/2012.05.17/

if I now move the cursor back to just before 2012, set the mark and
move the cursor to the end of the line, I am in the right state.

    I can also manage to set the arguments to read-file-name in such a
way that the point is somewhere in the middle of the prompt but what I
want is to have the point at the end and the mark in the middle.


    I hope I am writing to the right place.  I have received some
wonderful help on some occasions in the past and silence on others.

                          Many thanks,

                                                Whit



^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <mailman.1294.1337271903.855.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2012-07-11  4:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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       ` 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

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.