Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get windows path with backslash from elisp

Tags:

emacs

elisp

I am trying out few things on windows with emacs. In my case, I need to return the file path with backslash from elisp. But elisp always return the path with slash,etc.

(expand-file-name "text.log" "d:\\ProgramData\\temp")
=> d:/ProgramData/temp/text.log

My requirement:

(expand-file-name "text.log" "d:\\ProgramData\\temp")
=> d:\ProgramData\temp\text.log

It can be done with regexp, but I need more simple way.

like image 459
luozengbin Avatar asked Mar 28 '12 05:03

luozengbin


1 Answers

Does convert-standard-filename in (elisp) Standard File Names fit your need?

like image 177
OwnWaterloo Avatar answered Sep 29 '22 08:09

OwnWaterloo