From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Message buffer time-stamps Date: Sun, 26 Dec 2004 04:47:54 +0200 Organization: JURTA Message-ID: <87y8fliuql.fsf@jurta.org> References: <87sm5wtpwa.fsf@jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1104033274 16486 80.91.229.6 (26 Dec 2004 03:54:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Dec 2004 03:54:34 +0000 (UTC) Cc: yonirabkin@gmail.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 26 04:54:27 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CiPUB-0005pm-00 for ; Sun, 26 Dec 2004 04:54:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CiPeu-0002MR-P5 for ged-emacs-devel@m.gmane.org; Sat, 25 Dec 2004 23:05:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CiPeb-0002IB-SD for emacs-devel@gnu.org; Sat, 25 Dec 2004 23:05:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CiPeY-0002Gb-EQ for emacs-devel@gnu.org; Sat, 25 Dec 2004 23:05:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CiPeY-0002Fp-6a for emacs-devel@gnu.org; Sat, 25 Dec 2004 23:05:10 -0500 Original-Received: from [194.126.101.98] (helo=MXR-4.estpak.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CiPT6-0004FD-HP; Sat, 25 Dec 2004 22:53:20 -0500 Original-Received: from mail.neti.ee (80-235-32-158-dsl.mus.estpak.ee [80.235.32.158]) by MXR-4.estpak.ee (Postfix) with ESMTP id 2E3FA102F04; Sun, 26 Dec 2004 05:53:16 +0200 (EET) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sat, 25 Dec 2004 10:13:57 -0500") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:31401 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31401 Richard Stallman writes: > I propose the patch that calls after-change-functions after *Messages* > buffer modification, i.e. when new messages are added to the > *Messages* buffer by the `message' function. > > That is not safe. Messages are output from lots of places, and I > don't know if all of them can handle GC. This patch would cause GCs > in those places. GC can be caused even without this patch. The `del_range_both' function in `message_dolog' (which deletes the text from the *Messages* buffer to combine repeated messages) calls a `after-change-functions' hook when it is defined. > You could make this safe by checking every call to the `message_' > functions and verifying that GC is safe in each of them. I see several variables are protected from GC in `message_dolog' as well as in functions that call it. I suppose that is already done with the expectation of possible GC in `message_dolog'. > However, I'd suggest instead using an idle timer to check that > a message has been added, and to add a timestamp. I don't understand how timers can help to insert message timestamp. When a timer calls its function it will insert too late timestamp. And how can it find where to insert timestamps among all recently added messages? > There is another issue. Right now there's a feature to combine > repeated messages. If you put time stamps in the buffer, that would > break this feature, unless the time stamp code takes pains to keep > it working. This is right. Time stamps should break this feature. Every repeated message should have its own time stamp. -- Juri Linkov http://www.jurta.org/emacs/