Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #26758
    TianCheng Yu
    Participant

    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!

    #26759
    TianCheng Yu
    Participant

    For 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.

    #26781
    gordy
    Participant

    this used to work with the /sp argument but it seems to have stopped working

    #26785
    Yutaka Emura
    Keymaster

    Hi 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,

    #26789
    gordy
    Participant

    in 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.

    #26797
    gordy
    Participant

    it 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

    #26798
    Yutaka Emura
    Keymaster

    Hello 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 be ee256.exe if the CPU supports AVX2, or ee512.exe if it supports AVX512)

    This is because emeditor.exe is just a shim app that actually calls ee128.exe (ee256.exe or ee512.exe) and terminates itself immediately.

    #26799
    gordy
    Participant

    configuring git to use ee256 has fixed me up, thanks!

    #26816
    Yutaka Emura
    Keymaster

    EmEditor v19.9 beta 3 (19.8.93) fixes this issue even if you use “emeditor.exe /sp”. Thank you!

    #26862
    Yutaka Emura
    Keymaster

    To 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"

    #27153
    TianCheng Yu
    Participant

    git config –global core.editor “emeditor.exe -sp”

    Thanks! This solved my issue, and now EmEditor works perfectly as git editor.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.