From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sabXMQWWXGPLeQAAbAwnHQ (envelope-from ) for ; Sat, 29 Oct 2022 04:55:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qDUFMQWWXGPycwEA9RJhRA (envelope-from ) for ; Sat, 29 Oct 2022 04:55:01 +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 7C2F546C16 for ; Sat, 29 Oct 2022 04:55:01 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oobzF-0004nO-KY; Fri, 28 Oct 2022 22:54:17 -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 1oobzD-0004nE-Uu for emacs-orgmode@gnu.org; Fri, 28 Oct 2022 22:54:15 -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 1oobzA-0002Yn-VK for emacs-orgmode@gnu.org; Fri, 28 Oct 2022 22:54:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 34F6E240026 for ; Sat, 29 Oct 2022 04:54:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667012050; bh=6ub8bcYWCy+PGbQunyHQmCEv7vrbPcerDMOcF6xDHXk=; h=From:To:Cc:Subject:Date:From; b=Jz8NnNLo6Ly8D1jJjLgKAg4VH1DQHFJBnswNaqVZgP8lLSHsw1xnOYyBWqSTymCE5 pgSpOc2hl2Ebfga1FEvoUqX2PQX/piqsnZ0V9SGzU2WJ4z7cA7WDayRybhxi6viEjj tUKlt2SBXJ70NeU5jqcBqQ70K7e5Fcc4ecDiJUltnjW5pHWcleY7i0KdTQbTCPqWHt 9oh+OEJ037NyjNNQ3xs50z99hVTwRQi7LBdlf4EPb83gJf0Hhhh0A5wePTH4t7Z59b 97KUEcZgTR0Y5aIPWhG8+lRLgA2ClZ4c69kneLuC9Fh5rRmlIBuwsIQS9k16efXuOw zZbdC4DjqePtw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MzkX10Kwwz6tmW; Sat, 29 Oct 2022 04:54:08 +0200 (CEST) From: Ihor Radchenko To: Julien Cubizolles Cc: emacs-orgmode@gnu.org Subject: Re: org-x11idle-exists-p with emacs --daemon In-Reply-To: <87wn8jsjpz.fsf@free.fr> References: <871qqs6gqs.fsf@free.fr> <87y1t0lgfo.fsf@localhost> <87wn8jsjpz.fsf@free.fr> Date: Sat, 29 Oct 2022 02:54:52 +0000 Message-ID: <87edurl4oz.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: -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, 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: , 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=1667012101; 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=jV6pgs/7kCBduYL1urzNqZ1kK49m4lBSyaii4SBUA+A=; b=CHexEYtPzdi9jqLbIl+Vae0T8SypzDOvaveU945Q2r6NDIH35lJgZJtbQ3V60ozDZPFvkd a5RJabpAYZ4ovFDDmW+lWfB2LstGYB/FWIvEYN+hbFWfdV2wFPTDNrfD5KotAqP+qWUe2g nltUiBMHIHnD4/jOV5P751zCwwwhv2ekZ7lcWlL55TEplxwlpinmcNCKro5taXbJBDJyCj 00o1VZDspCrpjRjy8EyquIwXdJ37adeNy6lmnXOkpZ0pZ0fpI1BX4VYdtU2bXhBey5a/R3 ZxCyLMS9LNZodYwaaRwBDZF4hX+zjCHJdJpZ3UEkSMP1UhOrQBzM6hcQwprfJQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667012101; a=rsa-sha256; cv=none; b=ajLKIBsMUyA9shT99h/4/mBXSrrhjV094/LfA3/8831mY4CDAIhzDnJ4HfAFlbd3/pyJQQ q3k29SLch0REeBvcs7J7p5hcSCWINsiQhi1IpHqy2fprQ7ZuWexknSQ+LaXUq13jULHD46 j2d2WdyV3AZW3GkOrskk58uZqUDv5ba+l05dCavMlMkX+TuV8PwRWfgpzGBUXBHVTbnP41 xGyKwlpv3wE0R8MF8mEbqCUhYPcSSU76tc8QHJaxzefqVPatsD23YOcEjl8f4fTDW94QY1 xGPh3eIn66rT4lJLQ3Hpp9h/3AHT1oRu7GYbosSWUvGEvVqrZ1lj9pohgAH15g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Jz8NnNLo; dmarc=pass (policy=none) header.from=posteo.net; 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.43 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Jz8NnNLo; dmarc=pass (policy=none) header.from=posteo.net; 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: 7C2F546C16 X-Spam-Score: -5.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: ahrqEJ8LPV1m Julien Cubizolles writes: > Ihor Radchenko writes: > >> Does the attached patch work for you? > > Yes it does, thanks. Thanks for testing! Applied onto main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a51bb2c448bab7665667471aa227e3e25dbbdced > Also, org-user-idle-seconds uses (eq window-system 'x) which according > to its docstring should be replaced by (display-graphic-p). I do not think so. org-user-idle-seconds is not about graphics, but about the window system being used. Now, we have special handling for Mac and X11 and fall back to universally working, though not accurate, `org-emacs-idle-seconds'. > 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). Is there a way to detect wayland build? Does window-system have any special value on the gtk build? If yes, we can introduce wayland-specific variable. > 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. AFAIR, clipboard in Wayland is not the same as in X and might have bugs https://orgmode.org/list/1902025.jDVfpnRRgo@pluto I am not sure if `gui-get-selection' is going to work on Wayland. The docstring says: Return the value of an X Windows selection. Wayland is not X Windows... -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at