From: Jonas Bernoulli <jonas@bernoul.li>
To: 24179@debbugs.gnu.org
Subject: bug#24179: 24179
Date: Thu, 11 Aug 2016 18:39:54 +0200 [thread overview]
Message-ID: <87vaz7xns5.fsf@bernoul.li> (raw)
In-Reply-To: <87y448s2k8.fsf@gmail.com>
Thanks Eli!
> Btw, magit-blame could be nicer to the display engine by placing a
> 'cursor' property on the first character of each before-string it
> creates to show the blamed commit.
After reading the documentation, I cannot quite figure what I am
supposed to do. Given this:
(with-current-buffer (get-buffer-create "demo")
(pop-to-buffer (current-buffer))
(erase-buffer)
(insert "one\ntwo\nthree")
(backward-word 2)
(let ((ov (make-overlay (point)
(save-excursion
(forward-line 1)
(point))))
(heading "before two\n"))
(overlay-put ov 'before-string heading)
(overlay-put ov 'the-value "two")
(overlay-put ov 'evaporate t)))
I think I am supposed to change it to:
(with-current-buffer (get-buffer-create "demo")
(pop-to-buffer (current-buffer))
(erase-buffer)
(insert "one\ntwo\nthree")
(backward-word 2)
(let ((ov (make-overlay (point)
(save-excursion
(forward-line 1)
(point))))
(heading "before two\n"))
(put-text-property 0 1 'cursor (length heading) heading)
(overlay-put ov 'before-string heading)
(overlay-put ov 'the-value "two")
(overlay-put ov 'evaporate t)))
However I would then expect that it would become possible for the cursor
to be displayed "on" the "b" because of this: "In other words, the
string character with the ‘cursor’ property of any non-‘nil’ value is
the character where to display the cursor. The value of the property
says for which buffer positions to display the cursor there."
one
*efore two
two
three
That would be a change in behavior* but I am not seeing any change so I
am unsure whether I am doing this all wrong. If so, then please correct
the above code.
* However if that is possible, I would prefer to use the `cursor'
property to provide the hint to the display engine that the cursor
should keep ending up here (as it does without fiddling with `cursor' at
all):
one
before two
*wo
three
Given "the cursor will be displayed on this character for any buffer
position in the range `[OVPOS..OVPOS+N)'", I don't see how I can say
"display the cursor HERE instead of at the positions BEFORE HERE as
specified by N".
next prev parent reply other threads:[~2016-08-11 16:39 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-07 21:15 bug#24179: 25.1; scroll-conservatively over SCROLL_LIMIT may put point in the wrong place Alex
2016-08-08 2:39 ` Eli Zaretskii
2016-08-08 5:42 ` Alex
2016-08-08 15:31 ` Eli Zaretskii
2016-08-08 16:35 ` Alex
2016-08-08 16:58 ` Eli Zaretskii
2016-08-08 17:22 ` Alex
2016-08-08 17:35 ` Eli Zaretskii
2016-08-11 15:06 ` Eli Zaretskii
2016-08-11 22:20 ` Alex
2016-08-12 14:17 ` Eli Zaretskii
2016-08-12 22:01 ` Alex
2016-08-13 6:52 ` Eli Zaretskii
2016-08-13 16:59 ` Alex
2016-08-13 17:25 ` Eli Zaretskii
2016-08-14 18:27 ` Eli Zaretskii
2016-08-14 20:05 ` Alex
2016-08-11 16:39 ` Jonas Bernoulli [this message]
2016-08-11 17:15 ` bug#24179: 24179 Eli Zaretskii
2016-08-11 18:29 ` Jonas Bernoulli
2016-08-11 19:55 ` Eli Zaretskii
2016-08-11 20:07 ` Eli Zaretskii
2016-08-11 22:19 ` Jonas Bernoulli
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vaz7xns5.fsf@bernoul.li \
--to=jonas@bernoul.li \
--cc=24179@debbugs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.