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: Ihor Radchenko
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: Fri, 17 May 2024 11:50:24 +0000

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?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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