forked from mirrors/org-mode
Backport commit 8b3baadf6 from Emacs
* lisp/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. Fix compilation of Org 9.6 on MS-Windows 8b3baadf671b7b3d5058808c4655eca8bd46015e Eli Zaretskii Thu Dec 1 14:40:47 2022 +0200
This commit is contained in:
parent
9b856c273f
commit
3159ea296f
|
@ -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}'")))
|
(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
|
(defvar org-x11idle-exists-p
|
||||||
;; Check that x11idle exists
|
;; Check that x11idle exists. But don't do that on DOS/Windows,
|
||||||
(and (eq 0 (call-process-shell-command
|
;; 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)))
|
(format "command -v %s" org-clock-x11idle-program-name)))
|
||||||
;; Check that x11idle can retrieve the idle time
|
;; Check that x11idle can retrieve the idle time
|
||||||
;; FIXME: Why "..-shell-command" rather than just `call-process'?
|
;; FIXME: Why "..-shell-command" rather than just `call-process'?
|
||||||
|
|
Loading…
Reference in New Issue