From: Uwe Brauer <oub@mat.ucm.es>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Uwe Brauer <oub@mat.ucm.es>, emacs-orgmode@gnu.org
Subject: Re: org-capture-template with changing heading (including a TIMESTAMP)
Date: Sun, 03 Oct 2021 09:26:14 +0200 [thread overview]
Message-ID: <87ilyein6x.fsf@mat.ucm.es> (raw)
In-Reply-To: 87mtnq7grc.fsf@localhost
[-- Attachment #1: Type: text/plain, Size: 1774 bytes --]
>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:
> Uwe Brauer <oub@mat.ucm.es> 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).
Thanks
I tried
("mg" "Ejercicios Annu21: hechos, solicitados y asignados"
table-line (file+function "~/ALLES/HGs/tex/vorlesungen/HGAnnu/Ejercios-Alumnos-Grupos/2021/Ejercios-Teoria21.org" "Ejercicios Annu21: hechos, solicitados y asignados" (clock))
"| |%^{Grp|1|2|3|4|5|6|7|8} |%^{Hj|1|2|3|4|5|6|7} |%^{Ej-As|1|2|3|4|5} |%^{Tit}| | [] | | | %:fromname| |%:fromaddress | %(my-extract-cc) |%:subject | %:date |%a | " :prepend t :empty-lines 1 :unnarrowed t
)
But it does not work, I receive the error
org-capture-set-target-location: Invalid capture target specification: (file+function "~/ALLES/HGs/tex/vorlesungen/HGAnnu/Ejercios-Alumnos-Grupos/2021/Ejercios-Teoria21.org" "Ejercicios Annu21: hechos, solicitados y asignados" (clock))
I also tried clock instead of clock.
I most likely misunderstood you.
> 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.
I try that thanks
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
next prev parent reply other threads:[~2021-10-03 7:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 8:55 org-capture-template with changing heading (including a TIMESTAMP) Uwe Brauer
2021-10-03 6:40 ` Ihor Radchenko
2021-10-03 7:26 ` Uwe Brauer [this message]
2021-10-03 9:19 ` Ihor Radchenko
2021-10-04 10:51 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilyein6x.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).