summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-12-01 14:40:47 +0200
committerEli Zaretskii <eliz@gnu.org>2022-12-01 14:40:47 +0200
commit8b3baadf671b7b3d5058808c4655eca8bd46015e (patch)
treeb4c7f17c555b469aa3c4314f67763549381457fe
parent3b5b99ac919eff05374d74b4a052d33c34c56742 (diff)
downloademacs-8b3baadf671b7b3d5058808c4655eca8bd46015e.tar.gz
Fix compilation of Org 9.6 on MS-Windows
* lisp/org/org-clock.el (org-x11idle-exists-p): Don't try to invoke "command x11idle" on MS-Windows and MS-DOS. This fixes a hang during byte-compilation of Org.
-rw-r--r--lisp/org/org-clock.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 2758aeed407..f28805d5e6b 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -1198,8 +1198,11 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
(string-to-number (shell-command-to-string "ioreg -c IOHIDSystem | perl -ane 'if (/Idle/) {$idle=(pop @F)/1000000000; print $idle; last}'")))
(defvar org-x11idle-exists-p
- ;; Check that x11idle exists
- (and (eq 0 (call-process-shell-command
+ ;; Check that x11idle exists. But don't do that on DOS/Windows,
+ ;; since the command definitely does NOT exist there, and invoking
+ ;; COMMAND.COM on MS-Windows is a bad idea -- it hangs.
+ (and (null (memq system-type '(windows-nt ms-dos)))
+ (eq 0 (call-process-shell-command
(format "command -v %s" org-clock-x11idle-program-name)))
;; Check that x11idle can retrieve the idle time
;; FIXME: Why "..-shell-command" rather than just `call-process'?