GNU bug report logs - #77224
[PATCH] New minor mode 'cursor-indicators-mode'

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Sun, 23 Mar 2025 22:59:03 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 77224 <at> debbugs.gnu.org, eliz <at> gnu.org, Daniel Colascione <dancol <at> dancol.org>, mail <at> daniel-mendler.de
Subject: bug#77224: [PATCH] New minor mode 'cursor-indicators-mode'
Date: Sat, 29 Mar 2025 12:26:40 -0600
[Message part 1 (text/plain, inline)]
Juri Linkov <juri <at> linkov.net> writes:

>> I've updated the patch which should use the mode hook instead using
>> post-command-hook or idle timers (and allows (implicitly) to user use
>> post-command-hook (but that is user responsibility add it or not)).

>> Also this should refresh the cursor while switching windows.

>> However I've deleted the function/lambdas support as conditions because
>> i found it problematic.

>> I've test it only for overwrite-mode, I ask if anyone wants to give it a
>> try.

> Please note that this is insufficient for 'repeat-mode'.
> Currently it requires adding an advice to update the cursor
> on the repeat timer events:

>   (add-function :after repeat-echo-function #'cursor-indicators--update-indications)

> since need to update the cursor when the timer is fired:

>   (run-with-idle-timer timeout nil #'repeat-exit)
>   (defun repeat-exit ()
>     (setq repeat-in-progress nil)
>     (funcall repeat-echo-function nil))

> This problem can be solved by adding a hook:

>   (defun repeat-exit ()
>     (setq repeat-in-progress nil)
>     (funcall repeat-echo-function nil)
>     (run-hooks 'repeat-exit-hook))

> Then 'cursor-indicators-mode' needs to add this hook:

>   (define-minor-mode cursor-indicators-mode
>     ...
>     (add-hook 'repeat-exit-hook #'cursor-indicators--update-indications)

> Then maybe it's possible to add more hooks for other features as well.

> The drawback of this approach is that specific hooks make the cursor updating
> less reliable than with using post-command-hook.

Well, then I think the best solution for this would be to make this
package (cursor-indicators) part of the C code.

I'll see what I can do.

[Message part 2 (text/html, inline)]
[Message part 3 (text/plain, inline)]

-- 
                                          - E.G via GNU Emacs and Org.

This bug report was last modified 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.