emacs-devel
[Top][All Lists]
Advanced

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

Re: Inhibit "Wrote foo" from write-region


From: Sebastian Wiesner
Subject: Re: Inhibit "Wrote foo" from write-region
Date: Thu, 23 Jan 2014 15:24:14 +0100
User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.1

address@hidden writes:

>> I presume, there is little chance to change this behaviour for
>> noninteractive use?
>
> Definitely not for 24.4.
>
> Afterwards, someone could try and look at the issue in more detail,
> but it's risky, since it's a fairly low-level primitive called from
> many different packages.  We'd have to go and check how all these
> calls would be affected.

I cannot see how *not* calling "message_with_string" in "write_region"
could affect anything negatively.  Especially in a non-interactive
session, where "message_with_string" effectively comes down to
"fprintf".

But obviously my understanding of Emacs' internals and design principles
is limited.

>> I understand, that these messages are important to many users in an
>> *interactive* session, and that changing or removing them would be
>> backwards-incompatible, but do these messages really matter in
>> a *noninteractive* session?
>
> I find it's usually a bad idea to try and do things differently based
> on whether the session is interactive or not.  It's much more frequent
> that the deciding factor should be "called interactively or not".

I generally agree, but in this specific case there is a clear difference
between interactive and non-interactive sessions, simply because the
underlying "message_with_string" makes this distinction.

In an interactive session, even excessive messages are not intrusive,
simply because they only appear for a very short time in the mini buffer
and are then logged away in *Messages*, which is usually not visible,
unless the user has explicitly selected this buffer.  As such, the user
can effectively control which messages they want to see and which not.

In a non-interactive session however, the user has no such control.
*All* messages are written to the terminal, and there is no way to
remove or hide them other than clearing the entire screen.  Hence,
excessive messages immediately result in excessive terminal output,
which renders the entire output of a non-interactive session more or
less useless.

And precisely because "write_region" is such an essential primitive and
called from many different places, its messages will lead to excessive
terminal output in non-interactive sessions.

And as things stand, this behaviour just makes it very hard and
inconvenient to write meaningful non-interactive Emacs Lisp programs.

>
>
>         Stefan




reply via email to

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