From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0KRIAdZZg2fuQAEA62LTzQ:P1 (envelope-from ) for ; Sun, 12 Jan 2025 05:57:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0KRIAdZZg2fuQAEA62LTzQ (envelope-from ) for ; Sun, 12 Jan 2025 06:57:42 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=berkeley.edu header.s=google header.b=PCdEDxr9; 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"; dmarc=pass (policy=reject) header.from=berkeley.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736661461; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=AlmGXQZhJsDK++1OZ/3ZLnG3+KhAYGriPu/jmiqq/MU=; b=Ppxt4k3RfHKg4hBZBU79JXtZiUW+YjQlfDe+JLWblGnSgpAW4B3feJkKelm02PHuX64agU YStzMjtw9fW42pTGfH4ssGi29/PXVd6yrZZDGLDnb5TFNhbevqw0+Rr91YLsSeYZk2dvEe LmCRevi8OZvieubRXJx93ALK59HHSZiVDTgqHaoCW4Wd2RDUP2ZqoVmo8Nro14aZWAm3i5 ZAG9sL0Ih2yIEgH8DWNSjLpxAaxoNzP1IvYtA9g1In0ZSO+T4LohTXd2EGLiy3DQ+mWOAi WjLMp0auDuQSsVZeXd0M+rBHuwVhGz+VG2KZdKHYJTuI/c2z0oNC+NRMUtMMzw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=berkeley.edu header.s=google header.b=PCdEDxr9; 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"; dmarc=pass (policy=reject) header.from=berkeley.edu ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736661461; a=rsa-sha256; cv=none; b=khCEjCF+a6S4SEh3ZqDA7JJ7Dm5q7u3EGWqi3wdkTiy6Q1wekq4PO50URXzFk4SYzIr2TZ 8v62RJwbErJXY4CGN1B1wifVAmJ2r1ama8UDyFPZCPCFkBWOxG+Ur4PXhcC/5pMaZbmjoR QY6QI/KAigOjONRIivMPaYSxsCJyyk+3+FccumfN/k76ejR0roZ4T6tK1ry7YDcPD1wz3o zT0En6MtL8q4fmclxRq8ZkDEzhyRVdwI8dheZW1X2BvXU78sotLVOrk2V+M6y3YiDalzaT S/ubdwV3B3b95/sSD9Emge0CrQbKZY5VWIxSTIIC9tvJJ1f2pJB99yX4gVQlhw== 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 768EE914AD for ; Sun, 12 Jan 2025 06:57:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tWqxk-0000zp-78; Sun, 12 Jan 2025 00:56:40 -0500 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 1tWqxh-0000zh-2z for emacs-orgmode@gnu.org; Sun, 12 Jan 2025 00:56:37 -0500 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tWqxf-0000SG-6e for emacs-orgmode@gnu.org; Sun, 12 Jan 2025 00:56:36 -0500 Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-7b6fc3e9e4aso297427985a.2 for ; Sat, 11 Jan 2025 21:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berkeley.edu; s=google; t=1736661390; x=1737266190; darn=gnu.org; h=content-transfer-encoding:subject:references:in-reply-to:message-id :cc:to:from:date:mime-version:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=AlmGXQZhJsDK++1OZ/3ZLnG3+KhAYGriPu/jmiqq/MU=; b=PCdEDxr9XeEjp9Fws3ET+SsPKkSeeaV4izBlGWJxv/MREwx4bPERevpxEhUYZnUQFK lqGaKmK7U8TUWr97c2I5k1zsS9fOhFTUQmOSYk1A47nKjfi3RTiTIwDdWN97OzIkSGpX Hp1OJku0oX2VSLvh1S6T4E9K20dVp4UQzv6TZMf1fMaAOdiFRvjAwESx4+cTpyy8v3Fd oSCVwT2HW04o/1FOp1VpRstmo+JTZw7JNKJURcHRiRnZ9q/yF6t9PT6ptHxJCvSZcg5z NNCLEJt/Dm1Z9kN0DITzkCu2yg+uuftXB0HHetWvX0Qam9BMDWvfEAlqTJlAtkV2ODlA kyBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736661390; x=1737266190; h=content-transfer-encoding:subject:references:in-reply-to:message-id :cc:to:from:date:mime-version:feedback-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=AlmGXQZhJsDK++1OZ/3ZLnG3+KhAYGriPu/jmiqq/MU=; b=Q8TMn5EXc2vpTr3Ztq6/2WkIqGnLFn4qaKR+8KnI1LwbsHSQNWppDKtd1Jvplv1joP kgEz99kwuo3j5tvtqlNgug4+FUSdPC63jGLerwUf+dQJdqb9sbvgnY16/99Gg6KB38B9 grn4i7Zbbj4vykmUt2gWBGdf81Z4gJJPO7ViExPDiT8J2IBwChBRPKuNBTGgP9uIHMDi nVBmrChc4u7r3XfWAvFVUKk5Yy1l0MLEzbCWe9HfNrliJRIZQbjV8d4z+PVYZuZbXIRW lDuXHfs2cGs2XGkNf7s/w6i0nRlAFLy9A6BREi6C49ttxOgpb5nRfY89jEfYF4EPgkZX FE8w== X-Gm-Message-State: AOJu0Yw+k8V/ogFkCKuGZDQ3K68vwPb+ZRW3TEvl/0+5caeG3jOvhrHC HvCcT43Ti49wBNFXlm0MLN23CJhXTGa5AATSoYB0w7yUpz2zwHeL+3tLk4OVgLVdAK+L4TzbrT8 = X-Gm-Gg: ASbGncsaViie5H3Hlvyxu/PoKQo0Eig4r2Lk3wq1sVPkW5MQy3NiVD+6fZQQD/2M65q bdGnvc9gLhQhikEi2oU0zVbiyfvQsx57Dv/U8KBoTjquCaaXNrNHEjDgNEKU3JIcrPWPnfK86vG nT1dp4Z8Os0seIXl1oSsob6PXzIO00YdmtMNd/6KF3VZbqLa2JuYUTDbZA1+N4q+eOMuc1hHA06 EmyeXCWyr47DCoz94eo/cfGAgR07+RfiKUT4nURwghj8DAw+iRZtaY1W45r0RALN96t2sbt4zsf H9zrB9RYKARmtNGmWX9Mswc0fEhNU/Kx5Pi6A6M2ZxKQHjc= X-Google-Smtp-Source: AGHT+IFzDEKDflWR94vfoA9USCTAeSEUZWaL0nfTsd6FhqKG2/7jWZqVCVNNaO0Jpy45NeM6BkCy7A== X-Received: by 2002:a05:620a:4506:b0:7b6:cfa3:c685 with SMTP id af79cd13be357-7bcd9709746mr2392255885a.23.1736661389894; Sat, 11 Jan 2025 21:56:29 -0800 (PST) Received: from fauth-a2-smtp.messagingengine.com (fauth-a2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7bce3248c80sm352481585a.49.2025.01.11.21.56.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 21:56:29 -0800 (PST) Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfauth.phl.internal (Postfix) with ESMTP id 25CBF1200043; Sun, 12 Jan 2025 00:56:28 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-05.internal (MEProxy); Sun, 12 Jan 2025 00:56:28 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudehuddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvvefkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfuthgvfhgrnhcuvhgrnhcu uggvrhcuhggrlhhtfdcuoehsthgvfhgrnhhvsegsvghrkhgvlhgvhidrvgguuheqnecugg ftrfgrthhtvghrnhepgedugeffjedvhfekudekieduudeghfetueeiheeukeeutdffhfev udeiudeiveeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshhtvghfrghnvhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidquddv vdehkedvledvtddqudeiuddvjedtleejqdhsthgvfhgrnhhvpeepsggvrhhkvghlvgihrd gvughusehfrghsthhmrghilhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtohepvghmrggtshdqohhrghhmohguvgesghhnuhdrohhrgh dprhgtphhtthhopeihrghnthgrrhelvdesphhoshhtvghordhnvght X-ME-Proxy: Feedback-ID: i425146e0:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id F23E8B00069; Sun, 12 Jan 2025 00:56:27 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Sat, 11 Jan 2025 21:56:06 -0800 From: "Stefan van der Walt" To: "Ihor Radchenko" Cc: emacs-orgmode@gnu.org Message-Id: <52611558-9247-44c2-a51c-5f0dd8662fe1@app.fastmail.com> In-Reply-To: <87a5bxz2w0.fsf@localhost> References: <87a5bxz2w0.fsf@localhost> Subject: Re: org-timer: let done hook access time, allow silencing notification Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::732; envelope-from=stefanv@berkeley.edu; helo=mail-qk1-x732.google.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.37, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -7.79 X-Spam-Score: -7.79 X-Migadu-Queue-Id: 768EE914AD X-Migadu-Scanner: mx10.migadu.com X-TUID: 5biR6xb5jKBt On Sat, Jan 11, 2025, at 09:17, Ihor Radchenko wrote: > "Stefan van der Walt" writes: > >> I have two small improvement suggestions for org-timer, and would lik= e to hear your thoughts. >> >> 1. I use org-timer to run pomodoro-style clocks. When the timer finis= hes, I would like to generate a log entry. It would be helpful to be abl= e to access the duration of the clock; however, in org-timer--run-countd= own-timer, the variable org-timer-start-time is reset BEFORE the org-tim= er-done-hook is run. >> >> Could we reset the variable *after* the hooks are run instead, so tha= t they can access the timer value? > > Yes, that would make sense. See the attached tentative patch. Thanks, Ihor! That patch looks great. In the description: `ran` -> `run`. >> 2. I have a custom notification for when the timer is done, installed= via the done hook. I would like to suppress the existing notification, = but there seems to be no option to do so. Would it make sense to provide= a mechanism to override/silence the notification? > > We can do it. > One would need to implement analogues to > org-timer-start/stop/pause/continue/set/done-hook that will hold what > Org does by default at that point (turn on/off mode line, play sound, > print message, etc). Something like > org-timer-start/stop/...-default-hook. That would be a good generic solution. In my case, if I can suppress org= -show-notification, it'd be enough. Here's what I tried (but it didn't w= ork): (defun stefanv/suppress-org-notify (orig-fun &rest args) (cl-letf ( ((symbol-function 'org-show-notification) (lambda (&rest = _) (ignore))) ) (apply orig-fun args))) (advice-add 'org-timer--run-countdown-timer :around #'stefanv/suppress= -org-notify) St=C3=A9fan