help-gnu-emacs
[Top][All Lists]
Advanced

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

add-log-time-format with time?


From: Uwe Brauer
Subject: add-log-time-format with time?
Date: Sun, 02 Oct 2022 22:18:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Hi

According to 

(defcustom add-log-time-format 'add-log-iso8601-time-string
  "*Function that defines the time format.
For example, `add-log-iso8601-time-string', which gives the
date in international ISO 8601 format,
and `current-time-string' are two valid values."
  :type '(radio (const :tag "International ISO 8601 format"
                       add-log-iso8601-time-string)
                (const :tag "Old format, as returned by `current-time-string'"
                       current-time-string)
                (function :tag "Other"))
  :group 'change-log)

The possible entries in a ChangeLog are 
,----
| 
| Sun Oct  2 21:56:09 2022  Uwe Brauer  <oub@mat.ucm.es>
| 
|       * new.org (Third section): 4 
`----


Or

,----
| 2022-10-02  Uwe Brauer  <oub@mat.ucm.es>
| 
|       * first.org (this is new file): 4 a new file
`----

How could I achieve 


,----
| 2022-10-02  21:56:09 Uwe Brauer  <oub@mat.ucm.es>
| 
|       * first.org (this is new file): 4 a new file
`----


I tried 

(defun my-changelog-date-format ()
  "A simple hack to obtain `2022-10-02 22:10'."
  (interactive)
  (insert (format-time-string "%Y-%m-%d %H:%M")))

Choice:
( ) International ISO 8601 format
( ) Old format, as returned by ‘current-time-string’
(*) Other: my-changelog-date-format
    State : SAVED and set.
   Function that defines the time format. Hide
   For example, ‘add-log-iso8601-time-string’, which gives the
   date in international ISO 8601 format,
   and ‘current-time-string’ are two valid values.

But it did not work.

Any ideas

Uwe Brauer 


-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 




reply via email to

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