bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69107: 30.0.50; mouse movement commands exit repeat maps


From: StrawberryTea
Subject: bug#69107: 30.0.50; mouse movement commands exit repeat maps
Date: Wed, 14 Feb 2024 10:38:03 -0600
User-agent: mu4e 1.10.8; emacs 30.0.50

Okay, so as a follow-up, the previous solution did not work. I had to remove the
<mouse-movement> event altogether with

(setq-hook! ’post-command-hook track-mouse nil)

Now they don’t trigger randomly for me anymore.
StrawberryTea <look@strawberrytea.xyz> writes:

> Thanks, I just finally realized that I can map mouse movement to nil.
>
> (after! lsp-ui-doc
>   (map! :map lsp-ui-doc-mode-map
>         “<mouse-movement>” nil))
>
> I never use that feature so this worked fine for me rather than digging into 
> why
> the <mouse-movement> events were being generated.
>
> Thank you,
> StrawberryTea
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: StrawberryTea <look@strawberrytea.xyz>
>>> Date: Tue, 13 Feb 2024 12:53:18 -0600
>>>
>>> Hi. I’m using LSP mode which defines a <mouse-movement> command. I have
>>> noticed that in some special situation involving switching workspaces in
>>> Doom Emacs while using EXWM (Emacs X Window Manager), the
>>> <mouse-movement> command is triggered after switching workspaces which
>>> triggers the repeat map to exit even though the mouse wasn’t actually
>>> visibly moved. I think it might be reasonable to exclude mouse movement
>>> commands from exiting the repeat map by default or as an option.
>>
>> You can do that yourself for commands you want to repeat, can’t you?
>> From the node “Creating Keymaps” in the ELisp Reference manual:
>>
>>      Each command in the keymap can be marked as ’repeatable’, i.e.
>>      usable in ‘repeat-mode’, by putting a ‘repeat-map’ property on it,
>>      e.g.
>>
>>           (put ’undo ’repeat-map ’undo-repeat-map)
>>
>>      where the value of the property is the map to be used by
>>      ‘repeat-mode’.
>>
>> There’s no way the default configuration can ever anticipate all of
>> the known and unknown commands that some users could want to be
>> repeatable.  But each user can add commands to the set of repeatable
>> ones by using the above technique.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]