all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#66276: Use a seperate time format in rcirc logfiles
@ 2023-09-30  8:44 Thuna
  2024-01-10 18:11 ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Thuna @ 2023-09-30  8:44 UTC (permalink / raw)
  To: 66276

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

I believe that it is best to have two different time formats for
logfiles and normal rcirc buffers.  Logfiles need additional precision,
specifically the date and maybe the time zone, while normal buffers do
not.

The patch adds a single variable, rcirc-log-time-format, to control the
time format in logfiles, which is done by replacing the usage of
rcirc-time-format in rcirc-log with it.

I figured "%F %T %z " was a sensible default, although feel free to
change it as you wish.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: The patch --]
[-- Type: text/x-patch, Size: 1529 bytes --]

From f9985b17ce6db949d436e798a086e5e270e1bdfc Mon Sep 17 00:00:00 2001
From: Thuna <thuna.cing@gmail.com>
Date: Sat, 30 Sep 2023 10:30:13 +0200
Subject: [PATCH] Use a seperate time format in rcirc logfiles than in rcirc
 buffers

* rcirc.el (rcirc-log-time-format): Define a seperate variable to
control the time format in logfiles.
(rcirc-log): Use rcirc-log-time-format instead of rcirc-time-format.
---
 lisp/net/rcirc.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 7afb625407e..af776296cea 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -229,6 +229,11 @@ rcirc-time-format
 Used as the first arg to `format-time-string'."
   :type 'string)
 
+(defcustom rcirc-log-time-format "%F %T %z "
+  "Describes how timestamps are printed in logfiles.
+Used as the first arg to `format-time-string'."
+  :type 'string)
+
 (defcustom rcirc-input-ring-size 1024
   "Size of input history ring."
   :type 'integer)
@@ -2213,7 +2218,7 @@ rcirc-log
                 (parse-iso8601-time-string time))))
     (unless (null filename)
       (let ((cell (assoc-string filename rcirc-log-alist))
-            (line (concat (format-time-string rcirc-time-format time)
+            (line (concat (format-time-string rcirc-log-time-format time)
                           (substring-no-properties
                            (rcirc-format-response-string process sender
                                                          response target text))
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#66276: Use a seperate time format in rcirc logfiles
  2023-09-30  8:44 bug#66276: Use a seperate time format in rcirc logfiles Thuna
@ 2024-01-10 18:11 ` Stefan Kangas
  2024-01-10 19:06   ` Philip Kaludercic
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2024-01-10 18:11 UTC (permalink / raw)
  To: Thuna; +Cc: Philip Kaludercic, 66276

Thuna <thuna.cing@gmail.com> writes:

> I believe that it is best to have two different time formats for
> logfiles and normal rcirc buffers.  Logfiles need additional precision,
> specifically the date and maybe the time zone, while normal buffers do
> not.
>
> The patch adds a single variable, rcirc-log-time-format, to control the
> time format in logfiles, which is done by replacing the usage of
> rcirc-time-format in rcirc-log with it.
>
> I figured "%F %T %z " was a sensible default, although feel free to
> change it as you wish.

Philip, could you please take a look at this patch?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#66276: Use a seperate time format in rcirc logfiles
  2024-01-10 18:11 ` Stefan Kangas
@ 2024-01-10 19:06   ` Philip Kaludercic
  2024-01-10 21:05     ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Philip Kaludercic @ 2024-01-10 19:06 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 66276, Thuna

Stefan Kangas <stefankangas@gmail.com> writes:

> Thuna <thuna.cing@gmail.com> writes:
>
>> I believe that it is best to have two different time formats for
>> logfiles and normal rcirc buffers.  Logfiles need additional precision,
>> specifically the date and maybe the time zone, while normal buffers do
>> not.
>>
>> The patch adds a single variable, rcirc-log-time-format, to control the
>> time format in logfiles, which is done by replacing the usage of
>> rcirc-time-format in rcirc-log with it.
>>
>> I figured "%F %T %z " was a sensible default, although feel free to
>> change it as you wish.
>
> Philip, could you please take a look at this patch?

We have already merged a similar functionality with bug#67597.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#66276: Use a seperate time format in rcirc logfiles
  2024-01-10 19:06   ` Philip Kaludercic
@ 2024-01-10 21:05     ` Stefan Kangas
  2024-01-11  7:57       ` Philip Kaludercic
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2024-01-10 21:05 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: 66276, Thuna

Philip Kaludercic <philipk@posteo.net> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> Thuna <thuna.cing@gmail.com> writes:
>>
>>> I believe that it is best to have two different time formats for
>>> logfiles and normal rcirc buffers.  Logfiles need additional precision,
>>> specifically the date and maybe the time zone, while normal buffers do
>>> not.
>>>
>>> The patch adds a single variable, rcirc-log-time-format, to control the
>>> time format in logfiles, which is done by replacing the usage of
>>> rcirc-time-format in rcirc-log with it.
>>>
>>> I figured "%F %T %z " was a sensible default, although feel free to
>>> change it as you wish.
>>
>> Philip, could you please take a look at this patch?
>
> We have already merged a similar functionality with bug#67597.

So what should we do with this one?  Close?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#66276: Use a seperate time format in rcirc logfiles
  2024-01-10 21:05     ` Stefan Kangas
@ 2024-01-11  7:57       ` Philip Kaludercic
  2024-01-11 20:23         ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Philip Kaludercic @ 2024-01-11  7:57 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 66276, Thuna

Stefan Kangas <stefankangas@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Stefan Kangas <stefankangas@gmail.com> writes:
>>
>>> Thuna <thuna.cing@gmail.com> writes:
>>>
>>>> I believe that it is best to have two different time formats for
>>>> logfiles and normal rcirc buffers.  Logfiles need additional precision,
>>>> specifically the date and maybe the time zone, while normal buffers do
>>>> not.
>>>>
>>>> The patch adds a single variable, rcirc-log-time-format, to control the
>>>> time format in logfiles, which is done by replacing the usage of
>>>> rcirc-time-format in rcirc-log with it.
>>>>
>>>> I figured "%F %T %z " was a sensible default, although feel free to
>>>> change it as you wish.
>>>
>>> Philip, could you please take a look at this patch?
>>
>> We have already merged a similar functionality with bug#67597.
>
> So what should we do with this one?  Close?

We can close it.  Does it also have to be marked as duplicate?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#66276: Use a seperate time format in rcirc logfiles
  2024-01-11  7:57       ` Philip Kaludercic
@ 2024-01-11 20:23         ` Stefan Kangas
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Kangas @ 2024-01-11 20:23 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: 66276, Thuna

unarchive 67597
forcemerge 67597 66276
thanks

Philip Kaludercic <philipk@posteo.net> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> So what should we do with this one?  Close?
>
> We can close it.  Does it also have to be marked as duplicate?

Thanks.  It won't hurt to merge the bugs (our way of marking it as a
duplicate), so I did that above.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-11 20:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-30  8:44 bug#66276: Use a seperate time format in rcirc logfiles Thuna
2024-01-10 18:11 ` Stefan Kangas
2024-01-10 19:06   ` Philip Kaludercic
2024-01-10 21:05     ` Stefan Kangas
2024-01-11  7:57       ` Philip Kaludercic
2024-01-11 20:23         ` Stefan Kangas

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.