[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: insert a header and automatically a timestamp with date/time
From: |
Uwe Brauer |
Subject: |
Re: insert a header and automatically a timestamp with date/time |
Date: |
Sat, 01 Feb 2025 18:43:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>>> "GdaO" == General discussions about Org-mode <pinmacs> writes:
> On 2025-02-01 08:55, Uwe Brauer via General discussions about
> Org-mode. wrote:
>> Is there any way to insert a header and automatically a timestamp with
>> date/time?
>>
>> I can write me a small function doing this and bind it to some unused
>> key, but is there a more general/elegant way I just miss?
Hi pinmacs
(BTW do you speak Spanish , since there is some Spanish text in the
files that are attached)
Anyhow.
Let me see if I understand that correctly
- Your code does not insert
* <2025-02-01>
But instead
* Some heading
:PROPERTIES:
:CREATED: [2023-11-17 Fri 19:32]
:END:
that is also ok, but for the moment I prefer the timestamp in the
heading, because if I use outline-hide-body I obtain a nice overview
with the dates.
- Another problem is that I don't get your code to work for example
the one in the file auto-insert-created-timestamp-as-property.org
gives me
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-function
my/set-property-with-inactive-timestamp)
(my/set-property-with-inactive-timestamp "CREATED")
(save-excursion (org-back-to-heading)
(my/set-property-with-inactive-timestamp "CREATED"))
my/org-heading-insert-heading-inactive-timestamp()
run-hooks(org-insert-heading-hook)
org-insert-heading(nil)
funcall-interactively(org-insert-heading nil)
call-interactively(org-insert-heading)
(or (run-hook-with-args-until-success 'org-metareturn-hook)
(call-interactively (cond (arg #'org-insert-heading) ((org-at-table-p)
#'org-table-wrap-region) ((org-in-item-p) #'org-insert-item) (t
#'org-insert-heading))))
(closure (org-clock-history org-with-time org-defdecode org-def
org-read-date-inactive org-ans2 org-ans1 org-columns-current-fmt-compiled
org-clock-current-task org-clock-effort org-end-time-was-given
org-time-was-given org-state org-agenda-headline-snapshot-before-repeat
org-element-cache-version org-struct-menu org-last-state org-clock-start-time
org-export-registered-backends org-indent-indentation-per-level
org-inlinetask-min-level t) (&optional arg) "Insert a new heading or wrap a
region in a table.\n..." (interactive "P") (or
(run-hook-with-args-until-success 'org-metareturn-hook) (call-interactively
(cond (arg #'org-insert-heading) ((org-at-table-p) #'org-table-wrap-region)
((org-in-item-p) #'org-insert-item) (t #'org-insert-heading)))))(nil)
apply((closure (org-clock-history org-with-time org-defdecode org-def
org-read-date-inactive org-ans2 org-ans1 org-columns-current-fmt-compiled
org-clock-current-task org-clock-effort org-end-time-was-given
org-time-was-given org-state org-agenda-headline-snapshot-before-repeat
org-element-cache-version org-struct-menu org-last-state org-clock-start-time
org-export-registered-backends org-indent-indentation-per-level
org-inlinetask-min-level t) (&optional arg) "Insert a new heading or wrap a
region in a table.\n..." (interactive "P") (or
(run-hook-with-args-until-success 'org-metareturn-hook) (call-interactively
(cond (arg #'org-insert-heading) ((org-at-table-p) #'org-table-wrap-region)
((org-in-item-p) #'org-insert-item) (t #'org-insert-heading))))) nil)
org-meta-return(nil)
funcall-interactively(org-meta-return nil)
call-interactively(org-meta-return nil nil)
command-execute(org-meta-return)
--8<---------------cut here---------------end--------------->8---
The one in autoadd-scheduled-entry.org refers to files I don't have.
Anyhow I continue playing with your code.
Thanks for sharing it
Uwe
smime.p7s
Description: S/MIME cryptographic signature
- insert a header and automatically a timestamp with date/time, Uwe Brauer, 2025/02/01
- Re: insert a header and automatically a timestamp with date/time, pinmacs, 2025/02/01
- Re: insert a header and automatically a timestamp with date/time,
Uwe Brauer <=
- Re: insert a header and automatically a timestamp with date/time, Pedro, 2025/02/01
- Re: insert a header and automatically a timestamp with date/time, Uwe Brauer, 2025/02/02
- Re: insert a header and automatically a timestamp with date/time, pinmacs, 2025/02/02
- Re: insert a header and automatically a timestamp with date/time, Uwe Brauer, 2025/02/02
- Re: insert a header and automatically a timestamp with date/time, pinmacs, 2025/02/02
- Re: insert a header and automatically a timestamp with date/time, Uwe Brauer, 2025/02/03