-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emacs 29.1 - button.el's button-map overrides TAB
key when on tree root's button.
#1052
Comments
This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues). |
Looking into it. |
I can't reproduce the problem. What does your config look like? What do you see when you |
@Alexander-Miller Thank you for looking into this issue. I can confirm that this issue still exist with the latest version available on Melpa, reproducible with a minimal setup. I tested with a minimal setup this time so here are some clarification of the symptoms:
Here is the output of
--> Note that this is For GUI, pressing tab key (the physical action) always triggers
--> This is Minimal setupMy Emacs is: I can reproduce this issue with this minimal setup:
(package-initialize)
;; uncomment these if you do `M-x package-install`
;; (require 'package)
;; (add-to-list
;; 'package-archives '("melpa" . "http://melpa.org/packages/"))
(global-set-key (kbd "C-c t") 'treemacs-select-window) ; this is NOT needed to reproduce the error.
(custom-set-variables
'(package-selected-packages
'(treemacs))
) Here are the version numbers from
Other (possibly irrelevant) environment informations:
--> I do NOT have system info:
--> I do NOT think these are relevant Please tell me if you need more info. |
I have reproduced the problem now, but I've been unable to come up with a fix that's limited to treemacs. I don't know what's different about projects vs other nodes, but this tab misbind is really persistent. However I do have a solution you can use. I've the following like in my config: |
@Alexander-Miller Your work around is better than mine as mines involves more keypresses with my pinky. Thank you from my future self. As a summary:My understanding of the culprit (cause) of this issue:
1 + 3 -> symptom: tab still works in GUI With the above understanding there are only a few possible fixes:
|
I had another go at debugging this, and this time I have found how the button-map is actually injected into treemacs (despite it mostly using its own stripped down version of buttons for a very long time). Long story short: a proper solution is possible after all, the latest treemacs should fix your problem now. |
Thanks for the fix, I would not have known that the keymap is actually bind at the text properties instead of minor mode. |
From emacs source (NEWS):
In GUI
treemacs-TAB-action
seems to work fine on root but in terminaltreemacs-TAB-action
got overridden when cursor is on button for tree root. (Only beginning of line and end of line are non-button for root)I have yet created a work around for this as I can always do
C-e
orC-a
before pressingTAB
but it is a bit annoying.README Update at [2023-10-20]:
The last statement applies to when cursor is not on a button. With a minimal setup
C-a
will also NOT work. It works for me because I use an icon package which adds some padding in front, that is not part of the button.Please read this comment for some clarification:
#1052 (comment)
The text was updated successfully, but these errors were encountered: