unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sebastian Wiesner <lunaryorn@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Tom Tromey <tromey@redhat.com>, Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Inhibit "Wrote foo" from write-region
Date: Thu, 23 Jan 2014 15:24:14 +0100	[thread overview]
Message-ID: <m2y526lqsx.fsf@lunaryorn-air.fritz.box> (raw)
In-Reply-To: <jwvd2jix12y.fsf-monnier+emacs@gnu.org>


monnier@iro.umontreal.ca 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	other threads:[~2014-01-23 14:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 12:32 Inhibit "Wrote foo" from write-region Sebastian Wiesner
2014-01-21 12:38 ` Sebastian Wiesner
2014-01-21 15:57   ` Eli Zaretskii
2014-01-21 16:31     ` Sebastian Wiesner
2014-01-21 16:47       ` Eli Zaretskii
2014-01-22 12:35         ` Sebastian Wiesner
2014-01-22 15:11           ` Stefan Monnier
2014-01-22 17:00             ` Sebastian Wiesner
     [not found]       ` <<834n4xgu3z.fsf@gnu.org>
2014-01-21 17:59         ` Drew Adams
2014-01-21 18:26           ` Eli Zaretskii
2014-01-22  8:05           ` Juri Linkov
2014-01-21 16:42 ` Tom Tromey
2014-01-22 12:37   ` Sebastian Wiesner
2014-01-22 15:09     ` Stefan Monnier
2014-01-22 17:08       ` Sebastian Wiesner
2014-01-22 19:20         ` Stefan Monnier
2014-01-23  9:35           ` Sebastian Wiesner
2014-01-23 13:50             ` Stefan Monnier
2014-01-23 14:24               ` Sebastian Wiesner [this message]
2014-01-23 15:18                 ` Stefan Monnier
2014-01-23 16:15                   ` Sebastian Wiesner
2014-01-23 16:29                 ` Eli Zaretskii
2014-01-23 17:31                   ` Sebastian Wiesner
2014-01-23 18:04                     ` Eli Zaretskii
2014-01-24 20:14                       ` Sebastian Wiesner
2014-01-23 16:25               ` Eli Zaretskii
2014-01-23 17:37                 ` Sebastian Wiesner
2014-01-23 18:07                   ` Eli Zaretskii
2014-01-24 13:34                     ` Johan Andersson
2014-01-24 13:48                       ` Stefan Monnier
2014-01-24 14:25                       ` Eli Zaretskii
     [not found] <"<m2r481o6rh.fsf"@lunaryorn-air.fritz.box>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2y526lqsx.fsf@lunaryorn-air.fritz.box \
    --to=lunaryorn@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).