From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Wiesner Newsgroups: gmane.emacs.devel Subject: Re: Inhibit "Wrote foo" from write-region Date: Thu, 23 Jan 2014 15:24:14 +0100 Message-ID: References: <87k3dte17j.fsf@fleche.redhat.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390487060 21426 80.91.229.3 (23 Jan 2014 14:24:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jan 2014 14:24:20 +0000 (UTC) Cc: Tom Tromey , Emacs-Devel devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 23 15:24:28 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W6LCl-00019B-PA for ged-emacs-devel@m.gmane.org; Thu, 23 Jan 2014 15:24:27 +0100 Original-Received: from localhost ([::1]:41439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6LCl-0000CH-9O for ged-emacs-devel@m.gmane.org; Thu, 23 Jan 2014 09:24:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6LCe-0000Ap-Ji for emacs-devel@gnu.org; Thu, 23 Jan 2014 09:24:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6LCd-0003Tm-Aw for emacs-devel@gnu.org; Thu, 23 Jan 2014 09:24:20 -0500 Original-Received: from mail-bk0-x231.google.com ([2a00:1450:4008:c01::231]:47500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6LCd-0003Te-3K for emacs-devel@gnu.org; Thu, 23 Jan 2014 09:24:19 -0500 Original-Received: by mail-bk0-f49.google.com with SMTP id v15so381550bkz.22 for ; Thu, 23 Jan 2014 06:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-type; bh=VFww/4v++b9hXvxnCUSow9PC5zuLBFHnJ+GOJ4y/wps=; b=ujB1j2ibFDZ0Ua8qfcI2k8vfv1tW+p/bhux7kvyQN3Sx/QpH0ikSy2WVDQP7k+j2bI zcwbkyPP5ieNI3+Tz6VapXLKH5+YRZ+UaXp28j3ir/VXVVHlYZvalSoT7AeAyJU+oo0i idR+VPbSyhZ9npgCkkacRMYSQrHHQf0FCZAoGblXKjtHrC61YCGP9oXqTDABBBj9YEqo /mlzx+txBDEQBSPbO3ttWf+dURjsJVm7uoW4oPle/7YRehfO7CbRS67PyB+ubf85gJvA FDlV3kgEIDANfcNZDFCvEsSwCmZ9fMpUSOpIdIKHmcW+tBBjYm0lK6Lt4SdjlCc8dsGR AbxA== X-Received: by 10.205.12.133 with SMTP id pi5mr1295938bkb.54.1390487057166; Thu, 23 Jan 2014 06:24:17 -0800 (PST) Original-Received: from lunaryorn-air.fritz.box ([2001:a60:1110:c901:b119:8174:ae5c:be88]) by mx.google.com with ESMTPSA id dg4sm9247123bkc.10.2014.01.23.06.24.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jan 2014 06:24:16 -0800 (PST) User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.1 In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4008:c01::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:168952 Archived-At: 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