abo-abo / pamparam

Simple and fast flashcards for Emacs
229 stars 16 forks source link

Command pamparam-sync failed on windows #7

Closed lislon closed 7 years ago

lislon commented 7 years ago

Description :octocat:

When run pamparam-sync command on windows 7 it fails

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart:

The -p directory created and I see error:

pamparam-update-card: Command failed: mkdir -p "c:/Users/Elephant/src/elisp/pamparam/doc/sets/capitals/capitals.pam/cards/03/" && echo -e "* m\n#+STARTUP: content\n* France\nParis" > "c:/Users/Elephant/src/elisp/pamparam/doc/sets/capitals/capitals.pam/cards/03/0309a6c666a7a803fdb9db95de71cf01-e20d37a5d7fcc4c35be6fc18a8e71bfa.org"

Expected behaviour: :heart: :smile:

Command succeeds

System Info :computer:

Workaround

The workaround is to put mkdir into quotes:

;; pamparam.el
(cmd (format "\"mkdir\" -p %s && echo -e %s > %s"

Related topic: https://superuser.com/questions/856582/force-windows-use-exe-on-path-rather-than-cmd-exe-internal-command.

abo-abo commented 7 years ago

Thanks, please test.

lislon commented 7 years ago

Sorry, forgot to mention that echo command has the same issue

abo-abo commented 7 years ago

Try it now. Should work, although much slower than on Linux.