From: bojohan+news@dd.chalmers.se (Johan Bockgård)
To: emacs-devel@gnu.org
Subject: Re: Point position in minibuffer-message
Date: Mon, 14 Apr 2008 00:17:09 +0200 [thread overview]
Message-ID: <yoijbq4d2ye2.fsf@remote2.student.chalmers.se> (raw)
In-Reply-To: jwvy77hpnf6.fsf-monnier+emacs@gnu.org
Stefan Monnier <monnier@iro.umontreal.ca> 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
next prev parent reply other threads:[~2008-04-13 22:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-13 5:49 Point position in minibuffer-message Herbert Euler
2008-04-13 5:58 ` Herbert Euler
2008-04-13 19:29 ` Stefan Monnier
2008-04-13 22:17 ` Johan Bockgård [this message]
2008-04-14 13:42 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yoijbq4d2ye2.fsf@remote2.student.chalmers.se \
--to=bojohan+news@dd.chalmers.se \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).