From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gACXLi84KWWBSwEAauVa8A:P1 (envelope-from ) for ; Fri, 13 Oct 2023 14:29:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gACXLi84KWWBSwEAauVa8A (envelope-from ) for ; Fri, 13 Oct 2023 14:29:35 +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 6BA816DED8 for ; Fri, 13 Oct 2023 14:29:35 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fdHkZf0h; 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=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697200175; 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=6CyRSkkDqQuuYO/Ld6KpPRRygr8MM8O7zVAXL64eq7w=; b=VfaCEByoW0G2Yz4z/iG7JED4ifqtTgv/ZGJhiAF9WTbFjpkMvW/ok0hfEHpwq6KQWuTp6j j45uLbY+efxpN8QZdft1ZGavLL3txCgbTQNhF859cKjSlYmKdGdgFoLjpuRtaaNT7hwPom gIfJPsR/OyI2aNjLtZDr7imyTCcw0okuiJRe+iw4veopxGnR+Y/+Sq5QTpwkKHU1TJ7Byd mJx5N2aBvSddUktzTjnRvLtd2zKy0AAMV0Wlvq5h3FF7/690UHisxfq6gQ+fUGASkEsoiH u0+SLRiglRWjbZGjLXUxbvnv1QjtEXAMd5+tcmYPaii30p6QusoACGAylbO31w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697200175; a=rsa-sha256; cv=none; b=dJ9wLM1JtJPcY9bt1rPWHm93wZnYsFveCMuFu6GdnC5ALQ8atf/y6LduCM6yWYzrBYizRP JJla0qBYsi0ZIeGj5HT4QsW8CrlYtgk2pJd7/jRHknPoB94vv7oG24w51GXRoWic1HGlUi mliB2tNpzms03Eqv2o0ChWnEjQTShX7fdRj+ld6rNtxK0Zbu/b6dPigmGt+JeapV+4pUea 1eS3ppg2oLX7Di2y1VuqlSQnerwe1TZEiayebUFNOfnA+4b62YDM6toMU9SG60PX+mDl7g 0hoGeJIH8FpjActoI3CmjNKZOVnZORFrRQAf3E571FCLzrECiHaCpLEAI6iCtg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fdHkZf0h; 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=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrHHk-0001Ym-Ge; Fri, 13 Oct 2023 08:28:58 -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 1qrHHh-0001Xq-Kf for emacs-orgmode@gnu.org; Fri, 13 Oct 2023 08:28:53 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrHHf-0004kl-Qg for emacs-orgmode@gnu.org; Fri, 13 Oct 2023 08:28:53 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8132C240103 for ; Fri, 13 Oct 2023 14:28:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697200129; bh=oAN8DjaLrHr7HiS5q5zlD/o5V8QyU5vXKm7BWIWY2PI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=fdHkZf0hLMPcrUsE2Ynqyi3AByEQqKkoCs1atvIJtCeNE8qd/5OiwyExTlPRhwaPf NrU6az5LjqQTJhMa2Cogxo+c8e0viyTH8VrfM6/IUTa93BfiJpGVQTDQAT74d1jXkh fdRGrR2RA5h7hE3D6YLWEoVXDo6F4dkSTZyg4YwcaSqJh/zM2j74yR4MFt4F7Qmagq evfnSp1TGaxpSmquExu8uq8auha3rcwUbi7ZMxzHyom86bWZZGW3Le2GFiVrFqhjl1 0i5RIaXBjgMhuIjsdKaAZXLPy5DdAjsqCEL+VgGAHwprXX6IDM49SoCckxVoZLI/MC iJlB2ENMKE9Hg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S6Qm00Xxnz6tm4; Fri, 13 Oct 2023 14:28:48 +0200 (CEST) From: Ihor Radchenko To: Ilya Chernyshov Cc: emacs-orgmode Subject: Re: Logging previous SCHEDULED property before changing TODO state of a habit In-Reply-To: <8734yjlhwi.fsf@gmail.com> References: <8734yjlhwi.fsf@gmail.com> Date: Fri, 13 Oct 2023 12:30:35 +0000 Message-ID: <8734ye3dsk.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=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-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-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -6.38 X-Migadu-Queue-Id: 6BA816DED8 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.38 X-TUID: /AzcGFIdzFfp Ilya Chernyshov writes: > 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: > ... > 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: > ... > ... > 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? There is no easy way, especially since you probably want a different note depending on the todo keyword (scheduled time for MISSED and today for DONE, for example). The %t placeholder from `org-log-note-headings' is not exactly the current time, but rather the return value of `org-current-effective-time'. `org-current-effective-time', is somewhat customizeable. We allow to use the last clock out time as the timestamp via `org-use-last-clock-out-time-as-effective-time'. To get what you need, it will be necessary to add more customization. For example, we can allow a user function that returns the time that should be used. Feel free to submit a patch to that effect. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at