[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: Setting mark in minibuffer prompt
From: |
Whitfield Diffie |
Subject: |
Fwd: Setting mark in minibuffer prompt |
Date: |
Sun, 8 Jul 2012 08:36:49 -0700 |
I haven't had any response to this message. Is this simply that
no one knew the answer or that I am sending it to the wrong place.
Would someone please acknowledge receipt?
Whit
---------- Forwarded message ----------
From: Whitfield Diffie <the.whitfield.diffie@gmail.com>
Date: Thu, May 17, 2012 at 8:25 AM
Subject: Setting mark in minibuffer prompt
To: help-gnu-emacs@gnu.org
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
- Fwd: Setting mark in minibuffer prompt,
Whitfield Diffie <=