unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Displaying the cursor inside an overlay?
       [not found] <87iluttfdz.fsf.ref@yahoo.com>
@ 2022-01-09  9:41 ` Po Lu
  2022-01-09 10:31   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Po Lu @ 2022-01-09  9:41 UTC (permalink / raw)
  To: help-gnu-emacs

Is there a way to display the (bar) cursor at some position inside an
overlay's before or after string?

Thanks.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Displaying the cursor inside an overlay?
  2022-01-09  9:41 ` Displaying the cursor inside an overlay? Po Lu
@ 2022-01-09 10:31   ` Eli Zaretskii
  2022-01-09 10:51     ` Po Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-01-09 10:31 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Po Lu <luangruo@yahoo.com>
> Date: Sun, 09 Jan 2022 17:41:44 +0800
> 
> Is there a way to display the (bar) cursor at some position inside an
> overlay's before or after string?

Use the 'cursor' property on the string.  (This doesn't depend on the
cursor's shape, so it should work with a bar cursor as it does with a
block cursor.)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Displaying the cursor inside an overlay?
  2022-01-09 10:31   ` Eli Zaretskii
@ 2022-01-09 10:51     ` Po Lu
  2022-01-09 12:09       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Po Lu @ 2022-01-09 10:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Date: Sun, 09 Jan 2022 17:41:44 +0800
>> 
>> Is there a way to display the (bar) cursor at some position inside an
>> overlay's before or after string?
>
> Use the 'cursor' property on the string.  (This doesn't depend on the
> cursor's shape, so it should work with a bar cursor as it does with a
> block cursor.)

Thanks, I must've missed that.  I see it in the index of the Lisp
reference manual now.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Displaying the cursor inside an overlay?
  2022-01-09 10:51     ` Po Lu
@ 2022-01-09 12:09       ` Eli Zaretskii
  2022-01-09 12:14         ` Po Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-01-09 12:09 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Po Lu <luangruo@yahoo.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Sun, 09 Jan 2022 18:51:54 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Use the 'cursor' property on the string.  (This doesn't depend on the
> > cursor's shape, so it should work with a bar cursor as it does with a
> > block cursor.)
> 
> Thanks, I must've missed that.  I see it in the index of the Lisp
> reference manual now.

Yes, but judging by the code you installed, I'm not sure you used the
property correctly.  It's supposed to be on a single character, and
AFAIU your use case its value should be t, not a number.

(This discussion should probably move to emacs-devel.)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Displaying the cursor inside an overlay?
  2022-01-09 12:09       ` Eli Zaretskii
@ 2022-01-09 12:14         ` Po Lu
  0 siblings, 0 replies; 5+ messages in thread
From: Po Lu @ 2022-01-09 12:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Sun, 09 Jan 2022 18:51:54 +0800
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > Use the 'cursor' property on the string.  (This doesn't depend on the
>> > cursor's shape, so it should work with a bar cursor as it does with a
>> > block cursor.)
>> 
>> Thanks, I must've missed that.  I see it in the index of the Lisp
>> reference manual now.

> Yes, but judging by the code you installed, I'm not sure you used the
> property correctly.  It's supposed to be on a single character, and
> AFAIU your use case its value should be t, not a number.

Ahh, thanks, I understand now.  Dunno why it seemed to work: probably my
input method is set up in some queer way.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-09 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87iluttfdz.fsf.ref@yahoo.com>
2022-01-09  9:41 ` Displaying the cursor inside an overlay? Po Lu
2022-01-09 10:31   ` Eli Zaretskii
2022-01-09 10:51     ` Po Lu
2022-01-09 12:09       ` Eli Zaretskii
2022-01-09 12:14         ` Po Lu

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).