From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EOpFOFQG2mDZkgAAgWs5BA (envelope-from ) for ; Mon, 28 Jun 2021 19:26:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IP0NNFQG2mCuFgAAB5/wlQ (envelope-from ) for ; Mon, 28 Jun 2021 17:26:44 +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 284821AF81 for ; Mon, 28 Jun 2021 19:26:43 +0200 (CEST) Received: from localhost ([::1]:41244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxv1t-0003pY-OM for larch@yhetil.org; Mon, 28 Jun 2021 13:26:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxv1V-0003m5-97 for emacs-orgmode@gnu.org; Mon, 28 Jun 2021 13:26:17 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:45640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lxv1T-0001R2-OS for emacs-orgmode@gnu.org; Mon, 28 Jun 2021 13:26:17 -0400 Received: by mail-lf1-x129.google.com with SMTP id h15so33887173lfv.12 for ; Mon, 28 Jun 2021 10:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mDUXfFtBLT6gIJnviFYqene0vDLTNsf+XG+ODUGglZk=; b=l/2yOROAvoXLgm6zBh/D59dsUU06C4IenDyBmMuy+MxF3e9G4a33qPEubMbJzJpFTP 5641Lm5VOVHnh/TZ7LXQfdQl/Y1dtnqANvCXO5FB33rsvTIniLFMCIoJqvkvJ4lMAQET MpdLAwJpIPHUz5lDYmCJlMluawazVIkJOE2zUs9qNCW0WBlYUhtVbvYG6hOloYrxOYHR jcmWlQ58IuPNJccGPOPqiCvKB+XlDGlhVMqNmGowtZfA58d3+PxzSoFvhNz7X/lWPqh4 sXlFHVxi02Z9BclExWY4SFwIlS/6pXP8Y7adkY7p8tFsL5M7R/HlkoQQUC3fuOCD9sdA rhAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mDUXfFtBLT6gIJnviFYqene0vDLTNsf+XG+ODUGglZk=; b=OTIFepk9CbdZg/uWYBeSZ6bwxrPOIoaOnlzv/tb8fHY3rYgfy7T6D+aXwX9m3OTgGV 9h+2zIMHBHc3x7FQkgBVYywJDJe0jP2Cdp+HVrvl/vBMg5FANnxNbgzhmu0pakW6RNVW zpq9w2lgc2aQBy1EHh8Cju5blFPi7vh0Ha9eWITvYxmq4qiJaYNTR7SlN4sQDnJnXryL 6nDGdCXSe2uGCOaUf1lRtWjrzvKLbavNFhKlMl/1+0e1++2fsJ+TWs/6qhBBSaaP6Rpf aumYKzswAISpyzUae1EptUIb7cW9NZOuwDcJID3c9eBad3BssVQJ5gQ6BJlpRh5hMv+M JPdg== X-Gm-Message-State: AOAM532RsWSzW0HgVgk1xqP8UnQf0E56ybJYX+LdGz/3aGmjCmC+a0RN km3BsHZ/rljd1eqD9NLMLQ1VCGi1wdO9ywVdETQ= X-Google-Smtp-Source: ABdhPJzXcOgipfXd/arrKQayjT6amU6dbeg+NbtBAZq864GrscSv/F+j0MiMgI3ywXNYYYtRI4qcNhAuUSYA1Thpy/E= X-Received: by 2002:ac2:4116:: with SMTP id b22mr13599381lfi.376.1624901172910; Mon, 28 Jun 2021 10:26:12 -0700 (PDT) MIME-Version: 1.0 References: <87fsxgd420.fsf@gmail.com> <87o8bs59dq.fsf@gmail.com> <87lf6v61qh.fsf@gmail.com> In-Reply-To: <87lf6v61qh.fsf@gmail.com> From: Bhavin Gandhi Date: Mon, 28 Jun 2021 22:55:46 +0530 Message-ID: Subject: Re: Bug: Duplicate logbook entry for repeated tasks [9.4.6 (9.4.6-gab9f2a @ /home/gustavo/.emacs.d/elpa/org-9.4.6/)] To: Gustavo Barros Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=bhavin7392@gmail.com; helo=mail-lf1-x129.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, Jeff Kowalski 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=1624901204; 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=mDUXfFtBLT6gIJnviFYqene0vDLTNsf+XG+ODUGglZk=; b=Hl5k2D6G/nzY5BHNqZqvpUoiqKrEz01+oLpSYb91bqvnTp72caAaazxSiyLLQM+/NxebUR khUUD0EjRMIWTSezL7g1Tcv422VoAxryBsiKSwU9KXfLZZZqUSDk+3R1phV+PC/q43hSSU fdT9gFN2Er8SN7ZwmsHWobDAb7tOHZUvekW/Hvq3YwQME5s5Ho50unTjLBm3Qr2NiI986x bTkJFij7Pr8wk9PlOKqBhSkmVlMgLNP7Vh/Ck+xh4KooE4+kE/deoyiJNhJz3Q141Ik5HJ ROyG16P4tFPlYXAT1KBCWTfZxj1N99ykk/prCkhzg23TiBIkuIG6dtfa0ZWrOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624901204; a=rsa-sha256; cv=none; b=KI7usgHhVAIwkz4QHAmTP0wM/2JqhwWGoQ0jVG2o5Ui6sCcImL31bW+7b3UzOych/oorWc IHACmgQbCHIk96Hql3FlNdKs3rtGn85XuClYQaItR09m99naqDV2TQjY13AD8VZYs217lv MXxO3PPJA+fyI0vcvqsAAZ+S7qfH8wAQ239RMOtqz/BmHBh/wgkMtkn8JKhoku47W7tlYi 4AGV6An+HsOI5QGDZJ6vFCGqcmC90SrbPc0ScTNoRH4U/15F8rE0pXr7dyY0M4kiNhZv0b yEgfxDzBvXuEyb9Rx71ujlzvMi5A+RBsHDCoOKz60+2z99qxW6J8+vNtSLMu3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b="l/2yOROA"; 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: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b="l/2yOROA"; 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: 284821AF81 X-Spam-Score: -1.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: 8xH8Xs3X9lrz On Sun, 27 Jun 2021 at 12:01, Bhavin Gandhi wrote: > > Till now I found that the function `org-add-log-setup' is getting > called twice. Why that's happening, I'm not sure yet. I think running > edebug will help here, I'm going to try that. > I found the reason for this behavior with the help of edebug. `org-todo' calls `org-add-log-setup' to log the state change, and then it calls `org-auto-repeat-maybe'. The `org-auto-repeat-maybe' then calls the `org-add-log-setup' again, I think this is for logging something related to repeated entries. Before the change `c670379ad', `org-add-log-setup' used to add `org-add-log-note' to post-command-hook instead of calling it directly. If I have understood the post-command-hooks correctly, it used to keep only one entry of `org-add-log-note'. This is because `add-hook' function makes sure that there are no duplicate entries in the hooks. I'm not sure how this can be fixed, I'm going to read the `org-auto-repeat-maybe' to understand what all it is doing.