gpt4 book ai didi

emacs - 如何从elisp获取带有反斜杠的Windows路径

转载 作者:行者123 更新时间:2023-12-04 13:33:51 26 4
gpt4 key购买 nike

我正在尝试使用emacs在Windows上进行一些操作。就我而言,我需要从elisp返回带有反斜杠的文件路径。但是elisp总是用斜杠等返回路径。

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

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

可以用regexp完成,但是我需要更简单的方法。

最佳答案

convert-standard-filename中的(elisp) Standard File Names是否符合您的需求?

关于emacs - 如何从elisp获取带有反斜杠的Windows路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9901609/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com