emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Warning on executing keyboard macro that inserts time-stamp [9


From: Punit Arya
Subject: Re: [BUG] Warning on executing keyboard macro that inserts time-stamp [9.6.27 ( @ /home/punit/.emacs.d/elpa/org-9.6.27/)]
Date: Tue, 21 May 2024 18:40:42 +0530
User-agent: Mozilla Thunderbird

On 2024-05-17 17:20, Ihor Radchenko wrote:
Punit Arya <arya.punit@gmail.com> writes:

This is an EMACS keyboard macro that I've been using since more than 4-5
years now.

(global-set-key [24 11 48] 'my-insert-timestamp)  ;; It translates to
the key sequence: C-x C-k 0

Its definition is:

(fset 'my-insert-timestamp
     (kmacro-lambda-form [?* ?\C-u ?\M-! ?p ?r ?i ?n ?t ?f ?  ?\" ?% ?\(
?% ?F ?  ?% ?T ?\) ?T ?\" ?* ?\C-m ?\C-e ?\C-m ?\C-m] 0 "%d"))

Which basically means to to execute the key sequence: C-u M-! printf
"%(%F %T)".  This in turn executes the command to insert the time-stamp
at point's location.

This macro does execute and the time-stamp does get printed, but I also
get a Warning pop-up in the EMACS frame as a window.

Thanks for reporting!
Unfortunately, I am unable to reproduce this on my side because C-u M-!
printf ... command does not work with my shell:

/bin/bash: line 1: printf: warning: `': invalid time format specification
/bin/bash: line 1: printf: `T': invalid format character
%(0.000000

May you try to use the development version of Org mode and let me know
if you keep seeing the warning?


Sorry, I missed the "T" there in the command.  The whole command is:

printf "%(%F %T)T"

I'm working on setting up the Org mode dev environment. Will try to reproduce in that environment and update.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]