How do I launch emacs in terminal mode within Powershell?
Andrew Henderson
When I do the obvious thing in Powershell:
Start-Process "C:\bin\emacs-23.3\bin\emacs.exe" -ArgumentList "-nw"Then emacs loads a new "cmd.exe" terminal, within which it is in terminal mode, instead of starting in terminal mode within Powershell. How can I start emacs in terminal mode within the existing Powershell terminal?
12 Answers
I can't test it cause I don't use emacs. Does it load within PowerShell if you just invoke it?
C:\bin\emacs-23.3\bin\emacs.exe -nw 1 Install GNU Emacs from winget
winget install "GNU Emacs"Then add this code block in your Microsoft.PowerShell_profile.ps1
$emacs_wildcard = "${Env:ProgramFiles}\Emacs\*\bin\emacs.exe"
if ($(Test-Path $emacs_wildcard)) { $emacs_path = (Get-ChildItem $emacs_wildcard)[-1].FullName -replace ' ', '` ' function emacs { "$emacs_path -nw $args" | Invoke-Expression }
}