yasnippet-snippets icon indicating copy to clipboard operation
yasnippet-snippets copied to clipboard

Names that Windows doesn't support

Open Armoken opened this issue 5 years ago • 3 comments
trafficstars

I am using straight.el as package manager. And I can't install this package due to Windows limitations.

$ cd "c:/ProgramData/chocolatey/bin/"
$ "cmd" "/c" "mklink" "c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\build\yasnippet-snippets\snippets\rust-mode\closure" "c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\repos\yasnippet-snippets\snippets\rust-mode\closure"

symbolic link created for c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\build\yasnippet-snippets\snippets\rust-mode\closure <<===>> c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\repos\yasnippet-snippets\snippets\rust-mode\closure

[Return code: 0]

$ cd "c:/ProgramData/chocolatey/bin/"
$ "cmd" "/c" "mklink" "c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\build\yasnippet-snippets\snippets\rust-mode\cfg=" "c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\repos\yasnippet-snippets\snippets\rust-mode\cfg="

symbolic link created for c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\build\yasnippet-snippets\snippets\rust-mode\cfg <<===>> c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\repos\yasnippet-snippets\snippets\rust-mode\cfg

[Return code: 0]

$ cd "c:/ProgramData/chocolatey/bin/"
$ "cmd" "/c" "mklink" "c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\build\yasnippet-snippets\snippets\rust-mode\cfg" "c:\Users\vashcali\AppData\Roaming\.emacs.d\runtime-artifacts\straight\repos\yasnippet-snippets\snippets\rust-mode\cfg"

Cannot create a file when that file already exists.

[Return code: 1]

All unsupported files what I found (using https://en.wikipedia.org/wiki/Filename#In_Windows):

./emacs-lisp-mode/string=
./ruby-mode/=b
./c++-mode/operator=
./c++-mode/d+=
./c++-mode/operator==
./c++-mode/operator+=
./c++-mode/operator!=
./rust-mode/cfg=

Armoken avatar Jul 15 '20 13:07 Armoken

Ah interesting, would you like to make a PR @Armoken ? Would be easier for you to test if your changes make it work since I don't have windows available to check if I've done it right. You can just rename things like "string=" to "string_equal" for example, I don't really mind much about the filename, if the snippet also has a key set, which you should not need to change.

If it does not have a key however we should rename and set the :key to what's the current filename is.

AndreaCrotti avatar Aug 02 '20 17:08 AndreaCrotti

@AndreaCrotti Ok, I will try to do it soon

Armoken avatar Aug 02 '20 17:08 Armoken

I just tried to install the package on windows with just package-install btw and it worked fine, so I wonder if it's something to do with straight.el instead of Windows?

AndreaCrotti avatar Apr 06 '21 10:04 AndreaCrotti