From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oNY7Ao7PjWIXoAAAbAwnHQ (envelope-from ) for ; Wed, 25 May 2022 08:41:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WFNEAY7PjWJUIwAAG6o9tA (envelope-from ) for ; Wed, 25 May 2022 08:41:18 +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 BC961233A7 for ; Wed, 25 May 2022 08:41:17 +0200 (CEST) Received: from localhost ([::1]:56372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntkho-0004Qd-IG for larch@yhetil.org; Wed, 25 May 2022 02:41:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntkeZ-0004M8-0T for emacs-orgmode@gnu.org; Wed, 25 May 2022 02:37:55 -0400 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]:36887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntkeX-0004cP-EQ for emacs-orgmode@gnu.org; Wed, 25 May 2022 02:37:54 -0400 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-f2c8c0d5bdso129986fac.4 for ; Tue, 24 May 2022 23:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=ejLnLvzSPIImheqabGZtBbzPKEtwH0kezqqrovGgIS4=; b=M5irrdNabMYoNGdXeZes/adzPbkB9yM4MWIn5foInf34xz6xF0TuLLbzIxdXZfDNKb C07wO29CPFM3Rau4LpPIyuz/YUaQSpmZOl+amqlNY4n4MgjpGvpWeykjVs8xGbqnq9tu gjGCH6cwLvqK/zEin6Y1s0RCjRPQf4AUgvtqQOWxzGaxmvXrcuHoBkx5dhYnPvZ4TaZE xDExN9x6JriiLJXJVQ2bNRXYNpocKdEa38kfulmJ/bV3grqLUzLEgREZWw1ggcFuJDhj QH+6rgYfdLqav19G1nyAkV/4gwsHNMYpcpOf+j/DlXAMU3JGBLft4A6QUuMSU7DXywCs vsDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=ejLnLvzSPIImheqabGZtBbzPKEtwH0kezqqrovGgIS4=; b=sxlNs8dqyOvC+pC8DM0vyDqFCgV9p4lGgdNNrWSCVJb0/A6e/Yun/oz84ggm5W2dlf TH20hv1NRdcd/SlCWcRvdujHKEk325rmAFL62sjK/zz/4uwTK8xkaPGDBbZMYEOfF6PI 6+or8d0ZBQAQypj/Ap6bcWZtV3EPfZBGmUIhkGI4ex7KUeH2zFIUuz7CS+wbGpo9kHqS VB73UDytBSBpR5jrgFVme3FmIfHm3zKqNPER6Iff1uRMgo3yZp90SzHpqVSsnU7XdFwj jGqscLFqK5RUGgN4Qxmo4kMIm+P+QP9+09GIBzDZZUViXyp8RTNzsucY2qc5hEpDqV3U CBQg== X-Gm-Message-State: AOAM532d93w/OSmZXKmgx0WcVLsIrwqS1SUI/tyYF0evJZG4kzCxSlSo zH/HM8M/3jnTfza1PoI16s8= X-Google-Smtp-Source: ABdhPJw6p5XkL92mWBLgpOw4zsNGasvSEa2EZ4pgYBv9dKiLEFwcF8tTgtWxXN01bQAnzHQR4SZhJw== X-Received: by 2002:a05:6870:51cd:b0:e6:589e:1ec6 with SMTP id b13-20020a05687051cd00b000e6589e1ec6mr4776391oaj.207.1653460671214; Tue, 24 May 2022 23:37:51 -0700 (PDT) Received: from localhost ([207.126.91.4]) by smtp.gmail.com with ESMTPSA id f193-20020a4a58ca000000b0035ec65ac944sm6447888oob.16.2022.05.24.23.37.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 23:37:50 -0700 (PDT) From: Ihor Radchenko To: Julien Cubizolles Cc: emacs-orgmode@gnu.org Subject: Re: org-clock idle time in pgtk Emacs In-Reply-To: <875ylvnxf9.fsf@free.fr> References: <875ylvnxf9.fsf@free.fr> X-Woof-Patch: confirmed Date: Wed, 25 May 2022 14:38:33 +0800 Message-ID: <87wnea15hy.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:4860:4864:20::35; envelope-from=yantar92@gmail.com; helo=mail-oa1-x35.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653460877; 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=ejLnLvzSPIImheqabGZtBbzPKEtwH0kezqqrovGgIS4=; b=KLVzNHVCaXQwkmAyOf2EBBQ0GXOuAT0AiQMhgKv80hlRRhxITomESVOBsxUiHtAZLfW4YN u5tNuSYq8nZV+x4Lglha4YbevJA2PNol+ItzHka27ggk6mVP3pmcq03F4w3ZM4Z7ZU6V9K s676NU/1jrC9KaXUyU0FREi9SAgEOwpqSHLZs+Pay7gw6XOnRIxX26ZcAds32ymLc2sIV1 krkKjfWQ7REeT/fWCpk+rDXiXY3rDHNOcNzXZDTNK8YMP9jyRpvWRQUQBzxHyUasBXVIG1 WVSr0zxtTFm0hKcPdK8f4qTuadZ16DL8b5boeh8U+nrS5uLuj0U0Tu4i2dkmfw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653460877; a=rsa-sha256; cv=none; b=gT6DA10dnr+QV3QuEKrOhA7sCBQlyIgLE90NFJJJNoMEar3X8H5B5tZvRHto8fBqUyXLGq QNDHJxoY3HzHsZjDyk/x6M8Ax64I6Qsb5EM1S/8LAU2x3EIiRGr//t9qW+ar8YK1k3oOy4 +xLW9MEJmWa3Cs996vJLvI/opojiS9zRsxRRC9AdWXRbwFxF3QsTjp931QGm0MqPnL7Y8f HhmIGSOsOHJ7eSeA0Qa3PuedPfLa/fApyAsFtLCHR0ey2pGL1obJsLVw846lTzDYaViCsU M/U6ooIj0hZ6D/eq3PaBQHJvjKqad3C0YiF9aHUvc7yZVmoA6oE2CGE14/VeFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=M5irrdNa; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -5.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=M5irrdNa; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: BC961233A7 X-Spam-Score: -5.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: lnlidwwj7ceb Julien Cubizolles writes: > org-clock checks for the 'x window-system in order to use the program > set up by org-clock-x11idle-program-name. Recent Emacs versions use the > 'pgtk instead of 'x and as such will default to using > org-emacs-idle-seconds in org-user-idle-seconds. > > The following patch provides a crude workaround. > > I'm using a python program (included below) to report idletime in > wayland, using the idle-time module. It can be used for > org-clock-x11idle-program-name. Thanks for the patch! As Tim pointed out, we cannot guarantee that things working on 'x build will also work on 'pgtk. Instead of abusing settings for 'x window system, can you please introduce a new function org-pgtk-idle-seconds using a new variable org-clock-pgtkidle-program-name, similar to org-x11-idle-seconds, and then update org-user-idle-seconds? Please, make sure that the pgtk option works on Wayland as well (or not, but we will then need to wait until someone tests the patch on Wayland). Best, Ihor