From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Whitfield Diffie Newsgroups: gmane.emacs.help Subject: Fwd: Setting mark in minibuffer prompt Date: Sun, 8 Jul 2012 08:36:49 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1341761824 31934 80.91.229.3 (8 Jul 2012 15:37:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 8 Jul 2012 15:37:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 08 17:37:04 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 1SntXh-0002zn-1I for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jul 2012 17:37:01 +0200 Original-Received: from localhost ([::1]:58484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SntXg-0004nv-25 for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jul 2012 11:37:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SntXa-0004nq-Eo for help-gnu-emacs@gnu.org; Sun, 08 Jul 2012 11:36:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SntXY-0003yc-RB for help-gnu-emacs@gnu.org; Sun, 08 Jul 2012 11:36:54 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:57009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SntXY-0003yQ-KW for help-gnu-emacs@gnu.org; Sun, 08 Jul 2012 11:36:52 -0400 Original-Received: by obhx4 with SMTP id x4so16550406obh.0 for ; Sun, 08 Jul 2012 08:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=DCkLhXa/4RXoOvw9LwnzB7d8yN3kK9zYAzYoT+n89ZI=; b=ffMtVzI+qjLShMrpMkf6ItdXhPFThWI0fdQMQVDsDe6usX6Flg/GSiL1+08y+jCy9S GytRHcvNDKFmT0CEFXY6xeVYBLtkklooTrIJ+ZyxP+UuRdKTDfZBxHEr3rUIkMzctzcX XG5jVB1ytd7PRyZWEhsgs0kvX1z0Ri7HpupxjeaePBRw3SjoHd1UZQ5tEoUZWHe5odUj cEZ2cSusWOLaPiq355YEFo+WmUe2rmhcHdOZqJnwtc/jQNOVw2T/fpZLhjxIbUeHvWVu BqT0Y5V6dPUIa6lWGKNJ1RMbkLtprj9P69ViG3N40ty0HoYTflQhwL5YQPNfavbDoak1 Zygw== Original-Received: by 10.60.10.99 with SMTP id h3mr38581341oeb.72.1341761809742; Sun, 08 Jul 2012 08:36:49 -0700 (PDT) Original-Received: by 10.182.43.40 with HTTP; Sun, 8 Jul 2012 08:36:49 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.169 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:85726 Archived-At: 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 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 I get today's notes directory but if I type , 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 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