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

Issue when insert space after some non-ASCII char. #53

Open
nasyxx opened this issue May 5, 2021 · 2 comments
Open

Issue when insert space after some non-ASCII char. #53

nasyxx opened this issue May 5, 2021 · 2 comments

Comments

@nasyxx
Copy link

nasyxx commented May 5, 2021

Hi, I meet this issue with the indent and smart modes.

| indicates the cursor. The can be any CJK/emoji/...

(func 中|)

After hit SPC,

Except:

(func 中 |)

Actually

(func 中)|

But if it is an ASCII char

(func a|)
;; ->
(func a |)

According to my observation, if I yank a space after , it is feasible, works as the ASCII char.

(func 中|)
;; yank a space->
(func 中 |)

So, is it possible to avoid this issue?

@justinbarclay
Copy link
Owner

Hi thanks for pointing this out. It is not ideal. 🙁

Unfortunately, with a cursory glance, this appears to be an issue in the library that parinfer-rust-mode uses. The author has made a note of it here, but not much progress has been made.

I'm going to try and find some time to validate that this isn't an emacs/implementation issue, but as of right now I wouldn't hold my breath.

Yank can work, because I have special code to handle yanks and treat every yank operation as being in paren-mode. Note how you can yank one space, but if you then try to insert a second space through conventional means it skips over the bracket like in your examples.

@nasyxx
Copy link
Author

nasyxx commented May 6, 2021

Hi, thank you very much for your explanation and tips.

At present, I have added (quoted-insert . "parn") to parinfer-rust-treat-command-as, and then C-q SPC will input SPC after these characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants