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 eNoSJ3FOXGO1LAEAbAwnHQ (envelope-from ) for ; Fri, 28 Oct 2022 23:49:37 +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 wIs4JnFOXGN5EgAAG6o9tA (envelope-from ) for ; Fri, 28 Oct 2022 23:49:37 +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 57619E938 for ; Fri, 28 Oct 2022 23:49:37 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooXDd-0007C0-9r; Fri, 28 Oct 2022 17:48:50 -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 1ooXDZ-0007Bh-LO for emacs-orgmode@gnu.org; Fri, 28 Oct 2022 17:48:47 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooXDX-0000XT-7u for emacs-orgmode@gnu.org; Fri, 28 Oct 2022 17:48:44 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ooXDR-0002jI-U5 for emacs-orgmode@gnu.org; Fri, 28 Oct 2022 23:48:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Julien Cubizolles Subject: Re: org-x11idle-exists-p with emacs --daemon Date: Fri, 28 Oct 2022 23:48:24 +0200 Message-ID: <87wn8jsjpz.fsf@free.fr> References: <871qqs6gqs.fsf@free.fr> <87y1t0lgfo.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:75cOWebeaADLG6nY9zkAv9WBhz4= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666993777; 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:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+n9aq8odovdJ+twZRSjuPVnRwi5aAECzSpYXYUG/ei4=; b=CZX5TGlDEIWVI9eJ31zDCc4VxW3ru7B5lBnEVWbdYkydM0i3fTGRt3l+0RBU10dqh/7qAT s2GJadDh3uO5krCsXl3R0jYhWuxKoZnLB+r72P2uRHH5Eg29QnPDb0Nf8B/GH8ahuBbsU/ EHjDnp6USt4Wjo8WNTAMVJHYDuhclLuMDS+/ICZxDriqa2GmC7LiMuR6r6hob7iZNdRksx akZ/8/sd+wiwBzLas7C+NgkVe+NaEF5BK/MmJvKzca1IP9WQ+5qfMHIa7SHx7LMNC4Vx6b 4llKWHpo/FSYpmpSPpb3yu6Hv0oQUpOBNVv+OTSGKDAYNwg67rz2Az+97QtYkA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666993777; a=rsa-sha256; cv=none; b=tYWS3IwDP/TwBZ4vLFipmqfHa0TLm2FZeoiyCAu5imureEdH73jyIoGW4EvD8Q8wx9KNjc FtOcZ6+5juOiFs1RtOdGdwOUZoqzxcN7+cE/fXBYD8y+kPl6R5+MO5FTb616NUSnzRu6Q7 fWSwBWr1xhi03AyMLUe+8f9zuwWAj0vJlFwvtZjHjQb8gNNM4b9hOcf4QxNIvXfQqAhZp0 k8mD1npOw+g6Ely/QPi4UO+ucJ+PrCC5RBzKmgnBNxuW52BGptnJfZ8wGa6qQ9ltiuFohZ iN8IcB1OOj2DR3vS6GYQw74xx5teMxJKHtRb+iaJPWa7THY9RAf/sNO2tYJI1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=none); 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: 2.78 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=none); 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: 57619E938 X-Spam-Score: 2.78 X-Migadu-Scanner: scn1.migadu.com X-TUID: Z2dwWCcRDGr4 Ihor Radchenko writes: > Does the attached patch work for you? Yes it does, thanks. Also, org-user-idle-seconds uses (eq window-system 'x) which according to its docstring should be replaced by (display-graphic-p). I've tested the change and it's working, with the added advantage that it works both in a X11 and in a wayland session (provided your org-clock-x11idle-program-name works in both, mine does). There is another use of window-sytem in the org-mode source, namely in org-get-x-clipboard in org-compat.el, but I don't know if it's safe to make the switch there. -- Julien Cubizolles