From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 16 03:37:18 2025 Received: (at submit) by debbugs.gnu.org; 16 Aug 2025 07:37:18 +0000 Received: from localhost ([127.0.0.1]:40691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unBTa-00066E-4U for submit@debbugs.gnu.org; Sat, 16 Aug 2025 03:37:18 -0400 Received: from lists.gnu.org ([2001:470:142::17]:41146) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1un0IU-0002mR-7T for submit@debbugs.gnu.org; Fri, 15 Aug 2025 15:41:09 -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 ) id 1un0IL-0004yu-N6 for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2025 15:40:57 -0400 Received: from relay.yourmailgateway.de ([188.68.63.102]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1un0IE-0006RE-KW for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2025 15:40:57 -0400 Received: from mors-relay-2502.netcup.net (localhost [127.0.0.1]) by mors-relay-2502.netcup.net (Postfix) with ESMTPS id 4c3XXF6vmWz67Ml for ; Fri, 15 Aug 2025 21:40:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rd10.de; s=key2; t=1755286846; bh=I/QbYSrcg7ZxJS4XqgmMyHuEG51XCp91Aipon8gk6QE=; h=Date:To:From:Subject:From; b=bmeqc8fwdNCTeU0D2UOSCQ31yB+MKad3jOJ5Ecju06XzIS8Fm0IJqzvLwzrAk91Xa 0AqJPX8+H5tj/YVMChDHIRwiOeplfAYh9IIfnpHPiNJ4CMPcOJGhk8e90K4zaBWEb6 C3ONWmjNgZm/o0nPkkg43wuTiTCJPIrB8Nb2zxGkKWuvbKQD5vizavm5SJHBPnkCjh QkxFJYfbQaTlxqUTWnEQNWj9DYlNDQsXxetajzFUQ5sYSHYGAcCKKxpwgbvj/TtNAK U1x2Kuy/f1Az6wPtrJBxGjgkhCzPiTxBx/8QCl0PYw44eTf5HUPyEoE7U2Sfr3R30O 0yqW4aiAT/E1Q== Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-2502.netcup.net (Postfix) with ESMTPS id 4c3XXF6BTBz4y81 for ; Fri, 15 Aug 2025 21:40:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.898 X-Spam-Level: X-Spam-Status: No, score=-2.898 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no Received: from mx2eb1.netcup.net (unknown [10.243.12.53]) (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) by policy01-mors.netcup.net (Postfix) with ESMTPS id 4c3XXF2fsBz8tXS for ; Fri, 15 Aug 2025 21:40:45 +0200 (CEST) Received: from [IPV6:2a02:3102:8e00:2060:6bbc:30dc:511b:15e7] (dynamic-2a02-3102-8e00-2060-6bbc-30dc-511b-15e7.310.pool.telefonica.de [IPv6:2a02:3102:8e00:2060:6bbc:30dc:511b:15e7]) by mx2eb1.netcup.net (Postfix) with ESMTPSA id 9388B100817 for ; Fri, 15 Aug 2025 21:40:40 +0200 (CEST) Authentication-Results: mx2eb1; spf=pass (sender IP is 2a02:3102:8e00:2060:6bbc:30dc:511b:15e7) smtp.mailfrom=rdiez-2006@rd10.de smtp.helo=[IPV6:2a02:3102:8e00:2060:6bbc:30dc:511b:15e7] Received-SPF: pass (mx2eb1: connection is authenticated) Message-ID: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> Date: Fri, 15 Aug 2025 21:40:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: bug-gnu-emacs@gnu.org From: "R. Diez" Content-Language: en-GB Subject: Add timestamps to *Messages* Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <175528684092.30382.2874520252243262047@mx2eb1.netcup.net> X-Rspamd-Server: rspamd-worker-8404 X-Rspamd-Queue-Id: 9388B100817 X-NC-CID: Fo79muw0wn9d1PImjWAjXPSlJsB09B0EV+8w7TOo Received-SPF: pass client-ip=188.68.63.102; envelope-from=rdiez-2006@rd10.de; helo=relay.yourmailgateway.de 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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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-Mailman-Approved-At: Sat, 16 Aug 2025 03:37:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Hi all: I am trying to debug a Tramp problem, and I need associate Tramp debug log entries with entries in the *Messages* buffer. This is hard to do, because the *Messages* buffer has no timestamps. Some other people have had this problem before: https://emacs.stackexchange.com/questions/32150/how-to-add-a-timestamp-to-each-entry-in-emacs-messages-buffer The trouble is, there is not one solution, but a few of them, with different activation procedures. I gets complicated because minibuffer vs *Messages*, and because of the "[3 times]" markers upon repetition. I am not very proficient at Lisp, and I couldn't make it out. The "advice" method is a kludge anyway. Could you implement an easy way to add timestamps to the *Messages* buffer? Thanks in advance, rdiez From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 16 03:44:33 2025 Received: (at submit) by debbugs.gnu.org; 16 Aug 2025 07:44:33 +0000 Received: from localhost ([127.0.0.1]:40716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unBab-0006Ra-GF for submit@debbugs.gnu.org; Sat, 16 Aug 2025 03:44:33 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53340) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unBaZ-0006RF-Fb for submit@debbugs.gnu.org; Sat, 16 Aug 2025 03:44:32 -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 ) id 1unBaT-00016V-EH for bug-gnu-emacs@gnu.org; Sat, 16 Aug 2025 03:44:25 -0400 Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1unBaR-0006A2-Hu for bug-gnu-emacs@gnu.org; Sat, 16 Aug 2025 03:44:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1755330260; x=1755935060; i=michael.albinus@gmx.de; bh=+2jY1AeotYkAqtQvQb46J7x/AH5vV9CBSHjZOIK2VD8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=CxlRvnJBqgxuid/0ub7+tN5yT4T1j5+ej7oTN6FoulBHfxDR0egQlP9lRYv9YEsK intEpttFUnXVb8H8zGSKzvQVx+YfRDp4lAaEHriHkkAnwnfuBNYpNGOBMBPKPszQd NohfNBfg8WgZ+b692LvfwSqj3cUTY7/TQ8vjV0vxDgCZ0y5CyqOOrX0Z4gES6AcXw 5DclmHk8cp/HFwt6LRPmwcNzk2Hn1AdEZj3N+ug92U2F5kBK5jtEOnQPmz8UDbr9P o7LzfP1ody5A331Yo/cfAb+yp6XSDypnhb5BGXp/VW6f+1eLvfQrUXxmfFx36B7Qe PSt23kE+6EelI2+ypQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.37.61]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MtfNf-1uZv803vnb-011BS7; Sat, 16 Aug 2025 09:44:20 +0200 From: Michael Albinus To: "R. Diez" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#79253: Add timestamps to *Messages* In-Reply-To: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> Date: Sat, 16 Aug 2025 09:44:18 +0200 Message-ID: <87h5y7emnh.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:76iNw4dSAXtOZvVCNsCt6ecRq4YGh7CXuOzbAHEZQJAUP8RZ7Zu 3eRXNroT43ltYU5E/dZqFQArsGtmIeP6JihSwmgdFBEG5ca/qWySn62miD6TXV2+KCRXgaB 6bpMzLgaRrRyeu32cnRBuGNMrRPkXNSwRluCDkKl9hG6+/QsjGjBpiixb5/aiyM0I2Q2mq1 NBtBmuE9yZE1LS9hA4ayQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:F91XthLM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pkee7GjV4riY1GT8pL5zGRIh274by33TH1PysK7F7J8U5M/hqakd9hy2ad66bjYaw/gl AeRe5glIRBfL6LJ/hJovdv+U2eagQRhJtUJWigfn0PtKUkJWJgr98vBJsLNL7UcSMCYXm9s8C KE7px1lAY2HdGvvfPSRgdR9C85dLXZOWDJJPM9FmH+mykcBN2ses5Mk2GeToGxvpQ78QCW2Vw h7qQ9XYacie6q9MUf/sRmDwzSbiRRmcAf2wAzguvx7PfWBxmzZvqjTpk7KDSWZzrYisjl+CsL ERK7PH0FwDinlktCS+16DGyFN0G0xsPhYFX1tlo2mhdYXxhvnOlbbN4fsqiBqPgNQMxkcktzU ul65lUTse5+wWmsVhQAnDEjq8fNOjghH1qX4Tm+fqMraNJF0bIpmp2CESJgQ9rBJ0XEQ== Received-SPF: pass client-ip=212.227.17.20; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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.0 (/) X-Debbugs-Envelope-To: submit Cc: 79253@debbugs.gnu.org, "R. Diez" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "R. Diez" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Hi all: Hi, > I am trying to debug a Tramp problem, and I need associate Tramp debug log entries with entries in the *Messages* buffer. > > This is hard to do, because the *Messages* buffer has no timestamps. > > Some other people have had this problem before: > > https://emacs.stackexchange.com/questions/32150/how-to-add-a-timestamp-to-each-entry-in-emacs-messages-buffer > > The trouble is, there is not one solution, but a few of them, with different activation procedures. I gets complicated because minibuffer vs *Messages*, and because of the "[3 times]" markers upon repetition. > > I am not very proficient at Lisp, and I couldn't make it out. The "advice" method is a kludge anyway. > > Could you implement an easy way to add timestamps to the *Messages* buffer? What is wrong with Tramp's debug buffers? They provide timestamps. Personally, I don't believe we shall add such a general "improvement" to the *Messages* buffer. It is a simple mean to show messages sent to it. The contents of a message, including a timestamp, is the responsibility of the sender. But that's my understanding; people might see it different. > Thanks in advance, > rdiez Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 16 05:20:10 2025 Received: (at 79253) by debbugs.gnu.org; 16 Aug 2025 09:20:10 +0000 Received: from localhost ([127.0.0.1]:40954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unD54-00036R-Tn for submit@debbugs.gnu.org; Sat, 16 Aug 2025 05:20:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35542) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unD51-00033H-4f for 79253@debbugs.gnu.org; Sat, 16 Aug 2025 05:20:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1unD4u-0007ah-U3; Sat, 16 Aug 2025 05:19:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UQvdwDxLqGkmeM7Oq72u21AKwxzw0daxRAZHwBrBqs4=; b=plfP45pubRUU huAth5vS/0giPeIFCFrrkND7NFJSZ0mG11R/0vjZeihVH6Lpfrgxtm9tEfVEDbjboxdzq2326t1bM tRdTSrhGuurU9UfBaaGaKrSwxDLQPeme5fULa+MU0dnNnjBhbxuhoABTAhZXTjQZ4pgxWIoKYtpY7 smfmM7aY0eci52Xxf2ckH9T9yA6NSiIQp5JMFrZZinJYnaUkWZKQGX4mq5pAUK/KytKhnIlqrOWME hKffkL7wkfa3VytDI13GWFbOsb40KlvqKyiAJMmbZLO0RAZI225LPRS/x3VPkPgZN3hFUO6FlCidU I8UC3chXDB/Xc8xoWFgU7w==; Date: Sat, 16 Aug 2025 12:19:54 +0300 Message-Id: <86bjoflj2d.fsf@gnu.org> From: Eli Zaretskii To: "R. Diez" In-Reply-To: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> (bug-gnu-emacs@gnu.org) Subject: Re: bug#79253: Add timestamps to *Messages* References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 15 Aug 2025 21:40:39 +0200 > From: "R. Diez" via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Hi all: > > I am trying to debug a Tramp problem, and I need associate Tramp debug log entries with entries in the *Messages* buffer. > > This is hard to do, because the *Messages* buffer has no timestamps. > > Some other people have had this problem before: > > https://emacs.stackexchange.com/questions/32150/how-to-add-a-timestamp-to-each-entry-in-emacs-messages-buffer > > The trouble is, there is not one solution, but a few of them, with different activation procedures. I gets complicated because minibuffer vs *Messages*, and because of the "[3 times]" markers upon repetition. > > I am not very proficient at Lisp, and I couldn't make it out. The "advice" method is a kludge anyway. > > Could you implement an easy way to add timestamps to the *Messages* buffer? Did you try using set-message-function to install your function as the one that adds a time stamp to the text of the message to be shown? If you tried, and it didn't work, please tell what didn't work. If you didn't try, please do. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 02:27:08 2025 Received: (at 79253) by debbugs.gnu.org; 17 Aug 2025 06:27:08 +0000 Received: from localhost ([127.0.0.1]:44677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unWrC-0007M8-PW for submit@debbugs.gnu.org; Sun, 17 Aug 2025 02:27:08 -0400 Received: from relay.yourmailgateway.de ([46.38.247.119]:45445) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unNz2-0003Hv-U4 for 79253@debbugs.gnu.org; Sat, 16 Aug 2025 16:58:41 -0400 Received: from mors-relay-8404.netcup.net (localhost [127.0.0.1]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4c4BCZ34RTz85Sb; Sat, 16 Aug 2025 22:58:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rd10.de; s=key2; t=1755377914; bh=RkOxlBd4jIXCxiZoGQTm54Chnj6RnjZEgTbfV9NiAlg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=iwUGb2eZ/jD0JYEKF6aglWyx4f+d4X5Z74wmdgJpdQl7Onuu0O5vXSXQxOn/1rtvE 52DhB3YeJXU9TRVu3PMqoGtZflkgV9YC135pz/Wq+ZDVRv0rEPN95oePPBHyHluUFL IIpKBDBCQZQVSiHsccIzZS2XGNtPmW/a4pjKXxB9YxHJaQJmmJx7wQKp/mtiQEPeeY /HfQ72HKsLUaVgYCPTPExBtUtCbBM5eDSJViGBXcivV5UUfMWh6lP2ZJ2LlGT9A8R/ n40D4dAFRM+wy8qs+pV2tvBhd1WvFOsdwLGkpLVUSaH/0dTgYLH6PyPH/wYmHCj0OS rC6c0xnFurimA== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4c4BCZ2gM6z4yJf; Sat, 16 Aug 2025 22:58:34 +0200 (CEST) Received: from mx2eb1.netcup.net (unknown [10.243.12.53]) (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) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4c4BCZ0xZDz8sZP; Sat, 16 Aug 2025 22:58:34 +0200 (CEST) Received: from [IPV6:2a02:3102:8e00:2060:a84a:a900:2942:33cf] (dynamic-2a02-3102-8e00-2060-a84a-a900-2942-33cf.310.pool.telefonica.de [IPv6:2a02:3102:8e00:2060:a84a:a900:2942:33cf]) by mx2eb1.netcup.net (Postfix) with ESMTPSA id 7DA3F100272; Sat, 16 Aug 2025 22:58:29 +0200 (CEST) Authentication-Results: mx2eb1; spf=pass (sender IP is 2a02:3102:8e00:2060:a84a:a900:2942:33cf) smtp.mailfrom=rdiez-2006@rd10.de smtp.helo=[IPV6:2a02:3102:8e00:2060:a84a:a900:2942:33cf] Received-SPF: pass (mx2eb1: connection is authenticated) Message-ID: <47938798-8544-4d40-a6ba-7d759784cb3e@rd10.de> Date: Sat, 16 Aug 2025 22:58:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#79253: Add timestamps to *Messages* To: Michael Albinus References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <87h5y7emnh.fsf@gmx.de> From: "R. Diez" Content-Language: de-DE, en-GB In-Reply-To: <87h5y7emnh.fsf@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <175537790976.29408.9060943731986065531@mx2eb1.netcup.net> X-Rspamd-Server: rspamd-worker-8404 X-Rspamd-Queue-Id: 7DA3F100272 X-NC-CID: nw3MgAGLx/3fkD4Ycd20S8lwrDH/vwrG9Dbcgy3Q X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79253 X-Mailman-Approved-At: Sun, 17 Aug 2025 02:26:58 -0400 Cc: 79253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > What is wrong with Tramp's debug buffers? They provide timestamps. I suspect that some Tramp connection timeout messages only appear in the *Messages* buffer, and not in Tramp's debugger buffer, or they appear with a long delay. That is why I wanted to correlate. In any case, I should have phrased this feature request differently. It is not about Tramp, it is a general feature request for *Messages* which could help in other scenarios, like correlating Emacs events with external logs, or just checking how much time has passed between 2 messages in that buffer, or how long ago some event I am trying to troubleshoot happened. > Personally, I don't believe we shall add such a general "improvement" to > the *Messages* buffer. It is a simple mean to show messages sent to > it. The contents of a message, including a timestamp, is the > responsibility of the sender. I have a different opinion. 8-) It is impractical for the sender to add timestamps. There are thousands of senders. And how are they going to agree the time format? Other log systems or log windows add the timestamps automatically. In the command line, I can use a tool like 'ts' from moreutils in order to prepend a timestamp to every line of input you give it. But that wouldn't work with the *Messages* buffer. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 02:27:09 2025 Received: (at 79253) by debbugs.gnu.org; 17 Aug 2025 06:27:09 +0000 Received: from localhost ([127.0.0.1]:44679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unWrF-0007MN-2F for submit@debbugs.gnu.org; Sun, 17 Aug 2025 02:27:09 -0400 Received: from relay.yourmailgateway.de ([188.68.63.162]:51843) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unO2H-0003VX-3Q for 79253@debbugs.gnu.org; Sat, 16 Aug 2025 17:01:57 -0400 Received: from mors-relay-8201.netcup.net (localhost [127.0.0.1]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4c4BHR3dhzz42T7; Sat, 16 Aug 2025 23:01:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rd10.de; s=key2; t=1755378115; bh=EP6XprYJ6lhlebHCvQa4Cmp/MqkE9+3JBVz6F30qirk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=fI/WPRqN4friiHY2mexxKb34CNep7Quwktnpej5tgblPFm+hCsZRoq7fue4HMuB3f Awt7IdM3PvLdBCXQXk06G3K1Qg4dwM6SMs09haCwPmdHpOUQuS/kdFKjQ5Ug03LdrK 66TqhgcDs13Vlpw1uAlUoVZa9yR/YNI5PgYe0q12tJCR9Pjy/eQ8ZtddueKi4EjwMn qnkyC8iorBFuY7mS0VfbwpQsCE+X08DIL85g012jNL6HfoST5mt3+i78K6xZLiVfpC 1Vnp8MccrFuYJPqrGfBb02fBQ/M762zpkU0Qd/r0v/8+i/k4K5Mt15+3EltVMbMKdF zxO87LPndsb6g== Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4c4BHR2wZqz42Sv; Sat, 16 Aug 2025 23:01:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.901 X-Spam-Level: X-Spam-Status: No, score=-2.901 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Received: from mx2eb1.netcup.net (unknown [10.243.12.53]) (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) by policy01-mors.netcup.net (Postfix) with ESMTPS id 4c4BHQ5zGNz8tXM; Sat, 16 Aug 2025 23:01:54 +0200 (CEST) Received: from [IPV6:2a02:3102:8e00:2060:a84a:a900:2942:33cf] (dynamic-2a02-3102-8e00-2060-a84a-a900-2942-33cf.310.pool.telefonica.de [IPv6:2a02:3102:8e00:2060:a84a:a900:2942:33cf]) by mx2eb1.netcup.net (Postfix) with ESMTPSA id 54DE3100272; Sat, 16 Aug 2025 23:01:50 +0200 (CEST) Authentication-Results: mx2eb1; spf=pass (sender IP is 2a02:3102:8e00:2060:a84a:a900:2942:33cf) smtp.mailfrom=rdiez-2006@rd10.de smtp.helo=[IPV6:2a02:3102:8e00:2060:a84a:a900:2942:33cf] Received-SPF: pass (mx2eb1: connection is authenticated) Message-ID: Date: Sat, 16 Aug 2025 23:01:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#79253: Add timestamps to *Messages* To: Eli Zaretskii References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <86bjoflj2d.fsf@gnu.org> From: "R. Diez" Content-Language: de-DE, en-GB In-Reply-To: <86bjoflj2d.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <175537811057.30319.18182237434697964028@mx2eb1.netcup.net> X-Rspamd-Server: rspamd-worker-8404 X-Rspamd-Queue-Id: 54DE3100272 X-NC-CID: b0FpyG34j3FcjknOzHu5zin4J+LlwByBu3qkmbMh X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79253 X-Mailman-Approved-At: Sun, 17 Aug 2025 02:26:58 -0400 Cc: 79253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Could you implement an easy way to add timestamps to the *Messages* buffer? > > Did you try using set-message-function to install your function as the > one that adds a time stamp to the text of the message to be shown? If > you tried, and it didn't work, please tell what didn't work. If you > didn't try, please do. First of all, thanks for the hint. The 'message' function does not mention 'set-message-function' or the like, so I missed it. I could find very little information about 'set-message-function', and no examples whatsoever, so I came up with this: (defun my-message-function (msg) "" ; No docstring yet. (concat "Test: " msg)) (setq set-message-function #'my-message-function) The effect is that messages in the minibuffer do get the "Test:" prefix, but messages in the *Messages* buffer do not. But that is exactly the opposite of what I am trying to achieve! From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 02:44:59 2025 Received: (at submit) by debbugs.gnu.org; 17 Aug 2025 06:45:00 +0000 Received: from localhost ([127.0.0.1]:44721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unX8V-0008C7-HO for submit@debbugs.gnu.org; Sun, 17 Aug 2025 02:44:59 -0400 Received: from lists.gnu.org ([2001:470:142::17]:38170) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unX8U-0008Bi-34 for submit@debbugs.gnu.org; Sun, 17 Aug 2025 02:44:58 -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 ) id 1unX8L-0004kj-OC for bug-gnu-emacs@gnu.org; Sun, 17 Aug 2025 02:44:49 -0400 Received: from mout.gmx.net ([212.227.15.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1unX8J-00043N-Sd for bug-gnu-emacs@gnu.org; Sun, 17 Aug 2025 02:44:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1755413077; x=1756017877; i=michael.albinus@gmx.de; bh=xS9pVxrAgTpFba7nRwKGjeZAl2inabPCY61NCnp21C4=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=nuy56vJqWbNo638PFqmUCTeNmkHkAA71tIERiD1j5LRlWohVdz1rCG/QcdqNqScV S7DlnHByhM4Pqy8l+prQrs8SqG4JKiQvFRSbD24qq+JfmDCb0ICdG151A7DkYY1oR 9mLqOyO8Ywfs7YHMQz09bLyBnefC6ldT1cxRmERshBT3YDlO0IdgqbfY515MQS6Sb 33H/bN12OYPMH+sYnhxvB26Rgya10FzMvG8j9RYbRNrcT+ht9/xj3+GeNgOYHDcWy TkDWP36pJV4HYLhzaClujskE++hTM4xv7RMKbifhxnK39O7Zfzuzbir3TLChDpZfn 1stJHA1fx9qjfRMmiw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.37.61]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNswE-1vBdYT2RfE-00QGmO; Sun, 17 Aug 2025 08:44:37 +0200 From: Michael Albinus To: "R. Diez" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#79253: Add timestamps to *Messages* In-Reply-To: <47938798-8544-4d40-a6ba-7d759784cb3e@rd10.de> References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <87h5y7emnh.fsf@gmx.de> <47938798-8544-4d40-a6ba-7d759784cb3e@rd10.de> Date: Sun, 17 Aug 2025 08:44:36 +0200 Message-ID: <875xemcuqz.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:+visFkknLcCc7qiqCtZDNpCejZJhQ2SgrDrWF84WWEDXO6GKLZ9 s04RMOzu0GDRYFx7zb73RzYcYpmK4FIucaOSkEVSC1cRrAWyfw5bRZr4IFbAjzTyqZz7lkB wZ75CBBBAIiwkv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KcWiLIvjpDIRmG4N+V6jOEG1G3fZr/5bZmpl9niPpZ7nne6NIuUA4TzV mGVCROJQeRuyX9J7kWzAYI8iXbxW+bv56Te71UvQX6DT+RYWin3ajFKkxNLsQlSbuR52sbOzd lfhayt94nMGtsyBv8dXOtg0+h5wljO/1wOXBu5L1KVGq0uZPMUcwmgP0EPVtR5/1JFCQ5fBAJ gx3m7IlWP6DZNlXELZ2kcO+NLydTiconjpGnEXXzfCX246+u48s1WXsiApp6iHP547g5l0gJ8 VsRn5ZdpiZqoWl4SeOkscPO6cQs6YEUdJ0fFSr+wIvJ2lPnyq/i0pS0KCKWU6StVakvlgJUQJ X+W8qyr5A49YWUvhckyiY8lASuWcUB0XhOrm5/saBnI85vzWLPiB+BnoBDYBxRETJ5f/+25Xx xwR96Q86QYxasMeJqB4K2uVxbvooSTeZ8a2nkBEFwldpQ4HAVMIg00M/Kmj6SBGQenKyCKD7Q 3g1SD/rAgK8ENRVU71Rt25Ko0lKXUbz4dQt+S3+Ix/Dgk3+7BtS19BvRqhwhhc5jTvXA== Received-SPF: pass client-ip=212.227.15.15; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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.0 (/) X-Debbugs-Envelope-To: submit Cc: 79253@debbugs.gnu.org, "R. Diez" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "R. Diez" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: Hi, >> What is wrong with Tramp's debug buffers? They provide timestamps. > > I suspect that some Tramp connection timeout messages only appear in > the *Messages* buffer, and not in Tramp's debugger buffer, or they > appear with a long delay. That is why I wanted to correlate. FTR: any message from Tramp sent to *Messages* is also sent to the respective Tramp debug buffer, if such buffer is in place. It is created, when tramp-verbose is greater than 3. All of this is explained in (info "(tramp) Traces and Profiles") . Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 02:53:39 2025 Received: (at 79253) by debbugs.gnu.org; 17 Aug 2025 06:53:40 +0000 Received: from localhost ([127.0.0.1]:44737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unXGt-0000DM-EP for submit@debbugs.gnu.org; Sun, 17 Aug 2025 02:53:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36772) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unXGq-0000D3-Sr; Sun, 17 Aug 2025 02:53:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1unXGj-00057B-6w; Sun, 17 Aug 2025 02:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=67YOiqrPfKFyf3SAeNGGx9aB6JZBENCzNvNT+OeBt/Y=; b=I3hOf1OkKlRB 9Fbz7BQyfKL/RPzgElIDKG3zM3NxJL3Ms0Yzmd5mj0bwk7HnN9W70LLFcnUuxByD1cKE2PFdexnBT pIzmuxtsEOtzf+zrD5C0c/qxwc5/ZBLViO4pA6hstuNSWi+kp+DNB1JF6N2T4pUeYXj+faMm0gePD 8njG4e//v3UxMYZiMF1PpA+moIXM+zN1YS/4FY8kQzjd/VQL2bY06ELEQBaYTAHnfe5wRUYF10Y5q 3pzHI4bV1zilfE1XOcwHmG4oXxLw7pVQL26AfTCsK3bReixU6MvYYfdLH7/Bw0S4+rQHj3pqLQID3 a8fC2tE6MUm8MAY2+EtPZg==; Date: Sun, 17 Aug 2025 09:53:26 +0300 Message-Id: <86tt26igm1.fsf@gnu.org> From: Eli Zaretskii To: "R. Diez" In-Reply-To: (rdiez-2006@rd10.de) Subject: Re: bug#79253: Add timestamps to *Messages* References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <86bjoflj2d.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 79253 wishlist thanks > Date: Sat, 16 Aug 2025 23:01:50 +0200 > Cc: 79253@debbugs.gnu.org > From: "R. Diez" > > > >> Could you implement an easy way to add timestamps to the *Messages* buffer? > > > > Did you try using set-message-function to install your function as the > > one that adds a time stamp to the text of the message to be shown? If > > you tried, and it didn't work, please tell what didn't work. If you > > didn't try, please do. > > First of all, thanks for the hint. The 'message' function does not mention 'set-message-function' or the like, so I missed it. > > I could find very little information about 'set-message-function', and no examples whatsoever, so I came up with this: > > (defun my-message-function (msg) > "" ; No docstring yet. > (concat "Test: " msg)) > > (setq set-message-function #'my-message-function) > > The effect is that messages in the minibuffer do get the "Test:" prefix, but messages in the *Messages* buffer do not. > > But that is exactly the opposite of what I am trying to achieve! OK, thanks for testing. One problem with your request is that Emacs many times generates messages by multiple calls to the 'message' function. Prepending the current time to each message passed to 'message' will thus produce somewhat sub-optimal, maybe even ugly, results. For example, if you type C-p at the first line of a buffer, Emacs signals an error that logs in the *Messages* buffer as previous-line: Beginning of buffer But if we prepend each logged message with current time, it will instead look like this: 17/08/2025 00:09:44 previous-line 17/08/2025 00:09:44 : 17/08/2025 00:09:44 Beginning of buffer This happens because in this case we call 'message' 3 times, with the following 3 strings: "previous-line" ": " "Beginning of buffer" If this is acceptable, we can implement the feature you are asking for. Otherwise, I don't see how this could be implemented, except by having each Lisp program that calls 'message' inject the time string where appropriate. What do people think about the acceptability of the above? Do people have other ideas for implementing this? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 03:12:12 2025 Received: (at 79253) by debbugs.gnu.org; 17 Aug 2025 07:12:12 +0000 Received: from localhost ([127.0.0.1]:44793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unXYq-00042G-Cz for submit@debbugs.gnu.org; Sun, 17 Aug 2025 03:12:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48998) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unXYl-00041k-1D; Sun, 17 Aug 2025 03:12:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1unXYe-00071K-Pk; Sun, 17 Aug 2025 03:12:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=doMgfpIuWjmqCaeNwX7tsBSz33MouMyrnL9kq1jb6FQ=; b=UbKgl5EYb1mv W37fBdAAJ6ULbGqrt66wXfn4x3m5JBaWcxJmXcMdIai1TPqz03EDcJZueMRqcXa3l8nuh955AnAlm vxYJQsntKb5dgOJfbmSSz+OvNaUhqs1F/C5m8CKBa39rAAVx0WdFyx7QjDMyhUJMo3g6s8GnS7aBd neaR+KZEFeSkhVCVOBmHwc3T3IvpqEQ04kGy70tqrTgOCQThiyZDjwJgdDr67FPDczbm1nRaW6wVU o7o3uZA7qee+qigrLP/ccMIg9P5zcKJS4QsTGlMVIKJMLGPDsd7ws/eWjjI5gGKlzD3UT52pl+1C/ CidYqw/0WzyAfK2lIMDHUA==; Date: Sun, 17 Aug 2025 10:11:57 +0300 Message-Id: <86sehqifr6.fsf@gnu.org> From: Eli Zaretskii To: "R. Diez" In-Reply-To: (rdiez-2006@rd10.de) Subject: Re: bug#79253: Add timestamps to *Messages* References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <86bjoflj2d.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 79253 wishlist thanks > Date: Sat, 16 Aug 2025 23:01:50 +0200 > Cc: 79253@debbugs.gnu.org > From: "R. Diez" > > > >> Could you implement an easy way to add timestamps to the *Messages* buffer? > > > > Did you try using set-message-function to install your function as the > > one that adds a time stamp to the text of the message to be shown? If > > you tried, and it didn't work, please tell what didn't work. If you > > didn't try, please do. > > First of all, thanks for the hint. The 'message' function does not mention 'set-message-function' or the like, so I missed it. > > I could find very little information about 'set-message-function', and no examples whatsoever, so I came up with this: > > (defun my-message-function (msg) > "" ; No docstring yet. > (concat "Test: " msg)) > > (setq set-message-function #'my-message-function) > > The effect is that messages in the minibuffer do get the "Test:" prefix, but messages in the *Messages* buffer do not. > > But that is exactly the opposite of what I am trying to achieve! OK, thanks for testing. One problem with your request is that Emacs many times generates messages by multiple calls to the 'message' function. Prepending the current time to each message passed to 'message' will thus produce somewhat sub-optimal, maybe even ugly, results. For example, if you type C-p at the first line of a buffer, Emacs signals an error that logs in the *Messages* buffer as previous-line: Beginning of buffer But if we prepend each logged message with current time, it will instead look like this: 17/08/2025 00:09:44 previous-line 17/08/2025 00:09:44 : 17/08/2025 00:09:44 Beginning of buffer This happens because in this case we call 'message' 3 times, with the following 3 strings: "previous-line" ": " "Beginning of buffer" It also means that the usual Emacs feature of compacting *Messages* by combining duplicate messages will not work, because each of those duplicate lines will now have different time stamps prepended to it, and also potentially broken into several lines. If this is acceptable, we can implement the feature you are asking for. Otherwise, I don't see how this could be implemented, except by having each Lisp program that calls 'message' inject the time string where appropriate. What do people think about the acceptability of the above? Do people have other ideas for implementing this? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 08:44:38 2025 Received: (at 79253) by debbugs.gnu.org; 17 Aug 2025 12:44:38 +0000 Received: from localhost ([127.0.0.1]:45811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unckW-0001b0-HY for submit@debbugs.gnu.org; Sun, 17 Aug 2025 08:44:37 -0400 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]:53581) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unckH-0001aN-9n for 79253@debbugs.gnu.org; Sun, 17 Aug 2025 08:44:31 -0400 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id CA446140006E; Sun, 17 Aug 2025 08:44:15 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sun, 17 Aug 2025 08:44:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamkovic.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1755434655; x=1755521055; bh=2LSmEFYF6d3oXPGvrpI2jDDUx+zOrN2F HWMvx1kigEc=; b=GIZnrhUs6CR0Ar+LigLFWt0R1tCOu5Lxb744DYsSeE4DyKGM b/waW2LH2eNj/O+t8AXLIaojMwD+AT+3NWdaqJJDGDufaZjwpKOQkzjhUW/dsj4w Wn9bvk+re/DrHiKRzfqgZ6MvN03F34YyTN2shtGwU8TObt+b3Limr4ApsiYcfpy8 iM5rMgGDvyd0VehzdytZ0VvRgSnhVfyOXvuLUBvK/8z+pnNbboRwBfTAsdaAwl30 mlWJh3ga6zO3DXadTIlA1VdWYvdGobDdbZxHQCVf8cksqXR1n3wsSLeHhjq8GSna 0WWb6/8paLbCAPJgoqegOfXE52998Xah0VJO4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1755434655; x= 1755521055; bh=2LSmEFYF6d3oXPGvrpI2jDDUx+zOrN2FHWMvx1kigEc=; b=R o2K+BADNNABsMPC9Zphpr9SSofwRu7M0VLxE24Si76THWsLLGZ6NgAVgeiwR/hTb VvkQkEr47cO30LtpH/6Qve2XB9Si1DPcgR6ZmMHm+L2YInos2DYZa+xixHW9+BGB 9/hDLBpyKGsbCAmXv6R2uLgRfyRet8Y7ydbBpVVG4cVlhYFou3KOzV9PcgCOctoc CNyzEx+wi8g2qmVwSfKt5OZqFHBbHVqqTRccsomAb5pgdBlXPcB1kwb0u3jkh3Q2 IRrGuLEfjKTCVN8a4JCfoD7UvzV6evvqBAMFS52QAt7Ht9D/RmTJ4+5427UZw1H0 Ra25NT6DG//H8nkbYfcjQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddugeeljeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffffkgggtgfesthhqredttddtjeenucfhrhhomheptfhuugholhhf ucetuggrmhhkohhvihgtuceorhhuugholhhfsegruggrmhhkohhvihgtrdhorhhgqeenuc ggtffrrghtthgvrhhnpeeiueetheffudfghfeggeevheevvddtkefflefhueeludfgtefg ffeltdfhudejgeenucffohhmrghinheprggurghmkhhovhhitgdrohhrghenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehruhguohhlfhesrggu rghmkhhovhhitgdrohhrghdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohepjeelvdehfeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphht thhopehrughivgiiqddvtddtieesrhguuddtrdguvgdprhgtphhtthhopegvlhhiiiesgh hnuhdrohhrgh X-ME-Proxy: Feedback-ID: i88214938:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 17 Aug 2025 08:44:14 -0400 (EDT) From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= To: Eli Zaretskii , "R. Diez" Subject: Re: bug#79253: Add timestamps to *Messages* In-Reply-To: <86sehqifr6.fsf@gnu.org> References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <86bjoflj2d.fsf@gnu.org> <86sehqifr6.fsf@gnu.org> Date: Sun, 17 Aug 2025 14:44:13 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: > This happens because in this case we call 'message' 3 times, with the > following 3 strings: > > "previous-line" > ": " > "Beginning of buffer" Not the OP, I would like to understand more. I have just evaluated (progn (message "previous-line") (message ": ") (message "Beginning of buffer")) and I see 3 separate messages in the *Messages* buffer: previous-line :=20 Beginning of buffer Why were they not concatenated as you had described? > What do people think about the acceptability of the above? > Do people have other ideas for implementing this? Seeing "previous-line: Beginning of buffer" as 3 messages is not acceptable, IMHO. P.S. Not to derail the bug report, but speaking the *Messages* buffer improvements, I would also like to see automatic scrolling, along with two new key bindings, one for adding some sort of separator and another for clearing the buffer. I mention these ideas here in the case they somehow tie to the missing time stamps design-wise. Rudy --=20 "The introduction of suitable abstractions is our only mental aid to organize and master complexity." --- Edsger Wybe Dijkstra, 1930-2002 Rudolf Adamkovi=C4=8D [he/him] http://adamkovic.org From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 09:02:46 2025 Received: (at 79253) by debbugs.gnu.org; 17 Aug 2025 13:02:46 +0000 Received: from localhost ([127.0.0.1]:45836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1und26-0002X1-1S for submit@debbugs.gnu.org; Sun, 17 Aug 2025 09:02:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38098) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1und1x-0002WZ-KI for 79253@debbugs.gnu.org; Sun, 17 Aug 2025 09:02:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1und1r-00025V-6c; Sun, 17 Aug 2025 09:02:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=3rsfiL4bd8R2gcHXPCr5FfPw7vlJ/Rjj6rkCFpIkkcc=; b=ZR8ZiC5PKVfa9JbjDtE8 PJoN5Dy4PzN2OPU5T0LBv7TPdCXcEshtNa0/2rnhn3oUJtXsD1Cilsj9VSZOATs/wRN6jy1hmOiNg SAC9nvdcHneGOADRNOs3ksLxwMsNOeck0hIf4ShKVoGWjWswSoB+NZgb+efWqsXsV4I9SuaU0sOh5 RBoqmpTBoUj/yPNNgGAkUZhiU6m5GKxzHfgSqNU98pySVor7/w94Tcg4xEzn5H2RD2PTggdhTwrbT M4pHPzgxUVwztfMErkUqeVKxsjKpZm0Le9KOAecLSGDWma7y+dEng0kC7U9yrtOYbJ//AaG78uHVa T6y9jWWtwNtSIQ==; Date: Sun, 17 Aug 2025 16:02:28 +0300 Message-Id: <86frdqhziz.fsf@gnu.org> From: Eli Zaretskii To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= In-Reply-To: (message from Rudolf =?utf-8?Q?Adamkovi=C4=8D?= on Sun, 17 Aug 2025 14:44:13 +0200) Subject: Re: bug#79253: Add timestamps to *Messages* References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <86bjoflj2d.fsf@gnu.org> <86sehqifr6.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org, rdiez-2006@rd10.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Rudolf Adamkovič > Cc: 79253@debbugs.gnu.org > Date: Sun, 17 Aug 2025 14:44:13 +0200 > > Eli Zaretskii writes: > > > This happens because in this case we call 'message' 3 times, with the > > following 3 strings: > > > > "previous-line" > > ": " > > "Beginning of buffer" > > Not the OP, I would like to understand more. > > I have just evaluated > > (progn (message "previous-line") > (message ": ") > (message "Beginning of buffer")) > > and I see 3 separate messages in the *Messages* buffer: > > previous-line > : > Beginning of buffer > > Why were they not concatenated as you had described? Because that's not what Emacs does in that case (I've simplified this in my explanation). If you want to see all the details, put a breakpoint in message_dolog and then trigger the error message. > Not to derail the bug report, but speaking the *Messages* buffer > improvements, I would also like to see automatic scrolling, along with > two new key bindings, one for adding some sort of separator and another > for clearing the buffer. I mention these ideas here in the case they > somehow tie to the missing time stamps design-wise. Automatic scrolling already exists. As for the rest, feel free to propose new features (just not as part of this bug report). From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 14:04:18 2025 Received: (at 79253) by debbugs.gnu.org; 17 Aug 2025 18:04:18 +0000 Received: from localhost ([127.0.0.1]:47877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unhju-0002d1-2E for submit@debbugs.gnu.org; Sun, 17 Aug 2025 14:04:18 -0400 Received: from relay.yourmailgateway.de ([46.38.247.119]:43209) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unhjp-0002co-T1 for 79253@debbugs.gnu.org; Sun, 17 Aug 2025 14:04:15 -0400 Received: from mors-relay-8404.netcup.net (localhost [127.0.0.1]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4c4kHv6pFLz842h; Sun, 17 Aug 2025 20:04:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rd10.de; s=key2; t=1755453852; bh=ZOiD72vzzhJAXhWMx+6ikvKElAH5PyAfKSPTwf9yrW8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KPerw2vhNEqL8DKM9wKAep1WB4am8AIhwohePxh+VfV7mSka2YrX5Xhdhm2CsnJNY nM6KA8QzJAuOaJ9PZMlqbA8oitlsdLXye4N35XRR4JBCBg5Lf/7R1m83SX/P0eoo/w IZIqGNL5E/dJFii2/yCUDiJBbUyfO0SMxjVoTiyiRzSrh2kJvsNTCNpZ/LLfMQ1p/G pxRIa28MRskz5O8HyqxLXDadzhZLheN5JhWODgbb/ke7q+Jhou8mCVYKUQpwt9a9MS S2OxtjfhyGrLI7q66/cE0qGjbY6eAZfqRQ/mOAS0a1EfoWWKJdk93gJZ+/0GUKkMiJ I9DAiFW0S4V3g== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4c4kHv6Q6Dz4x9b; Sun, 17 Aug 2025 20:04:11 +0200 (CEST) Received: from mx2eb1.netcup.net (unknown [10.243.12.53]) (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) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4c4kHv1kfFz8svJ; Sun, 17 Aug 2025 20:04:11 +0200 (CEST) Received: from [IPV6:2a02:3102:8e00:2060:29c6:3163:3c04:c7fe] (dynamic-2a02-3102-8e00-2060-29c6-3163-3c04-c7fe.310.pool.telefonica.de [IPv6:2a02:3102:8e00:2060:29c6:3163:3c04:c7fe]) by mx2eb1.netcup.net (Postfix) with ESMTPSA id 83BFF100272; Sun, 17 Aug 2025 20:04:06 +0200 (CEST) Authentication-Results: mx2eb1; spf=pass (sender IP is 2a02:3102:8e00:2060:29c6:3163:3c04:c7fe) smtp.mailfrom=rdiez-2006@rd10.de smtp.helo=[IPV6:2a02:3102:8e00:2060:29c6:3163:3c04:c7fe] Received-SPF: pass (mx2eb1: connection is authenticated) Message-ID: <159a5ee2-17fa-4a7f-84dd-24f33729a7f1@rd10.de> Date: Sun, 17 Aug 2025 20:04:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#79253: Add timestamps to *Messages* To: Eli Zaretskii References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <86bjoflj2d.fsf@gnu.org> <86tt26igm1.fsf@gnu.org> From: "R. Diez" Content-Language: de-DE, en-GB In-Reply-To: <86tt26igm1.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <175545384683.20885.6612327182805683670@mx2eb1.netcup.net> X-Rspamd-Server: rspamd-worker-8404 X-Rspamd-Queue-Id: 83BFF100272 X-NC-CID: IlT1KV5M+utiYJwDG6Id+7oCxH4e2CWF1VJyErYU X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org, =?UTF-8?Q?Rudolf_Adamkovi=C4=8D?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > [...] > This happens because in this case we call 'message' 3 times, with the > following 3 strings: > > "previous-line" > ": " > "Beginning of buffer" That looks like a wrong API design to me. The *Message* buffer is obviously line-oriented. If someone makes multiple calls to message_dolog() in order to create a single text line, then somebody else calling message_dolog() or 'message' between those calls will break that line. I do not know anything about Emacs' internals, but I would imagine that inserting text in a buffer carries some overhead. Wouldn't it be more efficient anyway if the caller pieced together the complete line before calling message_dolog()? > I would also like to see automatic scrolling, Automatic scrolling works for me. > along with two new key bindings, one for adding some sort of separator and another for clearing the buffer. I have also missed a way to clear the *Messages* buffer, or to add a separator, in order to know if a text line came after the latest change I made in my code. In fact, I have written a tool to automatically add a separator when a log pause is detected in the console: https://github.com/rdiez/Tools/tree/master/LogPauseDetector But it is hard to implement such things in Emacs, because there are no hooks for the 'message' function. One thing that has always bothered me is that Emacs does not persist the *Messages* buffer. Because I am pretty bad at Lisp, sometimes my code fails under some weird circumstances. Or somebody else's code, like the recent trouble with Tramp's session timeouts. I then wanted to check whether I have gotten a particular message in the past, and what messages were around it, but the contents of *Messages* gets lost between reboots. I thought of piping all *Messages* lines to syslog, but I couldn't find a hook to do that. If I could do it, I wouldn't need timestamps, because syslog would take care of that automatically. By the way, that would require whole-line additions too. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 22:45:57 2025 Received: (at 79253) by debbugs.gnu.org; 18 Aug 2025 02:45:57 +0000 Received: from localhost ([127.0.0.1]:48581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unpsi-0003MK-S0 for submit@debbugs.gnu.org; Sun, 17 Aug 2025 22:45:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51530) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unpsf-0003Ly-DY for 79253@debbugs.gnu.org; Sun, 17 Aug 2025 22:45:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1unpsZ-0000bX-3X; Sun, 17 Aug 2025 22:45:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=djz42RHLQJqnza4wNf94ojgVDTgWm4e8u4uK2gUk70g=; b=nuGq3hWxevMS 6Rvyvsx9kRaU965ikUtCR2Rl9zf5Q7u40dq0WCxdXBnY9ht2PelNh+dgCIx0+ofjgsErQRW/9Z9Vf Bzdplj/p1bwKeZimsfDV1in4W6eqMnSwVJGG06LUVnjl2vIHJqthP1Kur80RVmmTjehBHDeqEdIQ0 45wkQ4yfnnHpZTlBrYX3RRrOnMcRjh7f1MBlv2KSzzZSQbrUhKC8BwPD8auGj5mVt2OSS+UfFKx7c u1PQ/jf/0HLwhmMpa8Hci9iEGBClGV70jsdkQRw26oxeAElVbxPBev02HFhw+PZeWfDFnY9FWQAlh BtE8whO2SF+hLo0/KVUJog==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1unpsY-0001sN-Dk; Sun, 17 Aug 2025 22:45:46 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: "R. Diez" In-Reply-To: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> (bug-gnu-emacs@gnu.org) Subject: Re: bug#79253: Add timestamps to *Messages* References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> Message-Id: Date: Sun, 17 Aug 2025 22:45:46 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > I am trying to debug a Tramp problem, and I need associate Tramp debug > log entries with entries in the *Messages* buffer. Ordinary Emacs editing is sequential and only the order matters. For people like me, whi do that, timestamps would be unhelpful clutter. So if we implement timestamps, there should be an easy way to turn them off. Or an easy way to specify which messages should have timestamps. Perhaps with a list of regexps that gives timestamps to a message if it matches any of those regexps. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 18 02:50:07 2025 Received: (at 79253) by debbugs.gnu.org; 18 Aug 2025 06:50:07 +0000 Received: from localhost ([127.0.0.1]:49023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unth0-0007ZS-Q6 for submit@debbugs.gnu.org; Mon, 18 Aug 2025 02:50:07 -0400 Received: from relay.yourmailgateway.de ([188.68.63.162]:52203) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1untgx-0007Z6-Qi for 79253@debbugs.gnu.org; Mon, 18 Aug 2025 02:50:05 -0400 Received: from mors-relay-8201.netcup.net (localhost [127.0.0.1]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4c53HY4zCcz44MZ; Mon, 18 Aug 2025 08:50:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rd10.de; s=key2; t=1755499801; bh=CH7JuW95eA2rGIYGMHqMbbNfcutjUdeHDj2B3j9D8IQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Qn/TmUmhPjlQ+xpqXsgwfmyO8xtFrJe8f/SDvGvFWwwEjpR/leDAZEHHOIrptw7qh u3vRhp5G8wHcUyyhWLKEezfQpV7jdoGm7w3kxDioRNWH9gRHlD/Wvm/6h5G2I0toqt L+B9QGo5Pu2qjDlf5WOaij8mN/OOdyg81sZwjlJ43RURm4HtL9j9TEOTPmUrf0X5bn g/4MdWTUQEdzh/VfcCy/8WW/2epp3s5YvK0bnsP7GSXBybKRjyY4rMRE5xlxJfvtgc ybqMBYe12nQuOIkY4FYCc5tsYzt+aePkM3gAFMCqBk7IrfG/CfvDFujh8x3LqLcoXJ 7+iyVElR31WJQ== Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4c53HY4FmQz44MQ; Mon, 18 Aug 2025 08:50:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.901 X-Spam-Level: X-Spam-Status: No, score=-2.901 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Received: from mx2eb1.netcup.net (unknown [10.243.12.53]) (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) by policy01-mors.netcup.net (Postfix) with ESMTPS id 4c53HX4dTWz8sYY; Mon, 18 Aug 2025 08:50:00 +0200 (CEST) Received: from [IPV6:2a02:3102:8e00:2060:4ceb:b9ed:a63a:aeca] (dynamic-2a02-3102-8e00-2060-4ceb-b9ed-a63a-aeca.310.pool.telefonica.de [IPv6:2a02:3102:8e00:2060:4ceb:b9ed:a63a:aeca]) by mx2eb1.netcup.net (Postfix) with ESMTPSA id 145F31007FC; Mon, 18 Aug 2025 08:49:56 +0200 (CEST) Authentication-Results: mx2eb1; spf=pass (sender IP is 2a02:3102:8e00:2060:4ceb:b9ed:a63a:aeca) smtp.mailfrom=rdiez-2006@rd10.de smtp.helo=[IPV6:2a02:3102:8e00:2060:4ceb:b9ed:a63a:aeca] Received-SPF: pass (mx2eb1: connection is authenticated) Message-ID: <537f6c23-0d39-4539-8410-6f409f30f2bd@rd10.de> Date: Mon, 18 Aug 2025 08:49:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#79253: Add timestamps to *Messages* To: rms@gnu.org References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> From: "R. Diez" Content-Language: de-DE, en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <175549979631.11075.11208169949688286067@mx2eb1.netcup.net> X-Rspamd-Server: rspamd-worker-8404 X-Rspamd-Queue-Id: 145F31007FC X-NC-CID: y7BA4HNRRKURLIyAwKGES55iEZgCNXJV6p5gJ7Hu X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Ordinary Emacs editing is sequential and only the order matters. > For people like me, whi do that, timestamps would be unhelpful clutter. > So if we implement timestamps, there should be an easy way to turn them off. When I switch to a *Compile-Log* buffer, I get an extra menu at the top called "Compile", with options like "Next Error" and "Stop Compilation". Wouldn't it be cool if the *Messages* buffer also displayed a new menu with options like "Show Timestamps", "Show Time Deltas" and "Clear Buffer"? But I am now more inclined to just offer a hook to capture the text lines sent to the *Messages* buffer. This way, you have complete freedom: you can send the text lines to syslog and/or implement your own *Enhanced Messages* buffer with all those features. I'm sure somebody would then write an Emacs package with such functionality. After the hook, the only other thing probably missing is to change all internal callers so that they write whole lines in a go. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 18 07:01:49 2025 Received: (at 79253) by debbugs.gnu.org; 18 Aug 2025 11:01:49 +0000 Received: from localhost ([127.0.0.1]:49458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unxcb-0006TX-0o for submit@debbugs.gnu.org; Mon, 18 Aug 2025 07:01:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40484) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unxcX-0006TA-VK for 79253@debbugs.gnu.org; Mon, 18 Aug 2025 07:01:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1unxcQ-0000sN-UP; Mon, 18 Aug 2025 07:01:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=L7SmenwDAIndeyPp2zpQpg6FZSzKCyYXFYO3q7yFapU=; b=p/IXFLEbkBFJgMLslnMm 2ndFJN7pai0fCON6nbMb5fk/rcKeVnd/QmpBjUFOjWJRvMHXK+tTZTTN64/Y3r5WUqPiCSwgpATjD T+/cVQBoVtZfyZpdsJEoM1/d9Lv0qWEALPeuQP5yCdFHDibejG6NTWjVX6j0V6RVNdL4+a2BhVrx5 2wqnwYHhpmkoyT4f2LvTwnuSAxIUEoMvoUl14M/KuK5DtMxvHdvyHcbVqwBuicYjTRjJ09PYfq/gk FOoolQ22NlkaodGcpZxMY5ddwcrt7XHpTvEPBMMbPk2eQd85UDn6ZUsu53q6s3yZU9gvVK67NV97y sGcCfmW7pXd2KQ==; Date: Mon, 18 Aug 2025 14:01:36 +0300 Message-Id: <86cy8sj3lb.fsf@gnu.org> From: Eli Zaretskii To: "R. Diez" In-Reply-To: <159a5ee2-17fa-4a7f-84dd-24f33729a7f1@rd10.de> (rdiez-2006@rd10.de) Subject: Re: bug#79253: Add timestamps to *Messages* References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <86bjoflj2d.fsf@gnu.org> <86tt26igm1.fsf@gnu.org> <159a5ee2-17fa-4a7f-84dd-24f33729a7f1@rd10.de> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org, rudolf@adamkovic.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 17 Aug 2025 20:04:04 +0200 > Cc: 79253@debbugs.gnu.org, Rudolf Adamkovič > > From: "R. Diez" > > > > [...] > > This happens because in this case we call 'message' 3 times, with the > > following 3 strings: > > > > "previous-line" > > ": " > > "Beginning of buffer" > > That looks like a wrong API design to me. The *Message* buffer is obviously line-oriented. If someone makes multiple calls to message_dolog() in order to create a single text line, then somebody else calling message_dolog() or 'message' between those calls will break that line. The Emacs Lisp machine is single-threaded, so such a "somebody else" doesn't exist who could interfere between consecutive calls to message_dolog. > I do not know anything about Emacs' internals, but I would imagine that inserting text in a buffer carries some overhead. Wouldn't it be more efficient anyway if the caller pieced together the complete line before calling message_dolog()? Not if there are different logics that determine each piece of text. (And inserting text is usually very light-weight anyway. It must be, for Emacs to be an efficient editor.) > > along with two new key bindings, one for adding some sort of separator and another for clearing the buffer. > > I have also missed a way to clear the *Messages* buffer, or to add a separator, in order to know if a text line came after the latest change I made in my code. > > In fact, I have written a tool to automatically add a separator when a log pause is detected in the console: > > https://github.com/rdiez/Tools/tree/master/LogPauseDetector > > But it is hard to implement such things in Emacs, because there are no hooks for the 'message' function. This is unrelated to 'message'. The *Messages* buffer is under a special major mode, messages-buffer-mode, so we can customize the behavior in that buffer as we do in other cases. > One thing that has always bothered me is that Emacs does not persist the *Messages* buffer. Because I am pretty bad at Lisp, sometimes my code fails under some weird circumstances. Or somebody else's code, like the recent trouble with Tramp's session timeouts. I then wanted to check whether I have gotten a particular message in the past, and what messages were around it, but the contents of *Messages* gets lost between reboots. I suggest to try using desktop-save-mode to save *Messages* between sessions. Anyway, these feature requests are out of scope of this bug report, and should be raised separately. What was important for me in this bug report was to hear opinions about the fact that some messages will broken into several lines if we add time-stamping at the message_dolog level. I don't think you have voiced your opinion about it -- would you please voice it? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 18 07:33:19 2025 Received: (at 79253) by debbugs.gnu.org; 18 Aug 2025 11:33:19 +0000 Received: from localhost ([127.0.0.1]:49505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uny75-0002Mt-Gf for submit@debbugs.gnu.org; Mon, 18 Aug 2025 07:33:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60826) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uny72-0002MY-AG for 79253@debbugs.gnu.org; Mon, 18 Aug 2025 07:33:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uny6q-0005LT-3i; Mon, 18 Aug 2025 07:33:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+/h1SmTornUD64AdtAYqFIyffxN3LoA/lwwmp205gsM=; b=rJi60Lg0jCwf xhHmk3dUTizU8lALZwqTaX5HXSLVWYHa9RAsw+F1eVLYI6rzCqkZIRBWZjEjZqVQ/i4/d2o8owWjs z0UDY4sLeCC0jTcghQkdyl8ZwAmeu6eLBsy2KyNrUyXYazyfyB4bcHjZbfMxI7EpTn15I9OzBtly1 HHab03XuUDXbTR/Y4lTxtqVKdjUSHVkpxOdGqn+unRUk6xAtoQNLV1Q0XxHI7x4pAiReICXa83mqZ Kv7m+Ny7l4k+ikC48D7qlwT4UBKz9KMKSUKpUlMRuS4KXNRMvzDO/lbifMstoObC66WPKloEI+4+T 5XAla/2t5lVDr/4Mn2LCOw==; Date: Mon, 18 Aug 2025 14:32:55 +0300 Message-Id: <867bz0j254.fsf@gnu.org> From: Eli Zaretskii To: rms@gnu.org In-Reply-To: (message from Richard Stallman on Sun, 17 Aug 2025 22:45:46 -0400) Subject: Re: bug#79253: Add timestamps to *Messages* References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org, rdiez-2006@rd10.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 79253@debbugs.gnu.org > From: Richard Stallman > Date: Sun, 17 Aug 2025 22:45:46 -0400 > > > I am trying to debug a Tramp problem, and I need associate Tramp debug > > log entries with entries in the *Messages* buffer. > > Ordinary Emacs editing is sequential and only the order matters. > For people like me, whi do that, timestamps would be unhelpful clutter. > So if we implement timestamps, there should be an easy way to turn them off. They will be opt-in, of course, if we decide to implement this. > Or an easy way to specify which messages should have timestamps. > Perhaps with a list of regexps that gives timestamps to a message > if it matches any of those regexps. That could be an idea, but I'm afraid that predicting the important messages in advance is difficult to say the least. So there's a significant chance the important ones will be missed. For a debugging aid, this is a significant disadvantage, IME. It's like debugging with GDB with a breakpoint randomly succeeding and failing to stop the program. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 18 07:39:39 2025 Received: (at 79253) by debbugs.gnu.org; 18 Aug 2025 11:39:39 +0000 Received: from localhost ([127.0.0.1]:49524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unyDC-0002fk-T9 for submit@debbugs.gnu.org; Mon, 18 Aug 2025 07:39:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58014) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unyDA-0002fX-SH for 79253@debbugs.gnu.org; Mon, 18 Aug 2025 07:39:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1unyD5-000688-BH; Mon, 18 Aug 2025 07:39:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RUtYlDvLZ/6l4AgVh+VvPqCuhESKNXX4nRlrN2af6rE=; b=O4b3m25ULIT8 B95rO2qKfRQNXDa6yXUWa25DhOtjNrJqEC8KbqYZBZaqhrMx4jP6rps9zpumidlBu/qt/w83si5ts mWqhJSRO3aorrwbkrBFWHnFJokGF6NqN4iGRp39oJFFwHIBv8HG1HbfLF8H0oyuSbKnAB97TiWcwC lvOZzwvL/u3k0G666h1FuHmYbBPmdnWsk3IlQTMweJNGn6MByzRSDdV5TNM3KK/+bJLrFU4Q0EI7e z9VC+qsAjCZ6APX9vA3lvLQowpdemH6X2H8oFFVVGkkGV23OsRBhcmYYm00ONpFY6QpoZW1tnFVgV iYsQrzgC43JpbEj/7U1/AA==; Date: Mon, 18 Aug 2025 14:39:23 +0300 Message-Id: <865xekj1uc.fsf@gnu.org> From: Eli Zaretskii To: "R. Diez" In-Reply-To: <537f6c23-0d39-4539-8410-6f409f30f2bd@rd10.de> (bug-gnu-emacs@gnu.org) Subject: Re: bug#79253: Add timestamps to *Messages* References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <537f6c23-0d39-4539-8410-6f409f30f2bd@rd10.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org, rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 79253@debbugs.gnu.org > Date: Mon, 18 Aug 2025 08:49:55 +0200 > From: "R. Diez" via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > Ordinary Emacs editing is sequential and only the order matters. > > For people like me, whi do that, timestamps would be unhelpful clutter. > > So if we implement timestamps, there should be an easy way to turn them off. > > When I switch to a *Compile-Log* buffer, I get an extra menu at the top called "Compile", with options like "Next Error" and "Stop Compilation". > > Wouldn't it be cool if the *Messages* buffer also displayed a new menu with options like "Show Timestamps", "Show Time Deltas" and "Clear Buffer"? See my earlier reply: the *Messages* buffer is put under a special major mode, so that mode could define menus that are useful in that buffer. Patches welcome. > But I am now more inclined to just offer a hook to capture the text lines sent to the *Messages* buffer. This way, you have complete freedom: you can send the text lines to syslog and/or implement your own *Enhanced Messages* buffer with all those features. I'm sure somebody would then write an Emacs package with such functionality. After the hook, the only other thing probably missing is to change all internal callers so that they write whole lines in a go. I don't think a hook is necessary. You could write a special minor mode, whereby a timer would periodically copy the contents of the *Messages* buffer to a file or a system log or whatever. (Having hooks for inserting text into *Messages* is hard technically because we deliberately use low-level functions to do that, to avoid any such hooks, because hooks could be unsafe to run, and having such a hook signal an error while storing messages into *Messages* might render Emacs unusable.) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 18 11:06:56 2025 Received: (at 79253) by debbugs.gnu.org; 18 Aug 2025 15:06:56 +0000 Received: from localhost ([127.0.0.1]:50802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uo1Rn-0005Tr-LO for submit@debbugs.gnu.org; Mon, 18 Aug 2025 11:06:56 -0400 Received: from relay.yourmailgateway.de ([188.68.63.98]:53143) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uo1Rk-0005Tf-7s for 79253@debbugs.gnu.org; Mon, 18 Aug 2025 11:06:53 -0400 Received: from mors-relay-2501.netcup.net (localhost [127.0.0.1]) by mors-relay-2501.netcup.net (Postfix) with ESMTPS id 4c5GJp2qSGz67R7; Mon, 18 Aug 2025 17:06:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rd10.de; s=key2; t=1755529610; bh=JUgtlPHslaqau58+L42eueZWjoPHrXSEhXNKD9Diqyw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AtXaCO0eMnKR9jSgAeydREncQMb/Jl1bhBO1D357/bFwpag05sKgVNaKHCeX9Q0cn 4DgwDaBekwYL4rCV6105lQsPVXK3XH7cAs+RL9hoMgZa30apPhESc2WceSbu/toKzS KI06txIytMdu0Vo9jhbnO5+Bn7l3+wBkIvbEoSqSatT82TNChvqRe/qZSqyof0h/Qr M1CwXK4De4O1ATlLYzUfsLT071rM7LRPrZxrsgYSWvHCU5Dk2iqxTlFttNts9juwMu GrC8Y5oGUtizqqWS0pvKcorfdOJNPjADb4O+/qWV/lX+kJayXleBJTi2phZz3AcASZ OZ5RsWfhhK7/Q== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-2501.netcup.net (Postfix) with ESMTPS id 4c5GJp26Qsz4xqf; Mon, 18 Aug 2025 17:06:50 +0200 (CEST) Received: from mx2eb1.netcup.net (unknown [10.243.12.53]) (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) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4c5GJn5Bpkz8sgT; Mon, 18 Aug 2025 17:06:49 +0200 (CEST) Received: from [IPV6:2a02:3102:8e00:2060:8710:f80:1958:d074] (dynamic-2a02-3102-8e00-2060-8710-0f80-1958-d074.310.pool.telefonica.de [IPv6:2a02:3102:8e00:2060:8710:f80:1958:d074]) by mx2eb1.netcup.net (Postfix) with ESMTPSA id DFA63100272; Mon, 18 Aug 2025 17:06:44 +0200 (CEST) Authentication-Results: mx2eb1; spf=pass (sender IP is 2a02:3102:8e00:2060:8710:f80:1958:d074) smtp.mailfrom=rdiez-2006@rd10.de smtp.helo=[IPV6:2a02:3102:8e00:2060:8710:f80:1958:d074] Received-SPF: pass (mx2eb1: connection is authenticated) Message-ID: <0e5c59d4-e3fc-404f-af5d-936d353f89f7@rd10.de> Date: Mon, 18 Aug 2025 17:06:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#79253: Add timestamps to *Messages* To: Eli Zaretskii References: <1625b03b-c625-43ca-a370-f52ea0956c00@rd10.de> <86bjoflj2d.fsf@gnu.org> <86tt26igm1.fsf@gnu.org> <159a5ee2-17fa-4a7f-84dd-24f33729a7f1@rd10.de> <86cy8sj3lb.fsf@gnu.org> From: "R. Diez" Content-Language: de-DE, en-GB In-Reply-To: <86cy8sj3lb.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <175552960524.32359.16038159487205946108@mx2eb1.netcup.net> X-Rspamd-Server: rspamd-worker-8404 X-Rspamd-Queue-Id: DFA63100272 X-NC-CID: H4W6m7U9WdQXpWYez36wLKjDrl1uLVztRkXL1zIp X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79253 Cc: 79253@debbugs.gnu.org, rudolf@adamkovic.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> That looks like a wrong API design to me. The *Message* buffer is obviously line-oriented. If someone makes multiple calls to message_dolog() in order to create a single text line, then somebody else calling message_dolog() or 'message' between those calls will break that line. > > The Emacs Lisp machine is single-threaded, so such a "somebody else" > doesn't exist who could interfere between consecutive calls to > message_dolog. This API problem is not limited to multithreaded scenarios. I actually had the same issue a few years ago outside Emacs in a single-threaded firmware. I added a trace() call to some routine without realising that the caller was calling it between 2 other trace() calls, which broke up the caller's log line. If Emacs is really only calling message_dolog() consecutively, it should be easy to merge them into a single call (I would imagine). > Not if there are different logics that determine each piece of text. > (And inserting text is usually very light-weight anyway. It must be, > for Emacs to be an efficient editor.) > [...] I just realised it does not really make sense for me to pursue this feature any longer. I haven't really got the time, or the necessary Emacs knowledge and skills. Even if you implemented exactly what I have in mind, you will probably ask me to test it, and I may not have the time or be able to write the necessary Lisp code to take advantage of the new hooks. I said for example that I would pipe the messages to syslog and then use standard syslog tools, but to do that, I would have to figure out how to run a background process from Emacs, open a pipe to it, monitor its health, etc. So I think it is best if I just stop it before I make you write any code or devote any more time to this. I hope the information in this bug report could at least save someone else some time in the future. And I learnt something new today: there is a desktop-save-mode which will save my *Messages* buffer across sessions. Thanks for the information, rdiez