GNU bug report logs - #70531
insert timestamps and serial numbers along with \f\n in error-file

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Dan Jacobson <jidanni@HIDDEN>; dated Tue, 23 Apr 2024 10:13:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Apr 2024 10:12:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 23 06:12:13 2024
Received: from localhost ([127.0.0.1]:51201 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzD8G-0004Xi-Q5
	for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 06:12:13 -0400
Received: from lists.gnu.org ([2001:470:142::17]:47988)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1rzD8D-0004W0-II
 for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 06:12:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jidanni@HIDDEN>)
 id 1rzD7r-0004Cs-N8
 for bug-gnu-emacs@HIDDEN; Tue, 23 Apr 2024 06:11:47 -0400
Received: from iguana.tulip.relay.mailchannels.net ([23.83.218.253])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jidanni@HIDDEN>)
 id 1rzD7p-0007Yt-Hu
 for bug-gnu-emacs@HIDDEN; Tue, 23 Apr 2024 06:11:47 -0400
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id D05025C1DBC
 for <bug-gnu-emacs@HIDDEN>; Tue, 23 Apr 2024 10:11:42 +0000 (UTC)
Received: from pdx1-sub0-mail-a258.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 6B2705C1D55
 for <bug-gnu-emacs@HIDDEN>; Tue, 23 Apr 2024 10:11:42 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1713867102; a=rsa-sha256;
 cv=none;
 b=NDSlQlSNaK38DGIg5VYg7pmy78n77WkDJ2NebEcRSBZ3EfKdpAoku1JUg1klb6Dnw2NvKk
 j38EHj4NcXsJwFA8eITB5nX8bj2kExJhyEsWQzAaJpIHM6xDjoFG81rmF3RcWy4By7tsfO
 Z4pdxPJsI4AIFxlVAT6xB7Gn8f2lExKtilvyFtuiBfbO7WlCAtfidMbLEB9wXTQjBa+iAZ
 RQUw/3mYl+OPeyh9XLibfxe/KfHsjbQl/l199GNa2/1KPS0iYmJGCDWIo8DIdLlggpkNLK
 QCjK00w4jwvSVbzGoQhpyQBWUGGlUjpXdPcLNRuVzQvBwgPXr7TZNGlLkukFDA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1713867102;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:dkim-signature;
 bh=YWADl80KbeFTCYXMsiJ9WcZ/4ZUfrdoFeXuKEEAC660=;
 b=YEFYnZ5q1k9VGp3scVMVTFyOGb4xcVgVQiheOrHexu/XNgmvuIGFaS5zRtG2uueyyv/O+a
 v2Q2qhHXNzBzNKzn9s8u0XmG0i+S4F/ud5Q6jWLr+f3mUcg/bdyhwiBS93dHI+LVAnsW45
 RhW+Ap6DBI06G/ad2V5oQIAPPqu0Duix/kY4cfR2U2d1SNhlDjWu4rsec6DTVb5CFgaU9f
 M28CVqVm3GriYh6EN8AMkL7byIJlBLNGKNrfCUyuKySsdYD/h38IfL1OWawVUjN19u0hYx
 hLmfd6FTsDiiyV9UA5+CRKHIq1YzJ+kqGCYaW8NYN8BumEIdaXbuEL4tSAL6Rw==
ARC-Authentication-Results: i=1; rspamd-796b8f565b-fz6tr;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=jidanni@HIDDEN
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Cold-Imminent: 30d5edf26b789220_1713867102673_3211557914
X-MC-Loop-Signature: 1713867102673:1965732406
X-MC-Ingress-Time: 1713867102673
Received: from pdx1-sub0-mail-a258.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.102.9.179 (trex/6.9.2); Tue, 23 Apr 2024 10:11:42 +0000
Received: from jidanni.org (114-41-23-16.dynamic-ip.hinet.net [114.41.23.16])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by pdx1-sub0-mail-a258.dreamhost.com (Postfix) with ESMTPSA id 4VNyZk1jMkzHc
 for <bug-gnu-emacs@HIDDEN>; Tue, 23 Apr 2024 03:11:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jidanni.org;
 s=dreamhost; t=1713867102;
 bh=YWADl80KbeFTCYXMsiJ9WcZ/4ZUfrdoFeXuKEEAC660=;
 h=From:To:Subject:Date:Content-Type:Content-Transfer-Encoding;
 b=UHkG+jH+qqmtrcUtAw7Vl+xkAZOo/FTbqIi+yW7gJ+3eTlcX8viYxbgnYsSScteB9
 t2ZbjhHxjediceIiVhX5/N+vS9KB8xba/Gy1yHY+eoqJosALYCD0gN3ua6W1KbYY3k
 Avirz5JfTu5jl79c3FwPQV/wwnnYw7l1yM5Su6CMSRusYtrhY44lR6KV5pnBvEJHc8
 YvgOO+BHY8EuGz9RuJAAk8nVhh68PpJmA7c/SkGvQiwpeXPJxHkGr9AenarzbDRpKj
 6YYXfNDbKeDVADwRPl+tnqV/WV2Om5k7Pc9O7xn+HKD2p6D9zx+h3LLIvPXDKJA6T1
 lT0IxjP5jBsiw==
From: Dan Jacobson <jidanni@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: insert timestamps and serial numbers along with \f\n in error-file
Date: Tue, 23 Apr 2024 18:11:37 +0800
Message-ID: <87le54bd7q.n.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=23.83.218.253; envelope-from=jidanni@HIDDEN;
 helo=iguana.tulip.relay.mailchannels.net
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

shell-command-on-region is an interactive native-compiled Lisp
function in ‘simple.el’.

In it there is this code:

    (when (and error-file (file-exists-p error-file))
      (if (< 0 (file-attribute-size (file-attributes error-file)))
	  (with-current-buffer (get-buffer-create error-buffer)
            (goto-char (point-max))
            ;; Insert a separator if there's already text here.
	    (unless (bobp)
	      (insert "\f\n"))

Problem is the user cannot tell which stuff, the stuff above the \f\n,
or the stuff below the \f\n is newer!

You might think that after a few years the user will figure it out and
remember it. But the user also worries "maybe where the message gets
inserted also depends which part of the error buffer I was looking at
last moments before." even if not the case.

All this could be cleared up, if along with inserting the \f\n, a
timestamp were inserted. Or at least a serial number: \f\nError group 1:
\f\nError group 2: etc. Best of all would be to use both a timestamp and
a serial number.

In fact (insert "\f\n") makes a heavy assumption that the user usually
doesn't have any \f's of their own in that file. But it is a bad thing
to have it hardwired in the first place, requiring the user to change
the entire function in order to choose a different separator. So maybe
have it a variable, set to \f\n by default, or better something like
("\f\n" . some-counter . some-time-stamp . "\n").

emacs-version "29.3"




Acknowledgement sent to Dan Jacobson <jidanni@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70531; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 1 Mar 2025 03:00:02 UTC

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