From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: Selecting default prompt text Date: Thu, 12 Feb 2009 18:48:21 +0100 Message-ID: <499460e6.111f5e0a.3281.ffffa993@mx.google.com> References: <1234441717.125678@arno.fh-trier.de> <00fb01c98d38$1f604e60$c2b22382@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1234460944 11770 80.91.229.12 (12 Feb 2009 17:49:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Feb 2009 17:49:04 +0000 (UTC) Cc: 'Richard Riley' , help-gnu-emacs@gnu.org To: "Drew Adams" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 12 18:50:19 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LXfhT-0006gs-RW for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Feb 2009 18:50:12 +0100 Original-Received: from localhost ([127.0.0.1]:52499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LXfg9-0008Dz-Uw for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Feb 2009 12:48:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LXffm-0008DY-U3 for help-gnu-emacs@gnu.org; Thu, 12 Feb 2009 12:48:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LXffm-0008DL-H2 for help-gnu-emacs@gnu.org; Thu, 12 Feb 2009 12:48:26 -0500 Original-Received: from [199.232.76.173] (port=48047 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LXffm-0008DH-BQ for help-gnu-emacs@gnu.org; Thu, 12 Feb 2009 12:48:26 -0500 Original-Received: from mail-bw0-f160.google.com ([209.85.218.160]:38523) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LXffl-0004Bh-NY for help-gnu-emacs@gnu.org; Thu, 12 Feb 2009 12:48:26 -0500 Original-Received: by bwz4 with SMTP id 4so1556194bwz.18 for ; Thu, 12 Feb 2009 09:48:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:cc:subject :references:date:in-reply-to:user-agent:mime-version:content-type; bh=xdtQUoa65WPmG3p4oOzXXDzbTxjtqMizm0vJ2FXB/Pg=; b=CiOtBl8NpKYS1zXQdREOBCA4e0M+kyuN1r6R7eUPhaWqhD7QYg1Y0zsatGy31zv0TE FvWZp9qUZMz6WZyJGcoMM2kIjmyRlNnQ9IYPJ6FKyD28EVGHxU+V+sxGRa3a9LuEc6KK TmmB3Du4JQgFAMriuWdUFXTsoYtDcM8yx6uWU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:from:to:cc:subject:references:date:in-reply-to :user-agent:mime-version:content-type; b=eKMnGzW/OpmVYUOnexyNAxJ+8lFDWf+Ed5uR+QCa0BwdNHRNVJMJsyECvOENdqJ5Tm DtGE+5v6u32DJL/EiIuqFmT6EG/BuZt/c7WZyZj5usul855AAYzcscctcoj+i1lqZlWa iSjoY5UmDw+T0Wb9DUMl5bIT6aP2+dXambcBA= Original-Received: by 10.223.113.68 with SMTP id z4mr892179fap.72.1234460903156; Thu, 12 Feb 2009 09:48:23 -0800 (PST) Original-Received: from localhost (e179193217.adsl.alicedsl.de [85.179.193.217]) by mx.google.com with ESMTPS id e17sm483998fke.28.2009.02.12.09.48.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 12 Feb 2009 09:48:22 -0800 (PST) In-Reply-To: <00fb01c98d38$1f604e60$c2b22382@us.oracle.com> (Drew Adams's message of "Thu, 12 Feb 2009 09:34:11 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62087 Archived-At: "Drew Adams" writes: >> > Something like this ? >> > >> > (defun minibuffer-select-inital-input () >> > (let ((start (next-single-char-property-change 1 'read-only))) >> > (when (< start (point-max)) >> > (set-mark start) (setq mark-active t)))) >> > >> > (add-hook 'minibuffer-setup-hook 'minibuffer-select-inital-input) >> > (read-string "> " "Hallo") >> > >> > -ap >> >> Yes, thanks. But I released I was hoping for too much here since >> region/mark etc works so many different ways depending on settings. As >> "dim" in the #emacs said, probably best to rely on C-a C-k. >> e.g With my setting hitting right arrow there results in >> "end of buffer" error. > > 1. I was going to suggest something like what ap said. > > That seems to respond to your request, so I'm not sure what you meant above - in > particular about using the right arrow. If point is at the end of the input (end > of buffer), then why would you hit the right arrow? What would you like the > right arrow to do in that context? The way I use the kbd, right arrow to remove select and edit existing text with cursor at end or any other (non directional) key to clear the field. Try Google example : enter text, tab to button, shit tab back, press right arrow. But I see this is probably not a good idea to enforce in emacs.