配置如下:
(setq browse-url-generic-program
(cond
(*is-a-mac* ; mac
"open")
(*unix* ; linux or unix
"xdg-open")
(t
;; Windows: use default browser
"start")))
借鉴自 redguardtoo 的配置,但在 w11 上调用 browse-url-generic 时出现如下错误:
Debugger entered--Lisp error: (permission-denied "Searching for program" "Permission denied" "start")
call-process("start" nil 0 nil "https://baidu.com")
browse-url-generic("https://baidu.com" nil)
funcall-interactively(browse-url-generic "https://baidu.com" nil)
command-execute(browse-url-generic record)
execute-extended-command(nil "browse-url-generic" "browse-url g")
funcall-interactively(execute-extended-command nil "browse-url-generic" "browse-url g")
command-execute(execute-extended-command)
windows 用的不多,但最近刚好工作要用到。有遇到相同问题或者知道解决这个问题思路的朋友吗?