From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SD/1HrHONWKwEQEAgWs5BA (envelope-from ) for ; Sat, 19 Mar 2022 13:38:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id iKWrF7HONWIBDgAAG6o9tA (envelope-from ) for ; Sat, 19 Mar 2022 13:38:09 +0100 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 E518710129 for ; Sat, 19 Mar 2022 13:38:08 +0100 (CET) Received: from localhost ([::1]:57308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVYLP-0006M4-EN for larch@yhetil.org; Sat, 19 Mar 2022 08:38:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVYJT-0006LN-O0 for emacs-orgmode@gnu.org; Sat, 19 Mar 2022 08:36:10 -0400 Received: from [2a00:1450:4864:20::429] (port=44831 helo=mail-wr1-x429.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVYJO-0001jW-A5 for emacs-orgmode@gnu.org; Sat, 19 Mar 2022 08:36:06 -0400 Received: by mail-wr1-x429.google.com with SMTP id b19so14945677wrh.11 for ; Sat, 19 Mar 2022 05:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=TJX/p4/zFz1PKETEpciqmpRszApkUse5YZ6Hwl+c6og=; b=BIZBPLWzRAQJoyEU3FytZpMQHEsuIx0yNSfXP3LBtfWWFV95D5kmuGq+ac3A64OgLs Y3C6F+gI/mhdvmbAo9KO1SEm7nCsAG/xcJvy+49GUp0Khfu8j9/sisLehLxykSVCi6Zn PKHMOyFTE+u4G705DSQk+WquYYOyHhMETuAX/LgW7Bpv3Ln9SsYLidyFy4uSTrhx0fVA fE6unQIvGTxxmZHS/C32hgoMzrbrvyH3NUHjitXh8/UH+yEFv7tzK0e24BAK192wfbq1 ds+j57PI/vObRlg6ucZi4cm3CI62hKJFyj4nKw0SarSQ0tHJk6qKFnRzeERJ4hCbEppF ljqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=TJX/p4/zFz1PKETEpciqmpRszApkUse5YZ6Hwl+c6og=; b=YGMKWChPhFAoswFbU7cy9bzL31/dGgSo+4WCXPhGl+1qURzlnVawfaMcoooxv53Xpo Ym+UDDGrpuLsZVGNeEnxZcxMLwAeZ0riSIElI/+Uuym3aadtEuspFaDP2q4nBW7sBDcQ BiVF+4Hvu7bLFUR/2qobWv3adArkJPGSlw5Q4iFSvjdKMsB8ND/Sb6fXWaWLoDLraz1A VjZKIy8dx9DeXzkHyqz6VjK+yVfHA3LurEph4HiDzM9P4g0ce6abKyAX8FugwdJSYcLr TWNS2VlKoY2AaVepmM5AoySd3nKTVoSYhVgqFHzUCSMO18xU0Ha5FgRBuazzt7eNP/pq BV3Q== X-Gm-Message-State: AOAM533M/Hg09cx4z14qrUYFpJ851bIyPzaGzb8I9oI6shinjY4U6u6R 2RbqPktmwJN41aSDm2YJMk5+wbp3KN4= X-Google-Smtp-Source: ABdhPJzPL/i00eZrFxfHkzO0ANu4QbSHPjQWr4tZPe0ap89wYCpt4s4mIUftzRdtz3qOMxc7CIQbJw== X-Received: by 2002:adf:cc89:0:b0:203:f654:116a with SMTP id p9-20020adfcc89000000b00203f654116amr5972440wrj.320.1647693360079; Sat, 19 Mar 2022 05:36:00 -0700 (PDT) Received: from ARCH-RLS.gmail.com (2a01cb0890110e0095a3e704c498f8cb.ipv6.abo.wanadoo.fr. [2a01:cb08:9011:e00:95a3:e704:c498:f8cb]) by smtp.gmail.com with ESMTPSA id r9-20020a05600c35c900b0038c7626c454sm7031104wmq.12.2022.03.19.05.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Mar 2022 05:35:59 -0700 (PDT) References: <87sfrnqlbu.fsf@hotmail.com> <878rt6cjsa.fsf@gmail.com> User-agent: mu4e 1.6.10; emacs 27.2 From: =?utf-8?Q?Rom=C3=A9o?= La Spina To: Ignacio Casso Subject: Re: [BUG] Resolving idle clocks needs multiple keystrokes [9.5.2 (release_9.5.2-24-g668205 @ /home/ignacio/repos/emacs/lisp/org/)] Date: Sat, 19 Mar 2022 13:29:12 +0100 In-reply-to: Message-ID: <874k3uce6q.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::429 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=romeo.laspina1@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: emacs-orgmode@gnu.org 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=1647693489; 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=TJX/p4/zFz1PKETEpciqmpRszApkUse5YZ6Hwl+c6og=; b=KBaR4/mBXouGxyIAvOaY71iBSxk12zO9WaVbwfEYAsxojCX8ybbVMFNr1x8tLD8oztPGBD RCmqf+pS0/65GaxOkcuKFRuDq07B9TrJs/Vc5n+7/VRqtx3uffMryiCz8F0Mi5+3+DcF/K CZ+HLKzmhE4LcnhqNe707H9HVZtWJYDnzniTSoDgnA9J/SthqhGmtu+wUDYR5r8w9dLgtW RU1e/IGEprfRuRExYsQu5Jmh1rmdvox9M/t+i/1MQ8F4UwpWim0lS5Fj+cFKHW/JfNBA5U CZRNbFd5SLVu9sEE7+l3JHi4jILa6PRkIjnv8tykk9hg8h63YxRjExBuy05D0A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647693489; a=rsa-sha256; cv=none; b=rouQNwSrc0ZBBExg7Um/Dv1eARFFH1lAjaw2euXVO/VX/iiWCOpjx4f48pw9twbo3JONS/ lc8XZpdIVEW5tvRI/QstEgDHK3oQbbHaOXL8nuIbeqGRQVdXIWYrlMxIVWzT88WsQd+DyO Ydna6agiMQA+aRmcpZDX/FIuL8Iw8egImrN8dM5zwmuLYXE2lOP7EeNTiRRM/W4JLBOX2M FacQ6AiW0Jw4q3u1gbJSPPrCDsrVU5eRMvgVcD6WCQAmEj57fPtGs1nLKu8vWIx82Aah1k LoSyrMHoFxWJq1IxDdVCU7BDWT6PyUx54hwxaztwiYzCvnKFIc68wncHAhJm5Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=BIZBPLWz; 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: -4.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=BIZBPLWz; 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: E518710129 X-Spam-Score: -4.14 X-Migadu-Scanner: scn1.migadu.com X-TUID: MAR/VLHL9e7q Hmm, I see the problem. I didn't think about that. Thank you very much for your suggestion. But what about using read-char-exclusive? It seems to have a timeout argument too, and should apparently fix the issue (ie. the prompt will no longer disappear at the first unintentional click). Romeo Ignacio Casso writes: >> Hi, >> >> I don't know how closely it is related to your problem, but I've >> reported another issue revolving around the use of read-char for the >> prompt to resolve clocks. See >> [[https://lists.gnu.org/archive/html/emacs-orgmode/2022-02/msg00278.html]]. >> >> Unfortunately I an not advanced enough in Elisp to know whether using >> another function than read-char would solve your problem as well as >> mine (maybe read-char-choice waits for a valid char, while resetting >> the idle timer ?), but it might be a hint. What do you think ? > > The problem with `read-char-choice' is that it does not seem to have a > timeout argument. `read-char' has, and `org-clock-resolve' uses it to > update the prompt message with the current idle time every 45 seconds, > calling (read-char ... 45) in a loop until it returns non-nil. With > `read-char-choice' that would not be possible, and if > `org-clock-idle-time' was N, after the N idle minutes, the prompt would > appear saying something like "Emacs was idle for N minutes, what do you > want to do?", but M minutes later the message would still be the same > instead of replacing N with N+M. > > The patch I sent already fixes the bug I reported anyway. For yours, I > suggest just wrapping `read-char' in `condition-case', unless someone > knows of some other appropriate function.