Skip to content

Fix windows popup #1101

Closed
jordwalke wants to merge 4 commits intoocaml:masterfrom
jordwalke:FixPopup
Closed

Fix windows popup #1101
jordwalke wants to merge 4 commits intoocaml:masterfrom
jordwalke:FixPopup

Conversation

@jordwalke
Copy link
Copy Markdown
Contributor

@jordwalke jordwalke commented Mar 3, 2020

I pieced together many of the different suggestions discussed in this issue.

We need to use the system shell to correctly interpret ppxs, however, when doing so, it makes windows pop up an annoying cmd window on every keystroke. @bryphe's suggestion was to wrap it in a create_process("cmd.exe", [| theCommand |])- that got rid of the popup, but it had one problem which we couldn't explain: The same exact command would not work. I dug into it and it looks like any time you send a command to cmd.exe through create_process, some quotes get escaped unnecessarily. It doesn't happen with Sys.command. I almost gave up hope but at the last minute I thought of a hack: Pass the information through environment variables which will bypass the escaping!

@Chimrod
Copy link
Copy Markdown

Chimrod commented Aug 3, 2020

I'm just adding a comment to tell you that your solution is working for me. I'm using your patch since about a month without any problem.

I hope this will be merge in the main branch !

@Chimrod
Copy link
Copy Markdown

Chimrod commented Jan 27, 2021

Any news on the patch integration ? The branch requires now some minor modification to work against tag 3.4.2, but the the correction still works and correct a major annoyance (when we use Merlin with autocompletion, the pop ups raise each time we press a key).

@MisterDA
Copy link
Copy Markdown
Contributor

I've tested the PR on Emacs 28+Windows 10, rebased on the 411 branch (currently 4c8f9f8). This PR fixes the problem. Emacs is almost unusable without it when editing a file with ppx. I suggest squashing the PR and hot-fixing it ;)
I think I notice a bit of added latency when typing just after autocompletion with this patch.

@voodoos
Copy link
Copy Markdown
Collaborator

voodoos commented Apr 12, 2021

Let's close this now that #1270 has been merged.

@voodoos voodoos closed this Jul 9, 2021
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

Successfully merging this pull request may close these issues.

4 participants