severen / confmacs

A small tool for managing Emacs configurations.
GNU General Public License v3.0
15 stars 3 forks source link

Doesn't work with Windows #4

Open wallacewinfrey opened 8 years ago

wallacewinfrey commented 8 years ago

Any chance of making this work with Windows? It works OK when running confmacs init and confmacs list, but when I try to run confmacs select I get the following:

λ confmacs select spacemacs
~/.emacs.d will be deleted and replaced with a symlink.
Do you want to proceed? (Y/N)
Y
C:/tools/ruby22/lib/ruby/2.2.0/fileutils.rb:357:in `symlink': symlink() function is unimplemented on    this machine (NotImplementedError)
        from C:/tools/ruby22/lib/ruby/2.2.0/fileutils.rb:357:in `block in ln_s'
        from C:/tools/ruby22/lib/ruby/2.2.0/fileutils.rb:1586:in `fu_each_src_dest0'
        from C:/tools/ruby22/lib/ruby/2.2.0/fileutils.rb:355:in `ln_s'
        from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/confmacs-0.2.0/bin/confmacs:62:in `select'
        from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in  `invoke_command'
        from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/confmacs-0.2.0/bin/confmacs:76:in `<top  (required)>'
        from C:/tools/ruby22/bin/confmacs:23:in `load'
        from C:/tools/ruby22/bin/confmacs:23:in `<main>'
severen commented 8 years ago

Hmm, it seems that using symlinks with FileUtils does not work on Windows.

Unfortunately I don't have access to my Windows machine right now (vacation) nor am I familiar with how Emacs works on Windows. I'll be happy to have a look at what I can do towards supporting Windows once I get home.

If you'd like to try and work on it (since I presume you're a Windows developer/user) here's a pointer towards getting symlinks working on Windows: http://stackoverflow.com/questions/21511347/how-to-create-a-symlink-on-windows-via-ruby

The code is extremely simple by the way, since it's essentially a Ruby script packaged as a Gem for easy installation.

severen commented 8 years ago

@wallacewinfrey, looking for your input.

What would be an appropriate directory for storing Emacs configurations on Windows? Currently they are stored under .confmacs, however since I am looking to move them to a more standardised location (such as ~/.config/confmacs on Linux and OS X) I'm wondering if I should store them under %APPDATA%?

wallacewinfrey commented 8 years ago

%APPDATA% is fine, although TBH I wish more Windows apps stored their dot-directories in %HOME%.

It's probably best to follow where most Windows Emacs builds store their configuration, which is to say, %APPDATA% ...