From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sMSyD57Ms19kFgAA0tVLHw (envelope-from ) for ; Tue, 17 Nov 2020 13:14:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QESdC57Ms19eEQAAB5/wlQ (envelope-from ) for ; Tue, 17 Nov 2020 13:14:06 +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 22E919402C8 for ; Tue, 17 Nov 2020 13:14:04 +0000 (UTC) Received: from localhost ([::1]:32956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf0o7-0004dk-4m for larch@yhetil.org; Tue, 17 Nov 2020 08:14:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf0nI-0004P6-CS for emacs-orgmode@gnu.org; Tue, 17 Nov 2020 08:13:12 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:43622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kf0nG-0005PP-LM for emacs-orgmode@gnu.org; Tue, 17 Nov 2020 08:13:11 -0500 Received: by mail-ej1-x632.google.com with SMTP id k27so1942880ejs.10 for ; Tue, 17 Nov 2020 05:13:10 -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=3Vw6Z6X7Ut0xUAiIW+XV14uhPL8VEYcPNfwrV/XX8cg=; b=gz2NQfIR90hrAvmxsjCS7tv4lati+y0/lOOuz8tMS/l45ABJj84aD/REhvGbLjvsu8 /QydXBIVw8RZvWkSlBseIW7ffzsf3ROQrsowPh+OOSXeu6gqVc3xgyjVo79nRbzwQIoc JINOLZk0IVnBNtB5Robw9f5Y0soStOJ0Z7qJj5XJEiKTnQshpd+PsRQDyQPaa0VMbJlg gjViUjn8kJOxiJuEIDCzy8TIsmQuFH0N7bKPd8dwBqWIWfD2DDzS85T2NX3oZuwUQ/gT F/b4HhWVH1Sig338Hn1lX8QJLWZ4hdmbSvzdVZ8Th05de9muoR5OPOGrosg7NGcExetW acyA== 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=3Vw6Z6X7Ut0xUAiIW+XV14uhPL8VEYcPNfwrV/XX8cg=; b=j/NT6lfWDJ4KgtEUSGUC6KoRFtbTiw530wGq8XIaes+7tNHdoMNXLh1dy6LINk2leZ heJgjvqfQlw2j6vRopIiny0N1Nlb4skhnC4fxYSP1wYDr3fXGMTQmZCvzH3kIui+U2db Xz82Ktgqai1cV+onnV/6WbG3HA0irImalt/thmjI9NEwzEcB4xkwQyuom04oGE22R78D OBJptloIWBQ8SE58h0X1K+LcnO6wAFC/lwSjULzWVxxsKmRx1g/fH20TAky2f17WOgNq 3xLe/P8nfVpBWIi0tssejiR9ohuE6UYrWqhvhcQvR7RBvBdjcp7bdDK2S6gwtu3JkrGq hZhQ== X-Gm-Message-State: AOAM531w03d5NOgN3uSPjNbjk7HKeSWDlTyTDW5IKQBNu6xjR8CvIKgu QWv4Tc3iViwuzFd1PUYe0o0= X-Google-Smtp-Source: ABdhPJzrDuTZqauTxpk6Kc9y+Hrjvh5/EPRBFrxGF3Xcf8lOkW5Y9R9mLsLcmVVXvFlAmtSjwpMK7Q== X-Received: by 2002:a17:906:6b82:: with SMTP id l2mr18709530ejr.241.1605618789300; Tue, 17 Nov 2020 05:13:09 -0800 (PST) Received: from localhost ([82.103.138.238]) by smtp.gmail.com with ESMTPSA id i13sm11546031ejv.84.2020.11.17.05.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 05:13:08 -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> <87zh3mlvj7.fsf@localhost> <87ft58nxck.fsf@localhost> <87d00cnp0i.fsf@localhost> Date: Tue, 17 Nov 2020 21:12:05 +0800 Message-ID: <87a6vgnn4q.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=yantar92@gmail.com; helo=mail-ej1-x632.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 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=gz2NQfIR; 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: empbFoXUX8MD > I tried this but I get: "symbol's function definition is void: > org-trigger-doing" Oops. That's the old function name. Should be (add-hook 'org-trigger-hook #'org-archive-repeated-task) Best, Ihor Gerardo Moro writes: > Thanks for the prompt reply! > I tried this but I get: "symbol's function definition is void: > org-trigger-doing" > > El mar., 17 nov. 2020 a las 14:32, Ihor Radchenko () > escribi=C3=B3: > >> > Thanks, I don't know how to go about doing that, so I would have to re= ly >> on >> > others wanting to help me if they consider this to be also useful to t= hem >> > (which I definitely think it is!). >> >> Try the following code. It should archive any repeated task once it is >> marked DONE. >> >> (defun org-archive-repeated-task (arg) >> "Add a copy of the recurring task marked DONE to archive." >> (when (and (eq (plist-get arg :type) 'todo-state-change) >> (string=3D (plist-get arg :to) "DONE")) ;; The state is cha= nged >> to DONE >> (let* ((pos (plist-get arg :position)) >> (repeater (org-with-point-at pos (org-get-repeat)))) >> (when repeater ;; Only consider tasks with repeater timestamp >> anywhere in the task body >> (my/org-archive-without-delete))))) >> (add-hook 'org-trigger-hook #'org-trigger-doing) >> >> Best, >> Ihor >>