From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 KD8AIb2yLGKlwwAAgWs5BA (envelope-from ) for ; Sat, 12 Mar 2022 15:48:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cMadHL2yLGKkaQAAauVa8A (envelope-from ) for ; Sat, 12 Mar 2022 15:48:29 +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 17980C013 for ; Sat, 12 Mar 2022 15:48:28 +0100 (CET) Received: from localhost ([::1]:50088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nT32g-0000pC-SZ for larch@yhetil.org; Sat, 12 Mar 2022 09:48:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT320-0000oO-7H for emacs-orgmode@gnu.org; Sat, 12 Mar 2022 09:47:44 -0500 Received: from mail-oln040092066089.outbound.protection.outlook.com ([40.92.66.89]:29703 helo=EUR01-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT31y-00005V-3F for emacs-orgmode@gnu.org; Sat, 12 Mar 2022 09:47:43 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nu5vggOtc+jKKhrxNrUovqfTscsuo46Qqleb6sbnmLQlHIPe9eif8J2oKxhJT630SbS11QKMvgGJvLpOlKg9EUNdwVogcW3q6ySWQEs+yr+56/dTZt1eOf0lFjGSTYzmxYG01E/x4ev5sYqupXP6CzNVsfFXpf/AqUN86StKlgL5ZIVYsHOrk3QoIPVn7WnzyJLRF/R/QuzGzy7mrdmURgMpdrg14Mak9sEs2KF2D3x2FZXDJSPMuyIw4ahf3ta2r/W+n1h6fZX8HaQyC6+De1v8ZQgZqJ/R9WwR7wq4kCahJiqBe6JglaDQzXMsHuvEMKTtDK/1iHRuzu5Is+x/VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WBEHubJEYg0VtYg253UjR9dUV7ozonMBxNSSvimqgsg=; b=MGovKNsWTj7UTrcndGnABqmETlStYzD6tYZFdgz010KJzU5MBZOhioph6l1gcHh3vAfwkU07sVUOi/HIV5tiR9VXbwWGoWzuLSZ5m338K1AvV40Tg3X84jhUV1vud65O2wtky2U+arIiMijl5z/b19C7WfhYjzjfTyHlDQigpPz0FDcsh5U0EueXGMY4CWa/f6d5yWNkrHcGcjhQ72VOwnB2o3oR9sAuhr1zawzyXpy117ZwB6nUNxLz3QQH+8IxpH/E16F6BpyVqxm943S5y8cjCHhs3F7PFM9BuB876fN8LMLO/ayU4bXWHrFkui+OaNLvPyn0lMpqZkQbzm5bFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WBEHubJEYg0VtYg253UjR9dUV7ozonMBxNSSvimqgsg=; b=Y25CNEhrzQ3gttUk7/CW2SJhQ0DIbHDAomS58r82pi4KHfNjgcP2yYWJOkMpwszFaJZX0tWmXCZArmRnZq4tgAyC9DJKxBiKog4jxtaAkr840IEl5xxhLG8ocWeIf25hqnp/FJvPIIsTNzNCsQT8bH+LMZr0gZ1lEG6WroVswdJFUdgbbTdB/HVssebScTlh2J/eFljMnlfiLzJASRvr51b2G2KldhO/G3xGInqyf4O9Wo1zKZBCZzIlKSI9Y4W1Vt0NeocQzqYHHb5+nhg00AVpYDtrTLO1uPNapmyWVJsi5K3wgcyn/VEWjjp3boVzhT8pSUGN6JyColMHwv5Mjw== Received: from PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) by AM8PR06MB7699.eurprd06.prod.outlook.com (2603:10a6:20b:357::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.22; Sat, 12 Mar 2022 14:47:39 +0000 Received: from PAXPR06MB7760.eurprd06.prod.outlook.com ([fe80::e05a:8d81:8648:b10f]) by PAXPR06MB7760.eurprd06.prod.outlook.com ([fe80::e05a:8d81:8648:b10f%9]) with mapi id 15.20.5061.025; Sat, 12 Mar 2022 14:47:39 +0000 User-agent: mu4e 1.6.10; emacs 29.0.50 From: Ignacio Casso To: emacs-orgmode@gnu.org Subject: [BUG] Resolving idle clocks needs multiple keystrokes [9.5.2 (release_9.5.2-24-g668205 @ /home/ignacio/repos/emacs/lisp/org/)] Date: Sat, 12 Mar 2022 12:07:09 +0100 Message-ID: Content-Type: text/plain X-TMN: [3akaUeJNJ7+cfT7gDk2MZMR216yHX343] X-ClientProxiedBy: MR1P264CA0042.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:3e::23) To PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) X-Microsoft-Original-Message-ID: <87sfrnqlbu.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 26e41197-5670-4442-323a-08da0437416e X-MS-TrafficTypeDiagnostic: AM8PR06MB7699:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D1B4sXYkTCQq7UYH/gyp0tDfvA9zlMIG4RwuIA5AOzCh2xv8/76RXK0k5XKVJ8PqLgraWoSIEVTrHjV0SYuXk+VJf6qqR+e2x6T+aI4S0mOVbIvfmDZ4zu3LTYPCKnx2Cqcz8kgJFbYH4hvNN2aao9KPWBU1QQVxsaHXgHMcGCPzVDnQ7uSmsMhe59gKjp6VYrd3Q5eJ2sOMfdMnlwrEm3YeEsgPYtkPSZNZB48nfzWRLpsxBX02HrRsGT5J7O9dprQZF9cLO+ZxxMouQnlgRTyfsFnb4ogT5TWDqeOwWcAt9+QVdE2Y38W7/layO2cgQ5evJBfCYa6ZXrlZSlH82Lqgz9mCEiiiSGhAOmcaXBedpnr3EZVUihuGYSmSWfwUg4fhFwAc3HN1KYz0ZFaCTUS1wD8poj+RCMQmqHuLdKbqLzxPeP1Ssul0WYwKT+Lb6etwqvyp3pzmeBDQ5gQaF4PpE2DtvUMNS1QIP31N+uEY+3yOV7qWKNyEwU6lQA9YkLaMjnCJhIPK5n1XJ3Whkko+irRG5a8EkzurZcqVOXlsEdZnR7XsbbXeclx7yskP8PAPjYyhhxD9t3Pt4HXyYevcsaxr8qZep6SyloqRfGnxmDngegCOg1BGzbrGVxMWMZidPiwwBcbBg2MaPw/M9KJf4LAxy6SGBcskLOJ57oI= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ZOWJQMj6YaxiP742hIdkh5Qo4NrE2Q9FQAoWHsP4KtHE5L/G1qX6h4fnxCJ2?= =?us-ascii?Q?8wuOEaINE400fpq/fv5tsm/dsz0CZ1YJI6o46eqS5p/rSXJMoVxgwkvGLT7O?= =?us-ascii?Q?VK/lL2EUOV8D5jdpzXVPu1s8ySiebboBqdxH/dg1S6h3RyANwk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nfQHnZf2wsx3vRKj2SIfeF+rfF+fMQK1sGm/5yEW92eSUC9PK8GMwe?= =?us-ascii?Q?SclU01PklcWiAdug4yh7e2Eo3tkvKxaVprqdVspXraMOWKN4rwgu63m67sZf?= =?us-ascii?Q?ezZX3TWVB3/wQvWDM1Z+azKJSge3pjT+PFuC9K3PWpes1Jt3kV10V7Q=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-6e454.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 26e41197-5670-4442-323a-08da0437416e X-MS-Exchange-CrossTenant-AuthSource: PAXPR06MB7760.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2022 14:47:39.7236 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR06MB7699 Received-SPF: pass client-ip=40.92.66.89; envelope-from=ignaciocasso@hotmail.com; helo=EUR01-VE1-obe.outbound.protection.outlook.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: , 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647096508; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=WBEHubJEYg0VtYg253UjR9dUV7ozonMBxNSSvimqgsg=; b=W/K680kXTZ1yECza1FIanIWsdNjATEfncGCVMv92ZUS30xZs2ceVURhJoR/1n3GVFwTg4U VCfB46e/fucMjMbOfzIF28FQYMrmlMsVM5IEBLYKJM8X+OqyfW5fy0mcHv6GxEIWm5CX5k eRbKLhjHZLa2O/JM1YNgdU6/h7WgIZiDxo+OCc6GkGePzzu1y37yMEkDj5eYYYn+1OzePj SrLWDAm8omRrQd8r14oKtfJz17TuY1C5GgtshJQAoDyOrwPXEvJCWxF1hMiPx4jKbnN5DO 9VujIYbJOHOv2yMJOhC4FoDyxJPzSugJu8EO5eXsAJ3rCwb+MQem1VMmi56QEQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1647096508; a=rsa-sha256; cv=pass; b=nCWRJpLkGvr9/PIbW4rZ+jcvR0SUSRC5H5+/FO53CmFWg79zOFDM7jnULyt52qftcFEz1e pD3e710LSv/EwWVzaIpFX/DK8cicRiO0kHcJOGIO5oOuojKbjztUbe2Go1UOPbGZFJNCzi 0/hWCSHN/Jz9hCOzwMGoCcsxogaJkxo3jd7C3FQ2A2BGVLKSZwlOCiUpIG6oC6ftR5MmWH Au7H4RKBVMa01XEE8LiZWYT6SHzitXOzy9C9QmufR6DJhLw9kHm5q2aKhY5KxBpIGBS73+ P3lLWW+UuLF6BwFTI3/RZHNnpavhqwsHtiwFh2s5uohZuf0XjpcxOe7OhkZcTQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=hotmail.com header.s=selector1 header.b=Y25CNEhr; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.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: -10.99 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=hotmail.com header.s=selector1 header.b=Y25CNEhr; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.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: 17980C013 X-Spam-Score: -10.99 X-Migadu-Scanner: scn0.migadu.com X-TUID: Z1nRgsxdoxJn Hello, > CONTEXT: When I'm idling with the clock running, Org asks if I want > to resolve the clock when I come back (this is by setting > org-clock-idle-time). > > PROBLEM: I'm not sure how recent the change was, but Org started > asking me _multiple times_ what I want to do when back. I have this problem, already reported but not solved in these threads and maybe others: https://lists.gnu.org/archive/html/emacs-orgmode/2019-02/msg00333.html, https://lists.gnu.org/archive/html/emacs-orgmode/2010-08/msg00188.html. I have investigated a little and it seems that there is a timer that calls org-resolve-clocks-if-idle every minute, and if (org-user-idle-seconds) is greater than 60*org-clock-idle-time, that function prompts the user to resolve the clock. The problem is that this prompt blocks Emacs, and if you are idle (org-clock-idle-time + N) minutes, the other N scheduled calls to org-resolve-clocks-if-idle occur immediately after answering the prompt. But for some reason (a bug?), answering the prompt does not affect (org-user-idle-seconds), so the prompt appears again, and you have to answer it N times (unless your answer was to cancel the clock or clock out). So the problem is in (org-user-idle-seconds), which in my window system boils down to a call to (current-idle-time). It should return 0 after answering the prompt, but in my system it keeps counting up. At this point I stopped investigating since that function is defined in C. Since this bug is already old and I have not found much information about it, I assume that in most systems answering the prompt does reset the idle timer and this bug does not occur. As a quick fix for those systems where this is an issue, we could reset the idle timer ourselves after the prompt in org-resolve-clocks-if-idle. What do yo think? Emacs : GNU Emacs 29.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2022-03-11 Package: Org mode version 9.5.2 (release_9.5.2-24-g668205 @ /home/ignacio/repos/emacs/lisp/org/)