Using f-split from f.el:

(require 'f)
(f-split "c:/a/b")


("/" "c:" "a" "b")

What is the rationale? Shouldn't it be ("c:" "a" "b")?

Also in Emacs for Windows the value of:


is "/". When is this value supposed to be different, if not in Windows?

  • 1
    See also github.com/rejeep/f.el/issues/80. – Basil May 20 '18 at 13:13
  • Is your question about the order of the list elements? Just what are you asking, in your last question about MS Windows? Are you asking about slash versus backslash or something else. The question is not very clear. – Drew May 20 '18 at 14:24
  • 1
    @Drew: I expect "c:/a/b" components to be ("c:" "a" "b"). Under Windows the separator should be "\\". – antonio May 20 '18 at 15:21
  • 1
    1. I think you need to ask the maintainer of fsplit.el whether this is by design (and why). 2. Emacs uses slash, not backslash, everywhere for file names, including for MS Windows. You can input file names with backslashes but (a) you need not and (b) they are converted to slashes anyway. – Drew May 20 '18 at 19:30
  • @Drew: There may be situations where you need to run an external Windows command using a path argument. In these cases "\\" may be better than "/" (while Windows can often cope with both). This would make a platform dependant f-path-separator useful. Apart from that, if under Windows/Linux/MacOS is always "/", what is the use case of f-path-separator? This is what I meant with my second question. – antonio May 20 '18 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.