From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KONXAcauq2DgZwEAgWs5BA (envelope-from ) for ; Mon, 24 May 2021 15:48:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id EFaxOMWuq2BbBgAA1q6Kng (envelope-from ) for ; Mon, 24 May 2021 13:48:53 +0000 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 44BA41D763 for ; Mon, 24 May 2021 15:48:53 +0200 (CEST) Received: from localhost ([::1]:32908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llAws-0001o4-Lx for larch@yhetil.org; Mon, 24 May 2021 09:48:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llAwS-0001nt-5z for emacs-orgmode@gnu.org; Mon, 24 May 2021 09:48:24 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:56021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llAwP-0002cI-OO for emacs-orgmode@gnu.org; Mon, 24 May 2021 09:48:23 -0400 Received: by mail-pj1-x102d.google.com with SMTP id kr9so6787985pjb.5 for ; Mon, 24 May 2021 06:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=QS7xyMBj7tYBG+4iNO999zFCbW+c+oruJigVHtPHRbM=; b=LW256XpdlBv6o7YKgieAz7enV9CcY+gmGj6O88NqVxLnJ5MgURQzXLqrxBiWaIduGK 1WafKSfEGjiPH/Jc3FbUoxrO5XO0XyiPZLk8t3FVxPsJ/ihkk+lwfOdnTCD+y6LZ8yht LPr+mC9GqRiArSe3ZGODpZfo5DewRm0Tq5jnUUwUy1Q9/3BZqX+ZNsXADWbxU8Hry5cu R0YZ5zbs/VSZ/f/oRnLyoGttiu9IuzutLGPkjWMp1I6R9N7fvbDqvf9TBFAEHnBIIRay hHeJwDfogGPgWVQmmI6LzMvvuHBdnJjXXSRCxBVEQR5IxVgrrj8evkglnCnMWtrSjPL3 COiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=QS7xyMBj7tYBG+4iNO999zFCbW+c+oruJigVHtPHRbM=; b=ibwtfSY7PC4y8iaRqop4KNUHPsVThECR6KSNW3J01hH2hU80cE+6Di0YVadiM9IA2R IQ6o5Iiaj5LOBG1ef5fBYmjilMxjoTU0Na3+iG/XmAO7HHGsB3TZ5Er3MxCUPKlpTdHL a8wQkygeCd170CD2XeW2/NZRQyZ9xPQ18plF2bP0L0SLYheRTZQe9uC2AJvBLmNidbox ig7OFBCl5gPamGq0mAZpoeKZhubE8ARNkQ1KDLfvO37lur4fyZJOZKwbsgGf+SdBSo9N 7G5v7zZ13cf1fR4dL2e/7SmCbZvfU9jBnu6CfAbA5TlYlXhb/aplw/4WNP5FNxdWmxp2 t5RA== X-Gm-Message-State: AOAM533YI2n9I0Bu536b1Cwv4DI/5u3J8+w3iL1EFOV/l8owGZopmf50 vpOHpuI6FYh7WH9RmdmFVWvtAg7Mvus= X-Google-Smtp-Source: ABdhPJw+UZX9lgqukQsHUb/9YUCkmgRzceyw5ymG/IzWcEnGpAr0j7WNXQvoAOsGX6WP5v6RiF1rKQ== X-Received: by 2002:a17:902:ed95:b029:ee:aa46:547a with SMTP id e21-20020a170902ed95b02900eeaa46547amr25823323plj.27.1621864099697; Mon, 24 May 2021 06:48:19 -0700 (PDT) Received: from tim-desktop (220-235-11-224.dyn.iinet.net.au. [220.235.11.224]) by smtp.gmail.com with ESMTPSA id z7sm554989pgr.28.2021.05.24.06.48.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 06:48:19 -0700 (PDT) References: <87r1hw37g4.fsf@free.fr> User-agent: mu4e 1.5.13; emacs 27.2.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: reevaluating org-x11idle-exists-p with new org-clock-x11idle-program-name Date: Mon, 24 May 2021 23:37:10 +1000 In-reply-to: <87r1hw37g4.fsf@free.fr> Message-ID: <87r1hw5jkx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621864133; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=QS7xyMBj7tYBG+4iNO999zFCbW+c+oruJigVHtPHRbM=; b=plFaTX6TI/vxqh1CAq1GrRbFFwplOuj0qqogP5HREGKnvMuHo+XzX41ff/32gdiNM12bni i7kmUvbXzDFjjYRhKCwvt4FcuYFgD83z4vqHRjXQdF5yXUxsVQfD2e0jeozzmtagL3in+A okn60ZmIIpMGTkBAvQmCEFFM9n9Bc53mjiruvHa8RkaRobAfAhDTzE+ngpsZhjfpKWlwVg eLMHOCOtp3SuhEY0LhQg3HoiL19J42B75RN8X3mkY3Zf5jhqE0lwlV5AbgPI9CwuxCvvHl Lj97UMoLvDWlSr879jXXObWmEs3lZgWbuVXw3cRZ7ZkL4DX/jhjlSkSA2TXvXA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621864133; a=rsa-sha256; cv=none; b=D0hNHP2R8Y7XWRWCRUmoYK9nn7XN055d5qK8NjqrG0zgqFcW+BfsG0TJfpYLthKyRvZBAL Ejs/ULmT5gnSazDMH82k/kow90Ags1p6V6E2nnbukL7C9++rvkf9Ku9klUWoCH6r8+G+wI oKU1Ro7ftgznlMNJCkwDf6BE4CA0iE7l9z8MmcpU/D3+TkkYIvQC6YeO8TQQY89yZGmgn1 MeXwuOv8iNAnSRrICLbWcWV/Ks2I3NQPmlicuGW3YOKPHwUCO0JGaz3UANhAuOs+RVtJL8 mf62kKncPozhW9iwLggTu4uPMAiLZS6oS+RDWkdnbCYOwfmoNJb0L/1RUOZ+3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LW256Xpd; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.63 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LW256Xpd; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 44BA41D763 X-Spam-Score: -1.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: YieJChtNUOks Julien Cubizolles 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