-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Undesired newline insertion when jumping to a Recent Files item from *spacemacs* Home buffer #13671
Comments
You can setup to have stack trace printed when (debug-on-entry 'newline-and-indent) You can either add this line somewhere in your startup file or type in the line after emacs starts by hitting |
@emacs18 , thank you for your reply. I've already tried your suggestion but I'm afraid it will not provide any useful additional information.
Let me know if you have an other suggestions. Thanks |
The stack trace seems to indicate that |
Yes this is exactly the scenario. The strange thing is that if I do a "long" click on a recent file, the face goes red, the buffer is switched and there is no undesired newline. |
Can you share the major mode of the buffer where this problem occurs? |
I've noticed the issue with C/C++ and also JSON major modes |
In my C++ buffer only |
The key binding is relevant for spacemacs buffer. |
No. I am unable to reproduce the problem no matter what I try. In my |
@emacs18 Ok I understand your point. Here is a short illustration of my issue when I click on the first recent file: |
You may not call
The only explanation I can think of is that you have somehow customized your mouse key bindings which ends up calling the command in question. Could this also be a mouse hardware problem? I have no idea. |
I fully agree with you: the I've done two tries from startup and invoked command
So I don't think this is a mouse hardware problem and it seems something is inserting implicitly a RET key when mouse button is quickly released. I really don't see how to catch the way this is done. Any clue ? P.S/ I don't have any particular mouse key bindings in my configuration file except: |
This sounds like it might be the same/similar issue as described in: The issue is labeled as This seems to be the most up voted workaround: #5435 (comment) ;; This problem may be related with wid-edit.el and mouse-1-click-follows-link.
;; Now I can avoid automatic yank by putting the following config in
;; spacemacs/user-config.
(add-hook 'spacemacs-buffer-mode-hook
(lambda () (set (make-local-variable
'mouse-1-click-follows-link)
nil))) |
@duianto : Thank you very much for your answer! Thx again ! |
Description
Undesired run of 'newline-and-indent' command when clicking on a Recent Files item from spacemacs Home buffer
Reproduction guide 🪲
Simply click on a Recent Files item which is not in Read-Only mode
Observed behaviour: 👀 💔
You get a spurious newline insertion
Expected behaviour: ❤️ 😄
No spurious newline insertion
System Info 💻
Backtrace 🐾
UPDATE:
I've just noticed this issue is not present when pressing RET key or C-m shortkey.
The undesired newline comes in when clicking with mouse-1 button on one recent file link.
So the entry point should be widget-button-click function.
The text was updated successfully, but these errors were encountered: