Open shaund opened 4 years ago
I'm not really up to date on the Powershell situation since I rarely use Windows. Any chance you could add some instructions to the README for people that come looking for what to do?
Sure, see below. I think the current script could even be modified to do the first option automatically.
In PowerShell:
cd C:\Users\$env:UserName
)git clone https://github.com/plexus/chemacs.git
%HOME%
variable emacs uses:
.emacs
to your home directory:
New-Item -Path C:\Users\$env:UserName\.emacs -ItemType HardLink -Target chemacs\.emacs
Note this uses a hardlink so you don't need admin rights. Hardlinks only work on the same drive/filesystem. If you have admin rights and want to create it on a different drive, then follow the following steps instead.
I'll use D:\MySpecialHome
as the example for where you want your emacs home directory to be.
In PowerShell:
Start-Process powershell -Verb runAs
cd D:\MySpecialHome
git clone https://github.com/plexus/chemacs.git
%HOME%
variable emacs uses:
.emacs
to your home directory:
New-Item -Path D:\MySpecialHome\.emacs -ItemType SymbolicLink -Target chemacs\.emacs
Great! Could you add this to the README please? (i.e. pull request?)
The current powershell script tries to deal with this, but even though I hadn't set %HOME%, it still copied
.emacs
toC:/Users/<username>/
instead ofc:/Users/<username>/AppData/Roaming/
To get it to work, I ran in powershell
Then used this https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html#download to create a symlink to the .emacs file in
C:/Users/$env:UserName/
. (You could also use #18.)