From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.devel Subject: Re: Point position in minibuffer-message Date: Mon, 14 Apr 2008 00:17:09 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1208125054 9889 80.91.229.12 (13 Apr 2008 22:17:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Apr 2008 22:17:34 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 14 00:18:12 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JlAWY-0007Cr-D4 for ged-emacs-devel@m.gmane.org; Mon, 14 Apr 2008 00:18:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlAVu-0005jz-92 for ged-emacs-devel@m.gmane.org; Sun, 13 Apr 2008 18:17:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JlAVp-0005gb-I6 for emacs-devel@gnu.org; Sun, 13 Apr 2008 18:17:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JlAVo-0005eu-HY for emacs-devel@gnu.org; Sun, 13 Apr 2008 18:17:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlAVo-0005eg-C6 for emacs-devel@gnu.org; Sun, 13 Apr 2008 18:17:24 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JlAVo-000833-03 for emacs-devel@gnu.org; Sun, 13 Apr 2008 18:17:24 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JlAVf-000073-8V for emacs-devel@gnu.org; Sun, 13 Apr 2008 22:17:16 +0000 Original-Received: from remote2.student.chalmers.se ([129.16.29.80]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Apr 2008 22:17:15 +0000 Original-Received: from bojohan+news by remote2.student.chalmers.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Apr 2008 22:17:15 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: remote2.student.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:Ug4YZ+I8Tg7TFF4N3MdK4r8awzo= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:95138 Archived-At: Stefan Monnier writes: > That's a good point. I think the bug is in the C code that places the > cursor (since the overlay is all setup with advancing markers). But > maybe fixing the cursor code is difficult. > > The use of an overlay with after-string was chosen so as to avoid > other minor problems, but this one might be more important, You can use the `cursor' property --- minibuffer.el 13 Apr 2008 01:47:42 -0000 1.8 +++ minibuffer.el 13 Apr 2008 22:02:14 -0000 @@ -133,9 +133,11 @@ If ARGS are provided, then pass MESSAGE through `format'." ;; Clear out any old echo-area message to make way for our new thing. (message nil) - (unless (and (null args) (string-match "\\[.+\\]" message)) + (if (and (null args) (string-match "\\[.+\\]" message)) + (setq message (copy-sequence message)) (setq message (concat " [" message "]"))) (when args (setq message (apply 'format message args))) + (add-text-properties 0 1 '(cursor t) message) (let ((ol (make-overlay (point-max) (point-max) nil t t))) (unwind-protect (progn -- Johan Bockgård