[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting mark in minibuffer prompt

From: Stefan Monnier
Subject: Re: Setting mark in minibuffer prompt
Date: Fri, 18 May 2012 16:12:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

>     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

You could wrap the call to read-file-name in something like:

      (lambda ()
    (read-file-name ...))

Also, instead of placing the mark, you could place point where you say
mark should go, using the same minibuffer-with-setup-hook trick as above.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]