GithubHelp home page GithubHelp logo

Wrong .emacs path on Windows 10 about chemacs HOT 3 OPEN

plexus avatar plexus commented on August 18, 2024
Wrong .emacs path on Windows 10

from chemacs.

Comments (3)

plexus avatar plexus commented on August 18, 2024

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?

from chemacs.

shaund avatar shaund commented on August 18, 2024

Sure, see below. I think the current script could even be modified to do the first option automatically.


In PowerShell:

  1. cd to where you want to keep chemacs (e.g. cd C:\Users\$env:UserName)
  2. clone chemacs: git clone https://github.com/plexus/chemacs.git
  3. create the %HOME% variable emacs uses:
[Environment]::SetEnvironmentVariable("HOME", "C:\Users\$env:UserName", "User")
  1. create a hardlink from chemacs's .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:

  1. open another PowerShell, this one as admin:
Start-Process powershell -Verb runAs
  1. a UAC dialog will pop up, confirm it to open the admin PowerShell
  2. now in the admin PowerShell, cd to where you want to keep chemacs: cd D:\MySpecialHome
  3. clone chemacs: git clone https://github.com/plexus/chemacs.git
  4. create the %HOME% variable emacs uses:
[Environment]::SetEnvironmentVariable("HOME", "D:\MySpecialHome", "User")
  1. create a symlink from chemacs's .emacs to your home directory:
New-Item -Path D:\MySpecialHome\.emacs -ItemType SymbolicLink -Target chemacs\.emacs

from chemacs.

plexus avatar plexus commented on August 18, 2024

Great! Could you add this to the README please? (i.e. pull request?)

from chemacs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.