Created
November 27, 2019 23:52
-
-
Save x5lcfd/1a9c5476ae7b89a44c65d64a34ce91b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to startup file | |
$startup_file = "$([Environment]::GetFolderPath('Startup'))\StartEmacsServer.bat" | |
# Introduce variable HOME: | |
# 1. for simplicity | |
# 2. runemacs.exe expects it to be | |
# | |
# %APPDATA% is chosen because runemacs.exe operates there | |
# https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#Find-Init | |
# https://www.gnu.org/software/emacs/manual/html_node/emacs/General-Variables.html#General-Variables | |
New-Item $startup_file -type file | |
Set-Content -Path $startup_file -Value "set HOME=%APPDATA%" | |
# Clean previous server file info first | |
Add-Content -Path $startup_file -Value "del /Q ""%HOME%/.emacs.d/server/*""" | |
Add-Content -Path $startup_file -Value "runemacs.exe --daemon" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment