[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix mouse click on flymake
From: |
Juri Linkov |
Subject: |
Re: [PATCH] Fix mouse click on flymake |
Date: |
Sun, 19 Jan 2025 20:51:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) |
> My first attempt for this fix was actually this patch
>
> + :set (lambda (sym val)
> + ;; TODO: Maybe add a condition here using last value of sym
> + (keymap-unset flymake-mode-map "<left-margin> <mouse-1>" t)
> + (keymap-unset flymake-mode-map "<left-fringe> <mouse-1>" t)
> + (set-default sym val)
> + (when val
> + (keymap-set flymake-mode-map
> + (key-description `[,(pcase flymake-indicator-type
> + ('fringes
> flymake-fringe-indicator-position)
> + ('margins
> flymake-margin-indicator-position))
> + mouse-1])
> + #'flymake-show-buffer-diagnostics))))
Thanks, this is much better.
> But for some reason it didn't work.
Maybe it doesn't work because flymake-mode still uses an old map,
so you need to reevaluate flymake-mode to take a new value of the map.
But this is not the right thing to do anyway. Then maybe you could use
a keymap filter with the condition that checks flymake-indicator-type?
> BTW!! When I haven't seen the code yet, I was actually looking for a
> property in the margin char, I thought that the char in the
> fringe/margin had a 'keymap property that made it clickable.
>
> That would give more fine grained actions and will allow a more precise
> action. I tried to do that but it didn't work, apparently the action is
> associated with the whole margin.
What would happen when you delete the char with the 'keymap' property?
The indicator will go away? This doesn't look right.
- [PATCH] Fix mouse click on flymake, Ergus, 2025/01/18
- Re: [PATCH] Fix mouse click on flymake, Eli Zaretskii, 2025/01/19
- Re: [PATCH] Fix mouse click on flymake, Juri Linkov, 2025/01/19
- Re: [PATCH] Fix mouse click on flymake, Ergus, 2025/01/19
- Re: [PATCH] Fix mouse click on flymake,
Juri Linkov <=
- Re: [PATCH] Fix mouse click on flymake, Ergus, 2025/01/19
- Message not available
- Re: [PATCH] Fix mouse click on flymake, Ergus, 2025/01/20
- Re: [PATCH] Fix mouse click on flymake, Juri Linkov, 2025/01/20
- Re: [PATCH] Fix mouse click on flymake, Ergus, 2025/01/20
- Re: [PATCH] Fix mouse click on flymake, Eli Zaretskii, 2025/01/21
- Re: [PATCH] Fix mouse click on flymake, Ergus, 2025/01/21
- Re: [PATCH] Fix mouse click on flymake, Eli Zaretskii, 2025/01/23
- Re: [PATCH] Fix mouse click on flymake, Ergus, 2025/01/23
- Re: [PATCH] Fix mouse click on flymake, Eli Zaretskii, 2025/01/24
- Re: [PATCH] [UPDATE] Fix mouse click on flymake, Ergus, 2025/01/24