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: Setting mark in minibuffer prompt Date: Thu, 17 May 2012 08:25:30 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1337271912 21667 80.91.229.3 (17 May 2012 16:25:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 May 2012 16:25:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 17 18:25:11 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 1SV3Vi-0004Bg-RU for geh-help-gnu-emacs@m.gmane.org; Thu, 17 May 2012 18:25:06 +0200 Original-Received: from localhost ([::1]:55344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SV3Vi-0001pz-7r for geh-help-gnu-emacs@m.gmane.org; Thu, 17 May 2012 12:25:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SV2ac-0007ZU-KB for help-gnu-emacs@gnu.org; Thu, 17 May 2012 11:26:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SV2aZ-000208-RY for help-gnu-emacs@gnu.org; Thu, 17 May 2012 11:26:06 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:64823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SV2aZ-0001hp-KE for help-gnu-emacs@gnu.org; Thu, 17 May 2012 11:26:03 -0400 Original-Received: by obbwd18 with SMTP id wd18so3361083obb.0 for ; Thu, 17 May 2012 08:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Xo2c1Pns+F++g08t8AnI+dM5Jxf6D7/2ZmUkdQlSTIw=; b=ZuQ6D9y9i7QJFwssgNqyYr1oDDl34rrIITu17d6oQrM95SqYLnTKT7c4XG6HVNzfjr fz2SpGxTUCAiegJi5OTVYX4SiUtN68bdEJ4GhEM5CG3vcwUiC+KN4D0hhQ4pezNGhcwe rXiAoRsjSObgqpcoDO5uFUXEQgiYLEK77g9owXg9m477F5V+mOw66Y8AdBBEdIuWcqcv Qw69hyG/4ruWSJdXn54nd2Kdh3yM7BG7Ny2TqetSBV+1GUyAQMFY3hYYxaw0F79+6TG1 KHzr8iaVAd90x/+FZFpvs9w0D3SuB77TJH32fEqSYPz4cv0JqMRszoNIRbB/ct6yyizm wFtw== Original-Received: by 10.182.167.40 with SMTP id zl8mr7007610obb.39.1337268330983; Thu, 17 May 2012 08:25:30 -0700 (PDT) Original-Received: by 10.182.16.233 with HTTP; Thu, 17 May 2012 08:25:30 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.169 X-Mailman-Approved-At: Thu, 17 May 2012 12:25:01 -0400 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:84863 Archived-At: 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