From: Ihor Radchenko <yantar92@posteo.net>
To: Vladimir Nikishkin <lockywolf@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-clock-auto-clockout does not actually use x11idle on X11 [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)]
Date: Sun, 15 Oct 2023 08:26:29 +0000 [thread overview]
Message-ID: <875y38b8ay.fsf@localhost> (raw)
In-Reply-To: <87ttqv6l2g.fsf@laptop.lockywolf.net>
Vladimir Nikishkin <lockywolf@gmail.com> writes:
> For some time I have been wondering why auto-clockout does not use
> x11idle on my machine.
> ...
> or, even better:
>
> #+begin_src elisp
> (defun org-clock-auto-clockout-maybe ()
> (if (< org-clock-auto-clockout-timer (if org-x11idle-exists-p
> (org-x11-idle-seconds)
> (current-idle-time)))))
> (defun org-clock-auto-clockout-insinuate ()
> "Set up hook for auto clocking out when Emacs is idle.
> See `org-clock-auto-clockout-timer'.
>
> This function is meant to be added to the user configuration."
> (require 'org-clock)
> (add-hook 'org-clock-in-hook #'org-clock-auto-clockout-maybe t)
> (add-hook 'org-clock-out-hook (lambda ()
> (cancel-function-timers 'org-clock-auto-clockout-maybe))))
> #+end_src
Makes sense.
Would you be interested to submit a patch?
See https://orgmode.org/worg/org-contribute.html
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2023-10-15 8:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 7:02 [BUG] org-clock-auto-clockout does not actually use x11idle on X11 [9.6.8 (release_9.6.8-3-g21171d @ /usr/share/emacs/30.0.50/lisp/org/)] Vladimir Nikishkin
2023-10-15 8:26 ` Ihor Radchenko [this message]
2023-12-04 13:53 ` Ihor Radchenko
2023-12-15 11:28 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875y38b8ay.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=lockywolf@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).