From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Is there a way to inhibit message3 from Elisp? Date: Wed, 22 Apr 2015 15:24:24 +0300 Message-ID: <831tjc4ah3.fsf@gnu.org> References: <87618psiu4.fsf@gmail.com> <87a8y1l3ho.fsf@gmail.com> <83618o4eom.fsf@gnu.org> <87lhhke5s1.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1429705540 8189 80.91.229.3 (22 Apr 2015 12:25:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Apr 2015 12:25:40 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 22 14:25:31 2015 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 1YktiX-0004mg-8i for ged-emacs-devel@m.gmane.org; Wed, 22 Apr 2015 14:25:25 +0200 Original-Received: from localhost ([::1]:34839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YktiR-0002hm-G6 for ged-emacs-devel@m.gmane.org; Wed, 22 Apr 2015 08:25:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykthh-00025D-PG for emacs-devel@gnu.org; Wed, 22 Apr 2015 08:24:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ykthc-0000GV-Kv for emacs-devel@gnu.org; Wed, 22 Apr 2015 08:24:33 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:43273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykthc-0000GK-DC for emacs-devel@gnu.org; Wed, 22 Apr 2015 08:24:28 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NN700700JAG2100@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Wed, 22 Apr 2015 15:24:26 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NN70065HJSQYJ90@a-mtaout20.012.net.il>; Wed, 22 Apr 2015 15:24:26 +0300 (IDT) In-reply-to: <87lhhke5s1.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:185774 Archived-At: > From: Oleh Krehel > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Wed, 22 Apr 2015 13:55:42 +0200 > > Eli Zaretskii writes: > >> I got this code to work as I expect: > >> > >> (progn > >> (setq inhibit-message t) > >> (message "foo") > >> (setq inhibit-message nil)) > >> > >> However, this doesn't work: > >> > >> (let ((inhibit-message t)) > >> (message "foo")) > > > > How does it "not work"? It did for me. > > I misunderstood that when "C-x C-e" would not print the message in > *scratch*. But otherwise, it works. I used C-j instead, and it correctly inserts the message into *Messages*, but does not display it in the echo area. > Updated etc/NEWS and the manual (entry for `message'). > Let me know if it's OK to merge. I think it's OK, with a few minor comments: +** New variable `inhibit-message', when bound to t, inhibits the ^^^^ "non-nil" is more accurate (please make the same change in the manual as well) + message3 C function from using the Echo Area. The output is still + logged to the *Messages* buffer. First, we use 2 spaces between sentences, per US English conventions. More importantly, NEWS is supposed to be read by Lisp-level users, so talking about C-level details is not useful. Please talk about the 'message' function instead. Also, "using the Echo Area" is too vague; better say "displaying messages in the Echo Area". Finally, if the change is documented in the manual, it should be marked with "+++", see the explanations at the beginning of NEWS. +When @code{inhibit-message} is @code{t}, no message will be displayed +in the echo area, it will only be logged to @file{*Messages*}. "*Messages*" is not a file, so please use the @samp markup. Also, please document this explicitly as a variable, using @defvar, so that it gets indexed as all the other variables. There are examples of its usage in the manual.