From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MEBpKzKl6WC9SgEAgWs5BA (envelope-from ) for ; Sat, 10 Jul 2021 15:48:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GI3jJjKl6WCJRQAAbx9fmQ (envelope-from ) for ; Sat, 10 Jul 2021 13:48:34 +0000 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 2825117D40 for ; Sat, 10 Jul 2021 15:48:34 +0200 (CEST) Received: from localhost ([::1]:33866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2DLN-0004mB-4K for larch@yhetil.org; Sat, 10 Jul 2021 09:48:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2DKz-0004lo-HY for emacs-orgmode@gnu.org; Sat, 10 Jul 2021 09:48:09 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:42877) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2DKx-0003FJ-HW for emacs-orgmode@gnu.org; Sat, 10 Jul 2021 09:48:09 -0400 Received: by mail-wm1-x335.google.com with SMTP id l4-20020a05600c4f04b0290220f8455631so447132wmq.1 for ; Sat, 10 Jul 2021 06:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:cc:date:message-id :mime-version; bh=PDQonPX2YtGUCZ2MsX2LjYbxJY6vztFGWU5p5EIwZI8=; b=XHLS+4AY/+9B6NZ363QFHn+l1E/tF+rqGE1ZZSzvwaT/3S04+s4rsLEfIuxpILX9rk tUT1h6yot4gHfCZ7ow3LLId+HsnlzRGyvCY6ux0jXzG8SMzJB75BFi8G3ujRMA93CEqj cQ/dwCfUchd3rWzDccG9pgeYUEWQwzDKr2rfvV60Va38oqjOTkGi3JW04xFaqO8Dydo9 RCm4qHlgA1NWvNohhA+yd7iFOfb4RxWcSOzGfp5PHhSX4m+jfrXk2gGBx8J5kpxwKuUa 0t1/5puOPgiThFDwMNTpMXeCDs70ctqlj3h3fLtdQhemGf0GDYImIkUSOO1Rnl1H/Fiq H9MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:cc:date :message-id:mime-version; bh=PDQonPX2YtGUCZ2MsX2LjYbxJY6vztFGWU5p5EIwZI8=; b=bgoMHz94vgs8CU4+urLPJSxLmBSL9mV6aR+uAtiERvK4ITNDIl9+XAMO399uYKVPI6 BNYDaQXTo8vagroxGYSsIctniAWZlLC7DikOBUcHgSWamcyJdJbAZLMKpuDkxBoEFVQE bxZTsY+PLP9QKRaCrLYW+PJ7Jkx0ChqDcLtOyjnlIgtcBqiCGcioj/+xbLl3nynNdZSS qQiMZHxG3dbLqgIDLenpajRVFFkzcpT6o7/4w9bf7EYfJMlIgpUyTmRiDR2oaPE7boBK hnbuNO2bY/DVLkf+ZWVgo+cP+KVe5H6+j4v29fSToha/mnVafvMWihnfe6lg4zj4wGnN FntQ== X-Gm-Message-State: AOAM530OiOGjmG3ZwVoBt5Y//k5dniII8pncmdILuxF9tvRLvocsai6R AWEkDaDWVUwLSxr5cMlKWEc= X-Google-Smtp-Source: ABdhPJy+Vt1tSzc9swNoQPoYz+qnbujb22AZqLvTTaxBu5Hi32yqAV0gf64wi4U6koPVD4ITWaeWdw== X-Received: by 2002:a05:600c:4f15:: with SMTP id l21mr44938799wmq.72.1625924885762; Sat, 10 Jul 2021 06:48:05 -0700 (PDT) Received: from localhost ([158.255.2.9]) by smtp.gmail.com with ESMTPSA id g3sm4818600wru.95.2021.07.10.06.48.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jul 2021 06:48:04 -0700 (PDT) From: Ihor Radchenko To: Bhavin Gandhi Subject: [PATCH] Re: Bug: Duplicate logbook entry for repeated tasks [9.4.6 (9.4.6-gab9f2a @ /home/gustavo/.emacs.d/elpa/org-9.4.6/)] In-Reply-To: References: <877diwbm6a.fsf@gmail.com> Date: Sat, 10 Jul 2021 21:48:08 +0800 Message-ID: <87a6muwa93.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=yantar92@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org, Gustavo Barros Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625924914; 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=PDQonPX2YtGUCZ2MsX2LjYbxJY6vztFGWU5p5EIwZI8=; b=bLIAF3iY5oBOLiFzU3gf2CDQAkfm1dGaWI8SUFRIM+bp0iUiEQR8ZMtcF42ZsEQ/fLx55X YIjuEf/1VkhGduXyW3ut7mfKM52TYj8j+GuwZhDw1k870EIHXQ6stSXe6NlXLsHiFC9/6g VxtLqwpfbdIldMRW5E2v3yilhiXK8fDmHdFvbc8WnPmIkSc76B/WoPt1Qp2UZSZ3G4RxOs zwxjIboAj2dpqx2UNeYPn4soZGjsXYYcTS2hHCEBCR1KVvEgRJAnW+ArbA6/1tm9M47qgm +iZ7lzNBCUuRmhBkQ601jqGZMAJrnXIIl4CTPDqM4F0s0cmoCF/KnbbHqhf9AQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625924914; a=rsa-sha256; cv=none; b=bFiO2vQHuiuhqv/xBBu2qeoIt+Nrkbxd0sA4K8vD/dl/0JLLnxeKcOs4xRtUA4t0fwnI2g FjJrwXQ03NZi1ww6Wz59yW8JU1idJ28Ynaoul3BivMRZZDQEFonW1d57AI/jbiwqk1A5SU 1It9UKEv3fuJDiumD8FrUYMZ7TTHabG0f1VNNcDtiZnicXsNUAcGBR5AGXCnNztFgyNCIg zob346AF0iOk1QkFupiStaAhpXL4D9DTgDlEqjgxp2gI8M70laU+XZvKb65zpNE0De8ukz 8VpNDswtsxUMJ+ERdZ14vU93dhyzOlkULRwWpYH5gfZpHo/M38JcTXVSdA1mkg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=XHLS+4AY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -0.80 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=XHLS+4AY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 2825117D40 X-Spam-Score: -0.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7TFpCE6AOS2I --=-=-= Content-Type: text/plain Bhavin Gandhi writes: > I was able to reproduce this, and here are my findings as well as a > reproducible configuration with only a few settings. The breakage was introduced in commit c67037: [c670379adfbdc4883d3cfa230289fd2829993265] Fix `org-agenda-todo' undo behavior when logging (not adding note) The fix is attached. Best, Ihor --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-duplicate-logbook-entry-for-repeated-tasks.patch >From ff3c0f6524d4165518ec0c53b49a58162ff7b2a9 Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Sat, 10 Jul 2021 21:43:44 +0800 Subject: [PATCH] Fix duplicate logbook entry for repeated tasks * lisp/org.el (org-add-log-setup): Always run `org-add-log-note' via `post-command-hook'. Otherwise, there is no way to know if a note was requested for `this-command'. Running `org-add-log-note' directly would, for example, break `org-auto-repeat-maybe' as reported in [1]. [1] https://orgmode.org/list/CAOn=hbcaW1R6vtun-E2r4LS=j3dp=VjqmjGtzy8UC1SyPArKbA@mail.gmail.com --- lisp/org.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ffcc5945d..3d15771a2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10939,9 +10939,7 @@ (defun org-add-log-setup (&optional purpose state prev-state how extra) org-log-note-extra extra org-log-note-effective-time (org-current-effective-time) org-log-setup t) - (if (eq how 'note) - (add-hook 'post-command-hook 'org-add-log-note 'append) - (org-add-log-note purpose))) + (add-hook 'post-command-hook 'org-add-log-note 'append)) (defun org-skip-over-state-notes () "Skip past the list of State notes in an entry." -- 2.31.1 --=-=-=--