File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,16 @@ Fill PATH with EMPTY string, if nonexist."
63
63
((string-equal system-type " darwin" )
64
64
(start-process " " nil " open" " -a" executable path))
65
65
((string-equal system-type " gnu/linux" )
66
- (start-process " " nil executable path))
66
+ ; ; special handling for WSL emacs invoke Windows draw.io.exe
67
+ (start-process
68
+ " "
69
+ nil executable
70
+ (if (string= " exe"
71
+ (file-name-extension executable))
72
+ (string-trim
73
+ (shell-command-to-string
74
+ (format " wslpath -aw '%s ' " (file-truename path))))
75
+ path)))
67
76
((string-equal system-type " cygwin" )
68
77
(start-process " " nil " xdg-open"
69
78
executable path)))))
Original file line number Diff line number Diff line change @@ -102,15 +102,7 @@ KEYWORD-PLIST contains parameters from the chatu line."
102
102
(interactive )
103
103
(let* ((input-path (plist-get keyword-plist :input-path ))
104
104
(input-path (file-truename (chatu-common-with-extension input-path " drawio" )))
105
- (drawio-path (shell-quote-argument (funcall chatu-drawio-executable-func)))
106
- ; ; special handling for WSL emacs invoke Windows draw.io.exe
107
- (input-path
108
- (if (string= " exe"
109
- (file-name-extension drawio-path))
110
- (string-trim
111
- (shell-command-to-string
112
- (format " wslpath -aw '%s ' " (file-truename input-path))))
113
- input-path)))
105
+ (drawio-path (shell-quote-argument (funcall chatu-drawio-executable-func))))
114
106
(chatu-common-open-external drawio-path input-path chatu-drawio-empty)))
115
107
116
108
(provide 'chatu-drawio )
You can’t perform that action at this time.
0 commit comments