Fix org-clock evaluation startup hang on Windows
commit4f5bd2522eefb668c75dbc59c141917b07dd849c
authorStuart Hickinbottom <stuart@hickinbottom.com>
Wed, 29 Aug 2012 11:25:39 +0000 (29 12:25 +0100)
committerBastien Guerry <bzg@altern.org>
Wed, 29 Aug 2012 17:41:14 +0000 (29 19:41 +0200)
treec4819db7f7f45273b54b1dac07a0175552f26254
parent0455cc2084d47e2e016e1b7d1d676d4fb2a5a0b5
Fix org-clock evaluation startup hang on Windows

* lisp/org-clock.el (org-x11idle-exists-p): Only shell out when running
on X.

The definition of this variable currently executes "command" via the
shell during evaluation, irrespective of the platform on which
Org-mode is running. Unfortunately, on Windows, this matches the
"command.com" NT Virtual DOS Machine executable and so this gets
launched, but this is a shell and therefore sits there waiting for
user input and never returns. The net result is that Emacs will hang
on Windows when evaluating org-clock.el with the ntdvm.exe process
spinning at 100%.

The simple fix is to check that the platform is X before trying to
deal with the "x11idle" external process.

TINYCHANGE
lisp/org-clock.el