- AuthorPosts
- May 2, 2020 at 10:52 pm #26758TianCheng YuParticipant
Hello,
I was wondering if it is possible to add some command-line options to EmEditor, so it will only return after the user closes the windows, and possibly to temporarily disable sessions.
The use cases would be 1) to use as git editor and, 2) to be used in scripts for user input.
Thanks!
May 2, 2020 at 10:53 pm #26759TianCheng YuParticipantFor example, in notepad++, there are options like -notabbar -nosession, which makes it possible to use as a replacement for vim in various command-line & desktop hybrid environments.
May 22, 2020 at 12:28 am #26781gordyParticipantthis used to work with the /sp argument but it seems to have stopped working
May 22, 2020 at 6:53 pm #26785Yutaka EmuraKeymasterHi TianCheng Yu,
It will only return after the user closes the windows
Well, that is not common in Windows apps. I tried:
notepad++.exe -notabbar -nosession
but Notepad++ returns immediately in the Command Prompt.
Can you please define “sessions”? Does it mean workspaces in EmEditor? You can certainly disable automatic workspaces in EmEditor in the Workspace page of the Customize dialog box, and by default it is disabled.
Hi gordy,
How did the
/sp
option stop working? In my test,emeditor.exe /sp
creates two processes as it is supposed to.I want to help you both, but I need to understand issues correctly and accurately.
Thanks,
May 22, 2020 at 8:26 pm #26789gordyParticipantin my case I noticed that when I run “git commit” it will return immediately with “Aborting commit due to empty commit message.” this is something I encountered in the past and was remedied by configuring git to use “emeditor /sp”. I encountered this again recently and /sp did not help.. it has been some years since I used git regularly and I am not sure if it’s emeditor or git that has changed.
May 22, 2020 at 10:32 pm #26797gordyParticipantit looks like it’s actually windows that changed:
in cmd, “start /wait emeditor” doesn’t wait in Win10 build 1909 but if I run the same command in my VM with Win10 build 1709 it works and waits as expected.curiously “start /wait notepad” works properly even on Win10 build 1909
perhaps it has something to do with the new ConPTY stuff introduced in Win10 1803
May 23, 2020 at 8:36 am #26798Yutaka EmuraKeymasterHello gordy,
Thanks for information. If you are using the 64-bit version of EmEditor, can you try this instead:
start /wait ee128.exe
(
ee128.exe
can beee256.exe
if the CPU supports AVX2, oree512.exe
if it supports AVX512)This is because
emeditor.exe
is just a shim app that actually callsee128.exe
(ee256.exe
oree512.exe
) and terminates itself immediately.May 23, 2020 at 1:06 pm #26799gordyParticipantconfiguring git to use ee256 has fixed me up, thanks!
May 27, 2020 at 9:49 pm #26816Yutaka EmuraKeymasterEmEditor v19.9 beta 3 (19.8.93) fixes this issue even if you use “emeditor.exe /sp”. Thank you!
June 21, 2020 at 8:04 am #26862Yutaka EmuraKeymasterTo set EmEditor as the default text editor for Git, please update EmEditor to v19.9.2 or later, open Git Bash, and type:
git config --global core.editor "emeditor.exe -sp"
November 12, 2020 at 3:35 am #27153TianCheng YuParticipantgit config –global core.editor “emeditor.exe -sp”
Thanks! This solved my issue, and now EmEditor works perfectly as git editor.
- AuthorPosts
- You must be logged in to reply to this topic.