From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sBlVBOFJuWDoQwAAgWs5BA (envelope-from ) for ; Thu, 03 Jun 2021 23:30:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aDhqO+BJuWC4bgAAbx9fmQ (envelope-from ) for ; Thu, 03 Jun 2021 21:30:08 +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 5090B109D0 for ; Thu, 3 Jun 2021 23:30:08 +0200 (CEST) Received: from localhost ([::1]:40664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1louuk-0006cb-Uy for larch@yhetil.org; Thu, 03 Jun 2021 17:30:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1losBo-0004Fh-Iz for emacs-orgmode@gnu.org; Thu, 03 Jun 2021 14:35:32 -0400 Received: from out0.migadu.com ([94.23.1.103]:36504) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1losBj-0005in-R9 for emacs-orgmode@gnu.org; Thu, 03 Jun 2021 14:35:32 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgcl.de; s=key1; t=1622745320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=4LsE2Qa5wsz0NmLEqRpDHvas0aXoEoJE1FF/yJ6vNFk=; b=lLsEP7NBF53L4A4X7EUJX4QRPd7tWXIrMctk6kfoByqIsybOMyEnYJDZl5EJtUtPYXqET8 FMnIiRNOvON0efN3L+8id7K/fhixm8mubPjQtNbuUjWPyxNkOk0YBON1bGbo4LIH04E9sl bBwXh1WKxXS4RYJIdMTvZW+O7yBoJF3bzVC0EbppCeidYFqfvM5p9AEEIFj1TBa2NJP8iu o4Z4LGtdEckeKmxe+1T38+CEQ3mP9NyBE3dNTwSy/CkIKDcIvs16Tj7e+UlgRGPWiLXIaj 3ffaXHtwWIqyoMhEsOzape62LnUlb4pbY9RjkbEhKnXoG1fLLXiw1TQwIPAVfw== From: Leon Vack To: emacs-orgmode@gnu.org Subject: Bug: Duplicated TODO state change logging with `!' per-keyword markers and repeater [9.4.6] Date: Thu, 03 Jun 2021 20:35:19 +0200 Message-ID: <87o8cmx0d4.fsf@sol.hw.lgcl.de> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: dev@lgcl.de Received-SPF: pass client-ip=94.23.1.103; envelope-from=dev@lgcl.de; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 03 Jun 2021 17:29:38 -0400 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: , 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=1622755808; 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=4LsE2Qa5wsz0NmLEqRpDHvas0aXoEoJE1FF/yJ6vNFk=; b=tF5HyIbWM1dG6ZiVR+sfi0TmdFCKxr6yvziEjLYZjI5FNrLxj09zOlOK18NjnhilcbNZQU v0fyVctIrDsRnxsDQNa0cR08fjjZwSbNLRcfgjavAFitYhZbp1IGHfFhb1Ui2Tjaf3+rHY /fI8ZCO5XHBUTIuEYU9Y8i+jPbk/dAiNjkXrJ1areRPBPqphZnLCDc2aMcL48VckN/FXiJ fccfkFGqw7QJMbuYnrEE/PKYlO4SNClmItSQU2w7AdJMngU5DIMQLyWApVgAlOmCaIMeQf dItB4c8WbdE2ZveV+4/wNP62Mo+NKXDMWXkXl1t8CF9/nkyZVOyI3pqzKtRY5A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622755808; a=rsa-sha256; cv=none; b=Mm+yNPkeZX/1EJgAf8FIeI3o8+EB/MuvCCuZ2+9z1zZb6UwWSvqr9SzsWxEY4yt5yCRVJ/ QyKxAMjTOUzi1CZ264DsRyYRZ6is4dbBBpc+JDii+lzZYLkN0GM1IlZ0uIidxjD1gOYeRj 0B8/c8a1szDlkxi1fksTybPRRkvJS6sMSkMnuW6b3s+q/u0r9p+/45XZsYYqxgPj9WEvaX IL/88vQRiapXaWbn5nMybSqMB52a9gptOwgmL6QXEMcK9QbP4tFzH10XY8RZNTQtAhdH5a Y/RXNJdwFak1EdbHvzeJPCd18ZH/M0Emvm4ErlykhWltniLLlpKVa4xA5zOh+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lgcl.de header.s=key1 header.b=lLsEP7NB; dmarc=pass (policy=none) header.from=lgcl.de; 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: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lgcl.de header.s=key1 header.b=lLsEP7NB; dmarc=pass (policy=none) header.from=lgcl.de; 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: 5090B109D0 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: MCVDw9mMGnPm Hello, Starting with version 9.4.6, state logging through a per-keyword marker `!' produces duplicate log entries on tasks with a repeater. A minimal test configuration to reproduce the issue is: (setq org-todo-keywords '((sequence "TODO" "DONE(!)"))) Then, creating a task with a repeater: * TODO Test Task SCHEDULED: <2021-06-04 Fri .+1d> And marking it done yields: * TODO Test Task SCHEDULED: <2021-06-04 Fri .+1d> :PROPERTIES: :LAST_REPEAT: [2021-06-03 Thu 19:58] :END: - State "DONE" from "TODO" [2021-06-03 Thu 19:58] - State "DONE" from "TODO" [2021-06-03 Thu 19:58] Instead of: * TODO Test Task SCHEDULED: <2021-06-04 Fri .+1d> :PROPERTIES: :LAST_REPEAT: [2021-06-03 Thu 19:58] :END: - State "DONE" from "TODO" [2021-06-03 Thu 19:58] I have done some debugging and testing. The first commit in which I was able to reproduce the bug is c670379adfbdc4883d3cfa230289fd2829993265. This commit changed the behavior of `org-add-log-setup' to call `org-add-log-note' directly (instead of just adding it to the `post-command-hook') when logging only a timestamp and no note. The problem is, that with a repeater when enabling logging through a `!' marker, `org-add-log-setup' is called twice: Once by `org-todo' directly and once by `org-auto-repeat-maybe' resulting in the two state log entries. Emacs: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.16.0) Leon Vack