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 ms0.migadu.com with LMTPS id sPCBD0lQWWGnWQEAgWs5BA (envelope-from ) for ; Sun, 03 Oct 2021 08:40:09 +0200 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 2GYkC0lQWWG0aAAAB5/wlQ (envelope-from ) for ; Sun, 03 Oct 2021 06:40:09 +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 9253336C8F for ; Sun, 3 Oct 2021 08:40:08 +0200 (CEST) Received: from localhost ([::1]:54328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWvAN-0007OX-4V for larch@yhetil.org; Sun, 03 Oct 2021 02:40:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWv9g-0007O9-Ss for emacs-orgmode@gnu.org; Sun, 03 Oct 2021 02:39:24 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:46828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWv9f-0005nT-5S for emacs-orgmode@gnu.org; Sun, 03 Oct 2021 02:39:24 -0400 Received: by mail-pj1-x102e.google.com with SMTP id oj15-20020a17090b4d8f00b0019f8860d6e2so3002735pjb.5 for ; Sat, 02 Oct 2021 23:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=gIALmllDZNKBRY0nx1MrkN5Lp0uhGjXMfvLCLnOiN6U=; b=AR+Ork7K3cCh1afRGSX/EboyGjkkjwwMu13N+otbknZFEkTLv4xX2TXO4t5exyYig4 hvENI7jbG/QS21h41AgrukkSf/H7lRqPo2mpxvit2iDEPruUOhkaQyKiWOaLmB7HGjCm UplhddT5yzSc0FuRkvwAv5IIRn1rlyl0s/e+ZyDQ52tXuJ3YhaAdjEmx4DjLo6/GAVJd PDs5da31IQDd8+fMVL5ZjtP8u75eFJBX+3hnRAmwl46D41h5vML9F/ci/6OT/W5eAPP4 DRV08GoNKCwmNEMdB+tgSonWmpLdAKOB5xxXCATyZtd/GNc4Nt0JEwXMxDN5EppbDiHW oDvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=gIALmllDZNKBRY0nx1MrkN5Lp0uhGjXMfvLCLnOiN6U=; b=YqKBnXe1r3Nw9lcTF8SeJ4KqjW65l5IA2JDh7qxZNwTBEEbuFWoEBKdKjgSUo/OMw/ pGX6tZ37UJyFmCSWjqU7m1rSRq2Vj8oNymdE0uyYKjl9+D42eNXaGUn/p9Moiy/Op90J wYBYJ5cdt5UfKOmFKPeMCmJyx0pMKO/ly7jj77hCc+kESW4R8VuIPDzrImSDy9sVOxzr JMInvdWxPFQdysKlfbZdm2Ntd+StAJY+7BFo0yB3WTJ8/Wm2i1KPpbbFU+2i1mZTX/Ja EWIOO/pgg/VRcwsfd5zYcpcQOlN/Tl6GYU2+JvT1Hl2HYt0vZSMl6FKpK9FxaGaqjmcy YFWA== X-Gm-Message-State: AOAM533o6ei7Hu7TLzU1sBegvX+hS+FJbne1Lg9fgHQF7EMyRK718ovy TpMWNDKfmcrm4N7LrAMUaMM= X-Google-Smtp-Source: ABdhPJwt2dBlVn/BB6cpGXBSfmi6Tx0y1ySmWhYy5VkwzLURbfqPJJWYMOtdj94+jDJbILqC4VzYmw== X-Received: by 2002:a17:90b:1211:: with SMTP id gl17mr8800295pjb.3.1633243161479; Sat, 02 Oct 2021 23:39:21 -0700 (PDT) Received: from localhost ([210.3.160.226]) by smtp.gmail.com with ESMTPSA id b10sm10258903pfi.122.2021.10.02.23.39.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 23:39:20 -0700 (PDT) From: Ihor Radchenko To: Uwe Brauer Subject: Re: org-capture-template with changing heading (including a TIMESTAMP) In-Reply-To: <87czvvh69m.fsf@mat.ucm.es> References: <87czvvh69m.fsf@mat.ucm.es> Date: Sun, 03 Oct 2021 14:40:39 +0800 Message-ID: <87mtnq7grc.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102e.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 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=1633243208; 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=gIALmllDZNKBRY0nx1MrkN5Lp0uhGjXMfvLCLnOiN6U=; b=japf+Jc56pS14xGtpWS6ypnh240KjBBwgLYPcTnpyv7bbMtVIvav7puH9xcV/AjBtGIaNw c7wjhkYfP6ll6EcxBsBK9QBZXAKwv97DT5oSsrFizLKFMVV1PMaVfUlNrrw8cubOee4Jct xy8D3ho3Sje1Y99xc2Mvi8tZoM0ybbCGyuHGyV3DNe40y03OvrSAadMuhj1KhbE2Ctuay2 zYCwVKTt/LzOEQ3ykN8QMSesn3dC4TDFHEqcXVh/zR4BlhSxox91UvVfR19lfp/ma2smA5 R1kLLSxClcWF4Iy/GwjsQCUbGz1jbPCtrQ95wyPGXZcX4nhIrzDf6XojXj2wCg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633243208; a=rsa-sha256; cv=none; b=DyZd8rb3DjmN8F5jPEj9BlcQtqNgCwi7c13CuzDa6UihkUU7cQkmtdEDGthKlnZp2F+Y1j kXTfJUFGPV7/XL3O6TUwBqtRUa7O0KoTUXp6jtIHnzoA5IjUK5E/Z2Owg6XT5AdZCxqRBd CYv0jHxmxz49BOg9BlMeLW8hy6osqA1eM+UT4Ws95h43D6HUorPJ8+6yRf+aerUp2KCBYg b8BZZYkjJp0VjdP1Reb7W3gZmv2fuEF/ZR3gd6CLSf1VrffJKMPc/Z9Sz4y5/adO6O+t79 ID63Hfl8hSfXgKpQszWrLDJ+u+PUmDuVGJCBLqZCmXV1ZO+nBTGUR/Uc26ySZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=AR+Ork7K; 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-Migadu-Spam-Score: -2.60 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=AR+Ork7K; 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-Migadu-Queue-Id: 9253336C8F X-Spam-Score: -2.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: zMCoGDALf8OD Uwe Brauer writes: > ("mg" "Exercicios Annu21: asignados" > table-line (file+headline "~/somefile.org" "Exercicios Annu21: asignados") > > However in that file I also want a header of the form > > * Exercicios Annu21: asignados <2021-03-19 vie 09:48> > > That is a changing timestamp in the heading. How can I achieve that for > my template? If you want to create a new heading with the timestamp, you can use file+function as your target in the template (see org-capture-templates docstring). If you want to change the existing heading, you can use file+regexp as target and add a function modifying your heading to org-capture-before-finalize-hook You may also try https://github.com/progfolio/doct to make the above a little simpler. Hope it helps. Best, Ihor