From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id SFkbEQmiK2VkyAAA9RJhRA:P1 (envelope-from ) for ; Sun, 15 Oct 2023 10:25:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SFkbEQmiK2VkyAAA9RJhRA (envelope-from ) for ; Sun, 15 Oct 2023 10:25:45 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D4A1062B3E for ; Sun, 15 Oct 2023 10:25:44 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=NYhwRZwc; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697358345; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=r2vMsSZlEfOQCSO9u3pXgcQfp2KaRz79CvvIyKVZwAI=; b=oT+AiB0WAMTZ9Atq9c8WxLHQpQxQa2lRNp9wIq4iW/mykJQZrpAmQlaR030bSMBUzjb8eB jGa8Imkjr9Hn9a1cK0wN4jB7KsRdGhiuqxUklyT9Z5ZH9GSk1xHrv4HVkidRha0Pl+v0Eo /WDVbhK2DzGBmi0If4PeWeR62uV9lOhAj+bYtkqKOQV0dtxXUyIYscxoroOYSh7v6M/RDL 0/f10nBFfFnvDhotk49J6bdFY2miMdAte2ypKWDSQAbFyCyL7nL6g052qrNguVzIoKZuR1 nOb5eUhQAm6BrgjVjOesbfvSTkjRyNPxGN7WsIssmNnkN9hH32MZsPPBzBhmmA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697358345; a=rsa-sha256; cv=none; b=Eo8eO/wlFsdW2Wg78IjWCRfyPtjcnRekyzPS/mgHczBAdH4F5LYkwgusIrZPSVoLzTmVUN C2BXgsptKo3kK5oOnAGYJ2b9WdNdpINvcAQfCge/l9dtSaNSLDx+6sQPkyWiKI62QgTeIA mv4KfnpdKkwNMjH/YBO2obBFfKKei72g4biuqu7Urs1kqyPGN0EzyBp4A+UIUU72EAUzBm tNrJDpDyd2kCGsGak61fLs6Ng35UJcs1c7rnMZ8KP/VMhdCuE7rc4n9Ppz4twuBTeN1jJT JoZEPiHNcAKyxyccic1HQe8kGi7z1fXz21NNtWj52v/RL4UIj3X5TVXEC/MDVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=NYhwRZwc; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrwQa-0001Jv-T6; Sun, 15 Oct 2023 04:24:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrwQY-0001JR-Uz for emacs-orgmode@gnu.org; Sun, 15 Oct 2023 04:24:46 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrwQX-0006Sp-1L for emacs-orgmode@gnu.org; Sun, 15 Oct 2023 04:24:46 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E031E240028 for ; Sun, 15 Oct 2023 10:24:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697358281; bh=4g/+t+j0q+QUgafi9v5RRXZA/O/gP+vMTdiuR6wz26I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=NYhwRZwc9k+NFzpm62kqFNn+3OL9i7vzPaOHHxcgTIbG7NsNml+4uEnGpcEX/ZQwS IB5mqIgAyVksmgGahmZ7NX2bnRkAs/Kgoa/qdEG+LYlTcx8C2LjcHhmvq+mePR4EiM 2kusON5ncD690R9/6cm7VtYCN55x8mRnzFjCLI2yJjJLLe1ZUv5P5hTJZhcyXt/Ri/ mZIzxoVtbpXhXWhFFvLwPpBOaPdWJOCeqPQb3PAim4yaTRev+8tgGmwcqozcvAvvFI qFQKJMbkY201ZfLWm3ajn6YPob4U70SAQiLmnu+CqmcVlHN3FWA+DFNZvZJ9DDSD1T VSy07YNJY2rmQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S7YFP2xq4z9rxQ; Sun, 15 Oct 2023 10:24:41 +0200 (CEST) From: Ihor Radchenko To: Vladimir Nikishkin 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/)] In-Reply-To: <87ttqv6l2g.fsf@laptop.lockywolf.net> References: <87ttqv6l2g.fsf@laptop.lockywolf.net> Date: Sun, 15 Oct 2023 08:26:29 +0000 Message-ID: <875y38b8ay.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -6.70 X-Migadu-Queue-Id: D4A1062B3E X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.70 X-TUID: 7pR6PkMDaoHp Vladimir Nikishkin 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 . Support Org development at , or support my work at