GNU bug report logs - #67597
[PATCH] Specific crirc log file time stamp forma

Previous Next

Package: emacs;

Reported by: Matto Fransen <matto <at> matto.nl>

Date: Sun, 3 Dec 2023 08:35:02 UTC

Severity: normal

Tags: patch

Merged with 66276

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67597 in the body.
You can then email your comments to 67597 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#67597; Package emacs. (Sun, 03 Dec 2023 08:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matto Fransen <matto <at> matto.nl>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 03 Dec 2023 08:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matto Fransen <matto <at> matto.nl>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Specific crirc log file time stamp forma
Date: Sat, 02 Dec 2023 21:19:07 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

Allows the time stamp in crirc log files to differ from
the format in the chat buffers.
For example, the chat buffers can have the format "%H:%M ",
while the log files can have a format including the date.


In GNU Emacs 30.0.50 (build 1, x86_64-unknown-freebsd14.0) of 2023-12-02
 built on testnuc.tradesystem.nl
 Repository revision: fb4b0b30a24e8192e71c1425dc8a295cf39f64ff
 Repository branch: rcirc-log-timestamp-format
 System Description: 14.0-RELEASE-p1

Configured using:
 'configure --with-x-toolkit=no --without-x'
 
[0001-Specific-crirc-log-file-time-stamp-format.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67597; Package emacs. (Sat, 16 Dec 2023 10:40:02 GMT) Full text and rfc822 format available.

Message #8 received at 67597 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Matto Fransen <matto <at> matto.nl>
Cc: 67597 <at> debbugs.gnu.org
Subject: Re: bug#67597: [PATCH] Specific rcirc log file time stamp format
Date: Sat, 16 Dec 2023 10:39:18 +0000
Matto Fransen <matto <at> matto.nl> writes:

> Tags: patch
>
> Allows the time stamp in crirc log files to differ from
                           ^
                           "rcirc"; you appear to make this typo a few
                           more times below.

> the format in the chat buffers.
> For example, the chat buffers can have the format "%H:%M ",
> while the log files can have a format including the date.
>
> In GNU Emacs 30.0.50 (build 1, x86_64-unknown-freebsd14.0) of 2023-12-02
>  built on testnuc.tradesystem.nl
>  Repository revision: fb4b0b30a24e8192e71c1425dc8a295cf39f64ff
>  Repository branch: rcirc-log-timestamp-format
>  System Description: 14.0-RELEASE-p1
>
> Configured using:
>  'configure --with-x-toolkit=no --without-x'
>  
>
>>From fa0927f06e88322e274f8ce668a71de41b02b80a Mon Sep 17 00:00:00 2001
> From: Matto Fransen <mattofransen <at> gmail.com>
> Date: Sat, 2 Dec 2023 20:55:37 +0100
> Subject: [PATCH] Specific crirc log file time stamp fomrmat
>
> The time stamp format in the chat buffer may now
> differ from the format in the log files.
> * doc/misc/rcirc.texi: Document new variable
> * lisp/net/rcirc.el (rcirc-log-time-format):
> Custom variable for the format.
>
> Copyright-paperwork-exempt: yes
> ---
>  doc/misc/rcirc.texi | 8 ++++++++
>  etc/NEWS            | 7 ++++++-
>  lisp/net/rcirc.el   | 8 +++++++-
>  3 files changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
> index 6b10d1ab2a4..aa424d8e164 100644
> --- a/doc/misc/rcirc.texi
> +++ b/doc/misc/rcirc.texi
> @@ -929,6 +929,7 @@ Changing the time stamp format
>  @cindex date time
>  @cindex format time stamp
>  @vindex rcirc-time-format
> +@vindex rcirc-log-time-format
>  
>  @code{rcirc-time-format} is the format used for the time stamp.  Here's
>  how to include the date in the time stamp:
> @@ -937,6 +938,13 @@ Changing the time stamp format
>  (setopt rcirc-time-format "%Y-%m-%d %H:%M ")
>  @end example
>  
> +@code{rcirc-log-time-format} is the format used for the time stamp
> +in the log files.  Here's how to use month and day in the time stamp:
> +
> +@example
> +(setopt rcirc-log-time-format "%m-%d %H:%M ")
> +@end example

I don't think the example here is necessary, nor does duplicating the
previous paragraph sound nice IMO.  It should suffice to just mention
the user option in a sentence like

  "For log files, a different time format can be specified using the
  `rcirc-log-time-format' user option."

>  @findex rcirc-when
>  If you don't wish to use verbose time formatting all the time, you can
>  use the @code{rcirc-when} command to display a complete timestamp for
> diff --git a/etc/NEWS b/etc/NEWS
> index da00ea9dbda..44cbf21a3d3 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -1077,11 +1077,16 @@ For links in 'webjump-sites' without an explicit URI scheme, it was
>  previously assumed that they should be prefixed with "http://".  Such
>  URIs are now prefixed with "https://" instead.
>  
> ----
> +
>  *** 'bug-reference-mode' now supports 'thing-at-point'.
>  Now, calling '(thing-at-point 'url)' when point is on a bug reference
>  will return the URL for that bug.
>  
> +

You don't need to add these empty newlines before each header.

> +*** Specific timestamp format for crirc log files
> +Now, the timestamp format in crirc chat buffers can differ from the
> +timestamp format in the log files.
> +
>  ** Customize
>  
>  +++
> diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
> index ecfeb9f8f84..6390d4dd284 100644
> --- a/lisp/net/rcirc.el
> +++ b/lisp/net/rcirc.el
> @@ -229,6 +229,12 @@ rcirc-time-format
>  Used as the first arg to `format-time-string'."
>    :type 'string)
>  
> +(defcustom rcirc-log-time-format "%d-%b %H:%M "
> +  "Describes how timestamps are printed in the log files.
> +Used as the first arg to `format-time-string'."
> +  :version "30.1"
> +  :type 'string )
> +
>  (defcustom rcirc-input-ring-size 1024
>    "Size of input history ring."
>    :type 'integer)
> @@ -2209,7 +2215,7 @@ rcirc-log
>                  (parse-iso8601-time-string time t))))
>      (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))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67597; Package emacs. (Tue, 19 Dec 2023 22:23:01 GMT) Full text and rfc822 format available.

Message #11 received at 67597 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Matto Fransen <matto <at> matto.nl>
Cc: 67597 <at> debbugs.gnu.org
Subject: Re: bug#67597: [PATCH] Specific rcirc log file time stamp format
Date: Tue, 19 Dec 2023 22:22:23 +0000
Matto Fransen <matto <at> matto.nl> writes:

> On 16 December 2023 10:39 Philip Kaludercic, wrote:
> Hi Philip,
>
> Thanks for reviewing my patch.
> Based on your remarks, I created a new patch, see attached.

Find my comments below.

> Is it enough to send you this patch, or should I also send it
> somehow to the mailinglist? (I have no experience what so ever
> with sending patches)

I have resent your message to the bug tracker and am responding here as
well.  Ideally you should always use wide replies when composing a
response, then everyone involved gets the message and the conversation
can be found in the archives.

> Best regards,
>
> Matto
>
> From 31535c00e75a169b886789e39564617750448c29 Mon Sep 17 00:00:00 2001
> From: Matto Fransen <mattofransen <at> gmail.com>
> Date: Tue, 19 Dec 2023 13:14:33 +0100
> Subject: [PATCH] Specific rcirc log file time stamp fomrmat
>
> The time stamp format in the chat buffer may now
> differ from the format in the log files.
> * doc/misc/rcirc.texi: Document new variable
> * lisp/net/rcirc.el (rcirc-log-time-format):
> Custom variable for the format.
>
> Copyright-paperwork-exempt: yes
> ---
>  doc/misc/rcirc.texi | 4 ++++
>  etc/NEWS            | 3 +++
>  lisp/net/rcirc.el   | 8 +++++++-
>  3 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
> index 6b10d1ab2a4..d6cf9066918 100644
> --- a/doc/misc/rcirc.texi
> +++ b/doc/misc/rcirc.texi
> @@ -929,6 +929,7 @@ Changing the time stamp format
>  @cindex date time
>  @cindex format time stamp
>  @vindex rcirc-time-format
> +@vindex rcirc-log-time-format
>  
>  @code{rcirc-time-format} is the format used for the time stamp.  Here's
>  how to include the date in the time stamp:
> @@ -937,6 +938,9 @@ Changing the time stamp format
>  (setopt rcirc-time-format "%Y-%m-%d %H:%M ")
>  @end example
>  
> +For log files, a different time format can be specified using the
> +`rcirc-log-time-format' user option.
> +
>  @findex rcirc-when
>  If you don't wish to use verbose time formatting all the time, you can
>  use the @code{rcirc-when} command to display a complete timestamp for
> diff --git a/etc/NEWS b/etc/NEWS
> index 90ff23b7937..910db376458 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -1152,6 +1152,9 @@ URIs are now prefixed with "https://" instead.
>  *** 'bug-reference-mode' now supports 'thing-at-point'.
>  Now, calling '(thing-at-point 'url)' when point is on a bug reference
>  will return the URL for that bug.

An empty line between these two entries is expected, I think I might
have misphrased myself in my last message?

> +*** Specific timestamp format for rcirc log files
> +Now, the timestamp format in rcirc chat buffers can differ from the
> +timestamp format in the log files.
>  
>  ** Customize
>  
> diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
> index ecfeb9f8f84..6390d4dd284 100644
> --- a/lisp/net/rcirc.el
> +++ b/lisp/net/rcirc.el
> @@ -229,6 +229,12 @@ rcirc-time-format
>  Used as the first arg to `format-time-string'."
>    :type 'string)
>  
> +(defcustom rcirc-log-time-format "%d-%b %H:%M "
> +  "Describes how timestamps are printed in the log files.
> +Used as the first arg to `format-time-string'."
> +  :version "30.1"
> +  :type 'string )
> +
>  (defcustom rcirc-input-ring-size 1024
>    "Size of input history ring."
>    :type 'integer)
> @@ -2209,7 +2215,7 @@ rcirc-log
>                  (parse-iso8601-time-string time t))))
>      (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))

Looks fine otherwise.  I can fix the above issue if nothing else pops
up.

Another discussion, which I might have forgotten to mention (?) is that
it might be nice to generalise logging so that one might choose to write
ones logs into a SQLite database.  But I am guessing you are not
interested in working on this, because you haven't signed the CA yet,
right?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67597; Package emacs. (Tue, 19 Dec 2023 22:34:01 GMT) Full text and rfc822 format available.

Message #14 received at 67597 <at> debbugs.gnu.org (full text, mbox):

From: Matto Fransen <matto <at> matto.nl>
To: Philip Kaludercic <philipk <at> posteo.net>
Subject: Re: bug#67597: [PATCH] Specific rcirc log file time stamp format
Date: Tue, 19 Dec 2023 12:41:39 +0000
[Message part 1 (text/plain, inline)]
On 16 December 2023 10:39 Philip Kaludercic, wrote:
Hi Philip,

Thanks for reviewing my patch.
Based on your remarks, I created a new patch, see attached.

Is it enough to send you this patch, or should I also send it
somehow to the mailinglist? (I have no experience what so ever
with sending patches)

Best regards,

Matto
[0001-Specific-rcirc-log-file-time-stamp-fomrmat.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
> Matto Fransen <matto <at> matto.nl> writes:
>
>> Tags: patch
>>
>> Allows the time stamp in crirc log files to differ from
>                            ^
>                            "rcirc"; you appear to make this typo a few
>                            more times below.
>
8< --snip--

Reply sent to Philip Kaludercic <philipk <at> posteo.net>:
You have taken responsibility. (Wed, 20 Dec 2023 20:31:01 GMT) Full text and rfc822 format available.

Notification sent to Matto Fransen <matto <at> matto.nl>:
bug acknowledged by developer. (Wed, 20 Dec 2023 20:31:02 GMT) Full text and rfc822 format available.

Message #19 received at 67597-done <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Matto Fransen <matto <at> matto.nl>
Cc: 67597-done <at> debbugs.gnu.org
Subject: Re: bug#67597: [PATCH] Specific rcirc log file time stamp format
Date: Wed, 20 Dec 2023 20:30:24 +0000
The patch has been applied with minor changes and pushed to master.

Thanks!




Forcibly Merged 66276 67597. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 11 Jan 2024 20:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 09 Feb 2024 12:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 92 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.