From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KKy1IHgOrV+kKAAA0tVLHw (envelope-from ) for ; Thu, 12 Nov 2020 10:29:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eJWeHHgOrV+LeQAA1q6Kng (envelope-from ) for ; Thu, 12 Nov 2020 10:29:12 +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 0153D9401BF for ; Thu, 12 Nov 2020 10:29:11 +0000 (UTC) Received: from localhost ([::1]:46622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kd9qn-0007Tg-Ey for larch@yhetil.org; Thu, 12 Nov 2020 05:29:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kd9qQ-0007Ta-Cv for emacs-orgmode@gnu.org; Thu, 12 Nov 2020 05:28:46 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:38296) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kd9qO-0005RI-Fl for emacs-orgmode@gnu.org; Thu, 12 Nov 2020 05:28:46 -0500 Received: by mail-pf1-x42f.google.com with SMTP id 10so4130547pfp.5 for ; Thu, 12 Nov 2020 02:28:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=t3a6zBrW0xEypvkPJXRJxGD/reZ9/JhZM8TWLHOJMUc=; b=Cl+uwTRubDjhXCc6B8UAYnRymcypdQM/OzNfMwiftHonwstKSyUpeOzfYHFLDSH63/ 7iyIBp8frjbHloJa4N++kN3P2Ve1aZnKe/qPipbAZoWi7bbmhGkppDuztQRsGNfHf9Oe wkuYX+YNNaxaBHK0vnk9e/pf0zoPH/kyFqNrPccpKnAUrNZl4wOzojaG2OsBonH6ThNK P9EsCJV4eXdVx/g0Rg5ovJ30IovH4PFO1bYDVUO5eAqO3uSA1xfPjMWxuvezHe6qSiFZ 3JkRWt2qIQ4qa5R++bI+VXMG1XcdlDzgB6cU+nj/t3bgb80zT7o4Tq+OdhyUjFoelSon h5JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=t3a6zBrW0xEypvkPJXRJxGD/reZ9/JhZM8TWLHOJMUc=; b=OQ4G6Vi1YJWVPa5214/tbvnZh99HqCBYvEHK5/m4YFfNXkLg4Xk6M7PQVZD9Cs9HVa 9EFAo3Fsur6SPaKYi8dkUUf2FUurGhuCP9FaZUUBUCCLaswL8LmPLV/NWAdwGmsO5Wup urS39hLYsMEDnVGxO4shyVT+2k0xUg6BbNi+LpfCgbHeVxY05tCHIdhV+fzsVujbEAIF ZDO1dvp9XkGD6nzpBAc98Ls/8HUOb//vCvRZROyb4CEY8b2XF5hPrHn5vI4IXubSpzzw aDYk6ps6oDwU4C3yS8YeuCjvYlqeoMC0jfb1vX+BwPjR3rtMQcP0FLPnWXYWGN8JsDZA htKQ== X-Gm-Message-State: AOAM532EgTEOGl5iqXWzGp31u67wr/KRIbNfLxx+QOSSaZM7G1OfcZmD pOkmkfnqhqKh6M3WfZHL210= X-Google-Smtp-Source: ABdhPJwNpU1rc+3dyfow7Uc7/qNYpwEwim3/Kh8kqylXQa1++J8S2LMOyyfVdHNb5bRD/uekVswJUA== X-Received: by 2002:a17:90a:a10e:: with SMTP id s14mr8384816pjp.62.1605176923052; Thu, 12 Nov 2020 02:28:43 -0800 (PST) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id e7sm5272303pge.51.2020.11.12.02.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 02:28:42 -0800 (PST) From: Ihor Radchenko To: Gerardo Moro Subject: Re: Archiving repeated tasks under corresponding date tree for each repeated item In-Reply-To: References: <87lffj7zss.fsf@localhost> Date: Thu, 12 Nov 2020 18:27:40 +0800 Message-ID: <87zh3mlvj7.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Cl+uwTRu; dmarc=pass (policy=none) header.from=gmail.com; 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-Spam-Score: -1.21 X-TUID: zdxjZwiuQNSt > Hope it is clear now, thanks so much for any help! Sorry for not making my previous email more clear. I actually understood what you want to achieve. My suggestion was rather an alternative approach to "revisit the past" - you can always build agenda view for a specific date (or range of dates) in the past. That way, you would not need to look into archive file manually at all. On your actual question, I think I found some old reddit comment [1] that may be relevant. The code provides a new command to archive an org headline without actually deleting it. That way, you will get a copy of your headline on the date of archival. Below is the original code with me adding docstrings for more clarity. (defun my/org-archive-delete-logbook () "Delete LOGBOOK of the entry at point. It is obsolete once the copy of the item is moved to the archive file." (save-excursion (org-end-of-meta-data) (let ((elm (org-element-at-point))) (when (and (equal (org-element-type elm) 'drawer) (equal (org-element-property :drawer-name elm) "LOGBOOK")) (delete-region (org-element-property :begin elm) (org-element-property :end elm)))))) (defun my/org-archive-without-delete () "Archive item at point, but do not actually delete it." (cl-letf (((symbol-function 'org-cut-subtree) (lambda () nil))) (org-archive-subtree))) (defun my/org-archive-logbook () "Create an archive copy of subtree at point and delete LOGBOOK in the first headline of the subtree." (interactive) (my/org-archive-without-delete) (my/org-archive-delete-logbook)) I think you can modify the last function and call it in org-trigger-hook, so that repeating items would be archived without deleting every time you mark the item DONE. [1] https://old.reddit.com/r/orgmode/comments/dg43hs/can_i_archive_a_proper= ty_drawer/f3frk2n/ Best, Ihor Gerardo Moro writes: > Thanks, Ihor. > Indeed, that is an excellent feature of agenda. I use it sometimes to > visualize what I have DONE during the week on the sopt. > What I aim to accomplish however is a more systematic log of all the DONE > tasks, this is, to have an archive file where to archive all tasks. > This file is in the format: > > 2020 > 2020-01-01 DONE task1 > 2020-01-12 DONE task2 > 2020-02-01 CANCELLED task3 > > So it is indeed a datetree file where I can revisit the past :) if you wi= ll. > The problem with habits and repeated tasks is that they don't get archived > when DONE... > They get archived once the task is cancelled or completed as a whole, all > under the day the task stopped continuing, under which I have all the > logged individual completion. > It would be desirable to have each "completion" archived under its > corresponding datetree, it is more meaningful :) > > Hope it is clear now, thanks so much for any help! > GM > So even if I have beeng doing the task every wednesday for a year, it won= 't > be archived > > El mar., 3 nov. 2020 a las 7:53, Ihor Radchenko () > escribi=C3=B3: > >> > It would be great if each of these individual "task >> > happenings" were archived under the date and time they were completed >> > individually, and not just all as one block. This way I could get week= ly >> > reviews that take those into account. >> >> What about trying to do your weekly review using org-agenda? You can >> show the task every day you complete it by enabling org-agenda-log-mode >> in your weekly agenda (v l). If your tasks are also archived regularly, >> you may also need "v A" to include archive files into agenda view. >> >> Best, >> Ihor >> >> >> Gerardo Moro writes: >> >> > Dear all, >> > >> > I am resending this as I believe it's a useful concept to implement, >> > especially by those who track their tasks and do weekly/monthly review= s. >> > >> > When I archive a repeated task (let's say, a learning project of 15 >> minutes >> > every Wednesday day for 2 months), the task gets archived in a date tr= ee >> > all under the day it was closed (cancelled) as a whole. This means that >> all >> > the LOGGED individual instances of repetition are archived on the day = the >> > project got completed. It would be great if each of these individual >> "task >> > happenings" were archived under the date and time they were completed >> > individually, and not just all as one block. This way I could get week= ly >> > reviews that take those into account. Not sure if I made myself >> understood! >> > :)) >> > >> > Thanks! >> > G >>