* add-log-time-format with time? @ 2022-10-02 20:18 Uwe Brauer 2022-10-03 6:49 ` [SOLVED] (was: add-log-time-format with time?) Uwe Brauer 0 siblings, 1 reply; 4+ messages in thread From: Uwe Brauer @ 2022-10-02 20:18 UTC (permalink / raw) To: help-gnu-emacs 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [SOLVED] (was: add-log-time-format with time?) 2022-10-02 20:18 add-log-time-format with time? Uwe Brauer @ 2022-10-03 6:49 ` Uwe Brauer 2022-10-03 11:33 ` Emanuel Berg 0 siblings, 1 reply; 4+ messages in thread From: Uwe Brauer @ 2022-10-03 6:49 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 244 bytes --] >>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes: > Hi > According to a simple describe-variable suggests to use (defun my-changelog-date-format (&optional time zone) (format-time-string "%Y-%m-%d %H:%M")) Which indeed worked [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5673 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [SOLVED] (was: add-log-time-format with time?) 2022-10-03 6:49 ` [SOLVED] (was: add-log-time-format with time?) Uwe Brauer @ 2022-10-03 11:33 ` Emanuel Berg 2022-10-09 5:51 ` [SOLVED] Uwe Brauer 0 siblings, 1 reply; 4+ messages in thread From: Emanuel Berg @ 2022-10-03 11:33 UTC (permalink / raw) To: help-gnu-emacs Uwe Brauer wrote: > a simple describe-variable suggests to use > > (defun my-changelog-date-format (&optional time zone) > (format-time-string "%Y-%m-%d %H:%M")) > > Which indeed worked What time zone is that? -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [SOLVED] 2022-10-03 11:33 ` Emanuel Berg @ 2022-10-09 5:51 ` Uwe Brauer 0 siblings, 0 replies; 4+ messages in thread From: Uwe Brauer @ 2022-10-09 5:51 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 982 bytes --] >>> "EB" == Emanuel Berg <incal@dataswamp.org> writes: > Uwe Brauer wrote: >> a simple describe-variable suggests to use >> >> (defun my-changelog-date-format (&optional time zone) >> (format-time-string "%Y-%m-%d %H:%M")) >> >> Which indeed worked > What time zone is that? None, The code in add-log reads (defun add-log-iso8601-time-zone (&optional time zone) (declare (obsolete nil "26.1")) (format-time-string "%:::z" time zone)) (defvar add-log-iso8601-with-time-zone nil) (defun add-log-iso8601-time-string (&optional time zone) (format-time-string (if add-log-iso8601-with-time-zone "%Y-%m-%d %:::z" "%Y-%m-%d") time zone)) Since I don't think I will ever use time zones, I did not bother to set this right up. -- 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. [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5673 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-09 5:51 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-10-02 20:18 add-log-time-format with time? Uwe Brauer 2022-10-03 6:49 ` [SOLVED] (was: add-log-time-format with time?) Uwe Brauer 2022-10-03 11:33 ` Emanuel Berg 2022-10-09 5:51 ` [SOLVED] Uwe Brauer
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.