unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Oleh Krehel <ohwoeowho@gmail.com>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Is there a way to inhibit message3 from Elisp?
Date: Wed, 22 Apr 2015 15:24:24 +0300	[thread overview]
Message-ID: <831tjc4ah3.fsf@gnu.org> (raw)
In-Reply-To: <87lhhke5s1.fsf@gmail.com>

> From: Oleh Krehel <ohwoeowho@gmail.com>
> Cc: monnier@iro.umontreal.ca,  emacs-devel@gnu.org
> Date: Wed, 22 Apr 2015 13:55:42 +0200
> 
> Eli Zaretskii <eliz@gnu.org> 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.



  reply	other threads:[~2015-04-22 12:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21 13:37 Is there a way to inhibit message3 from Elisp? Oleh Krehel
2015-04-21 17:17 ` Stefan Monnier
2015-04-21 18:50   ` Oleh Krehel
2015-04-21 23:25     ` Artur Malabarba
2015-04-22  6:00       ` Oleh Krehel
2015-04-22 10:53     ` Eli Zaretskii
2015-04-22 11:55       ` Oleh Krehel
2015-04-22 12:24         ` Eli Zaretskii [this message]
2015-04-22 12:50           ` Oleh Krehel
2015-04-22 13:01             ` Eli Zaretskii
2015-04-22 13:51           ` Stefan Monnier
2015-04-22 13:48             ` Oleh Krehel
2015-04-22 17:39             ` Artur Malabarba
2015-04-22 20:20               ` Stefan Monnier
2015-04-22 12:42         ` Artur Malabarba
2015-04-22 17:22         ` Artur Malabarba
2015-04-22 17:20           ` Oleh Krehel
2015-04-22 13:53     ` Stefan Monnier

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=831tjc4ah3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=ohwoeowho@gmail.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).