emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reevaluating org-x11idle-exists-p with new org-clock-x11idle-program


From: Tim Cross
Subject: Re: reevaluating org-x11idle-exists-p with new org-clock-x11idle-program-name
Date: Mon, 24 May 2021 23:37:10 +1000
User-agent: mu4e 1.5.13; emacs 27.2.50

Julien Cubizolles <j.cubizolles@free.fr> writes:

> I'm using a custom python program to display x11 idle time. I've set
> org-clock-x11idle-program-name accordingly but org-x11idle-exists-p is
> still nil. I'm guessing it's defvar'ed in org-clock.el before
> org-clock-x11idle-program-name is set. Evaluating the defvar of
> org-x11idle-exists-p afterwards indeed sets it to t.
>
> I could do (setq org-x11idle-exists-p t) but there must be a better way
> to handle the definition of a new org-clock-x11idle-program-name.

How are you setting org-clock-x11idle-program-name? In your init file or
via custom? 

Looking at the code, I would expect that provided
org-clock-x11idle-program-name is set before you load org-clock.el, it
should 'just work'. I think your right in your assumption it is not set
before org-clock.el is loaded. The question is why is org-clock.el being
loaded before you have set the program name?

There are a few possible reasons, depending on whether your setting the
program name with a setq in your init file, setting it via custom and
whether you have altered when custom settings are loaded or where in
your init file you load org.

I would probably just put a (setq org-clock-x11idele-program-name ...)
early in your init file to ensure it is set before org is loaded and all
should then work. 


--
Tim Cross



reply via email to

[Prev in Thread] Current Thread [Next in Thread]