From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id YL4SGmZTJGU3EAEAG6o9tA:P1 (envelope-from ) for ; Mon, 09 Oct 2023 21:24:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YL4SGmZTJGU3EAEAG6o9tA (envelope-from ) for ; Mon, 09 Oct 2023 21:24:22 +0200 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 0CF7446D3E for ; Mon, 9 Oct 2023 21:24:21 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gla1t3TM; dmarc=pass (policy=none) header.from=gmail.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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696879462; 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=ha3/AdeQwlKD7LGWW0yRlvzPId42EZpjn4Btb2CZqns=; b=C94dwxTzspRRyxawsQEyViYqrgeqUnH3QsK8WkdMDjw/2AOOssOHouCAchdQ2bcGGliUSo BDxy8iENfFLH8dGMmZvWZT3QRbVjdgfSOCkPiei86DrygsxuMZRK08oS1dcl1HGqpXyRm3 2raM3BLkQwIQ9FgMRpcFeySREEkzwzHah1YiHInRMeZVnTsEfjbTDN5foLVNKpSSjj3b55 hUOSeadG5eP+Tj3aBE/ReXWfKEPTbK7WLQJ1JIsgaXj0jTsHvbhzg/LA+xgcFCPCi326aZ p1DJUWTDR/CbkGNz7SY0C4DIYc99v32El5XXW/r7cVv9q/rjSP39/izppnvOwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gla1t3TM; dmarc=pass (policy=none) header.from=gmail.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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696879462; a=rsa-sha256; cv=none; b=akYWo4EwT6WQ+javw6RonIGLyLZT5orsYtHbqXZ93FXcOZfSDF8gtux8ICI4drQ1tdW7Pb q2XX86Jn42E42e06R7FtI8/iJllf9aaN848wdEMuyYNFqwbYmF2gTHnHulMUPz1MdjIVWc MkBpxIbeuAkBHDlEnSclXBaQDD0zgL2Fsk1t07LUCw2uZc445CCGuIy5uIdSLq7EwkkUha zVGufCMJCU5a02RgRO2mtgJNbVskWGu9FU3B9nEWtJbkLYaTVkVy9fzaErIc7RGWhbfvWD WyhfPNAr8049Be1Rg80vG+PHe5ebwRu0BecoFUhe9fkObrp4dxs//rEbvCmytA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpvqk-00041K-73; Mon, 09 Oct 2023 15:23:30 -0400 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 1qpvqi-000419-Kf for emacs-orgmode@gnu.org; Mon, 09 Oct 2023 15:23:28 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpvqh-0007mr-5a for emacs-orgmode@gnu.org; Mon, 09 Oct 2023 15:23:28 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-504427aae4fso7283190e87.1 for ; Mon, 09 Oct 2023 12:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696879404; x=1697484204; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=ha3/AdeQwlKD7LGWW0yRlvzPId42EZpjn4Btb2CZqns=; b=gla1t3TM1N5Q+0/LsaCFfrz+FjOhssKgeSe2nSyuBgh6Ugir6VxW0MtRjLXfxQVE9y ZeJ26vHWoAWhVLOxWLQxCW9yinMhUkiilVws6oiciANflhQvVmNG4IJFOXOuB6oZejr7 8UFHqSSKDHzWeIuhzIVU2Etc8xHEibNsm1Qn+9weDbA+o5L9UiPqBzxXN1JVPaw89VjA qhR8g1/fVAKgOaFLld+0bVjFxj+xySp3Cvrk7PsQEQVXKUxfARDZjqWRgreKYDY/VcPh oPh66YWMoTf7egL0npjy1EERGMxA2iShBjW/BScOfmnKCm3ESwhMzgWCnIamWPkmi0gu l6qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696879404; x=1697484204; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ha3/AdeQwlKD7LGWW0yRlvzPId42EZpjn4Btb2CZqns=; b=hC2dFPhMVtFVJa4kMc7+vh0wd3Gyba2sIEgMDB25BiCv1bGih3rBlqUk2TOa3KQuCZ 1Gz2bzCNDSpiCwjMZb9JJH0pkuvY2St2Ad9A8lb2lXy7YITeUYsiBb/I4JgAyciW6Tz0 5XKpAMZ9ZU6IBkKpItsxKO19ENEoVRCiZMwiUXsRCtnzoPMO/Ubic9j+tMPdH8EMZF2g JzZt7MjTVSUgeZZs0azCZXsVM1gXtcbI98a5woGZmXRwBgYDGnJsxbv2HwfVzQ33nYhV R4lPxbhpQy6HGV8domVkY/7WyDtoNpIusVDFbB9VGXe3FsxaZno/SytCWvXuUezZvizZ C51Q== X-Gm-Message-State: AOJu0YzKtdDMZlzg6idDwCvgxZHukQB8RXizLMfKI+1y/hsrLJqHWXXe 2ykuldHufrqdFmVe8MSbMsLByUWOIc0FXQ== X-Google-Smtp-Source: AGHT+IGxJ9IIW3O/Uyy8IVjvGDib3cPuQQKSWETkY1uUdz+/M9ohaMzMNzmKETopmo4J8atOGVWYIg== X-Received: by 2002:ac2:5b10:0:b0:4fe:8ba8:1a8b with SMTP id v16-20020ac25b10000000b004fe8ba81a8bmr10904867lfn.7.1696879403561; Mon, 09 Oct 2023 12:23:23 -0700 (PDT) Received: from sonyvaio ([92.127.232.62]) by smtp.gmail.com with ESMTPSA id p4-20020ac246c4000000b0050304a2022esm1532794lfo.47.2023.10.09.12.23.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 12:23:22 -0700 (PDT) From: Ilya Chernyshov To: emacs-orgmode Subject: Logging previous SCHEDULED property before changing TODO state of a habit Date: Tue, 10 Oct 2023 02:23:09 +0700 Message-ID: <8734yjlhwi.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=ichernyshovvv@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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.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-Queue-Id: 0CF7446D3E X-Spam-Score: -9.47 X-Migadu-Spam-Score: -9.47 X-Migadu-Scanner: mx1.migadu.com X-TUID: 2IySXhyG/gqT Hi. Is there anything I can do with my Org config so that every time I change the TODO state of my habit (example below), Org logs inactive timestamp from SCHEDULED property before TODO state change? For example, I have this habit, which I have been forgetting to mark as DONE/MISSED/WHATEVER for the past several days: * TODO heading SCHEDULED: <2023-10-05 Thu +1d> :PROPERTIES: :CREATED: [2023-10-01 Sun 01:25] :END: Now, I want Org to log when I done the task and when I missed it, but instead it inserts the timestamp of current time: * TODO heading SCHEDULED: <2023-10-08 Sun +1d> :PROPERTIES: :CREATED: [2023-10-01 Sun 01:25] :LAST_REPEAT: [2023-10-10 Tue 02:08] :END: :LOGBOOK: - State "DONE" from "TODO" [2023-10-10 Tue 02:08] - State "MISSED" from "TODO" [2023-10-10 Tue 02:08] - State "DONE" from "TODO" [2023-10-10 Tue 02:08] :END: What I want to get instead is: * TODO heading SCHEDULED: <2023-10-08 Sun +1d> :PROPERTIES: :CREATED: [2023-10-01 Sun 01:25] :LAST_REPEAT: [2023-10-10 Tue 02:08] :END: :LOGBOOK: - State "DONE" from "TODO" [2023-10-08 Sun] - State "MISSED" from "TODO" [2023-10-07 Sat] - State "DONE" from "TODO" [2023-10-06 Fri] :END: It would be awesome, if there was a placeholder in org-log-note-headings (for example "%e") that is replaced with previous SCHEDULED timestamp. Can we do that? Or is there a better option to achieve that?