emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Message buffer time-stamps


From: Juri Linkov
Subject: Re: Message buffer time-stamps
Date: Sun, 26 Dec 2004 04:47:54 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> 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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]