Skip to content
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

Indentation command moves point #69

Closed
doublep opened this issue May 25, 2022 · 4 comments
Closed

Indentation command moves point #69

doublep opened this issue May 25, 2022 · 4 comments
Labels

Comments

@doublep
Copy link

doublep commented May 25, 2022

Place point at the end of any line. Press TAB. Point moves to the first non-whitespace character on that line (whether it has been reindented or not). This is unlike all standard Emacs modes and makes editing very annoying by breaking established habits.

I.e. (here @ denotes the point):

if (true)@

press TAB; becomes:

@if (true)
@gregghz gregghz added the bug label May 25, 2022
@gregghz
Copy link
Member

gregghz commented May 25, 2022

This is unlike all standard Emacs modes

true. Unfortunately I don't really have the emacs know-how to address this immediately and likely won't in the near term. I suspect there's some block of code that should be wrapped in a save-excursion call but I'm unsure if that's the case and if it is, I'm unsure which code needs it.

As a quick check, can you let me know what function is being called when you press TAB? I'm using doom emacs and with or without evil mode enabled, tab just adds a tab character for me in kotlin-mode, it does not re-indent the line.

I'd, of course, be happy to look at any PRs with a fix.

@doublep
Copy link
Author

doublep commented May 25, 2022

It runs indent-for-tab-command here.

@sten0
Copy link

sten0 commented May 26, 2022

@gregghz By default Emacs calls indent-for-tab-command. One can temporarily disable all user and site packages and configuration to check upstream defaults by running emacs -q -Q.

I'd, of course, be happy to look at any PRs with a fix.

It looks like either #38 or #53 (both need rebasing) would resolve this bug.

@gregghz
Copy link
Member

gregghz commented May 27, 2022

fixed via #70

@gregghz gregghz closed this as completed May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants