GNU bug report logs - #11851
24.1.50; info.el: show messages only when interactive

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 3 Jul 2012 17:48:02 UTC

Severity: wishlist

Merged with 12491

Found in versions 24.1.50, 24.2.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11851 in the body.
You can then email your comments to 11851 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11851; Package emacs. (Tue, 03 Jul 2012 17:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 03 Jul 2012 17:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.1.50; info.el: show messages only when interactive
Date: Tue, 3 Jul 2012 10:42:27 -0700
In several places in info.el there is a function that could be used in a
non-interactive context (e.g. by 3rd-party code).  And in such a context
it might sometimes not be appropriate to display the various messages
that are currently shown unconditionally.
 
Please add optional MSGP arguments and conditionalize the calls to
`message' using `called-interactively'.  Thx.
 
The only alternative for 3rd-party code that wants to reuse such
functions is to redefine them to add optional MSGP args etc.  Better
that Emacs should do that from the outset.
 

In GNU Emacs 24.1.50.1 (i386-mingw-nt5.1.2600)
 of 2012-07-01 on MARVIN
Bzr revision: 108826 yamaoka <at> jpl.org-20120702004841-kzatmydft6dct0ry
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'
 





Merged 11851 12491. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 11 Dec 2012 18:57:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11851; Package emacs. (Thu, 28 Apr 2016 15:51:02 GMT) Full text and rfc822 format available.

Message #10 received at 11851 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 12491 <at> debbugs.gnu.org, 11851 <at> debbugs.gnu.org,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#12491: 24.2.50;
 `Info-insert-dir' should be able to not show msgs
Date: Thu, 28 Apr 2016 17:49:55 +0200
Juri Linkov <juri <at> jurta.org> writes:

>> `Info-insert-dir' is not an interactive function.  It can be called by
>> any Lisp code that wants to insert an Info directory.  Please provide an
>> optional MSG arg (or a NOMSG) arg, so that calling code can optionally
>> not show the message "Composing main Info directory...done".
>
> There are many other messages that you might not want to see.
> Better than adding a new arg for all of them, maybe callers
> should let-bind a variable like `messages-buffer-max-lines' to nil
> that will avoid showing the message.

As Eli pointed out, there's now `inhibit-message'.  Closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 11851 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 28 Apr 2016 15:51:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11851; Package emacs. (Thu, 28 Apr 2016 16:06:02 GMT) Full text and rfc822 format available.

Message #15 received at 11851 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Juri Linkov <juri <at> jurta.org>
Cc: 12491 <at> debbugs.gnu.org, 11851 <at> debbugs.gnu.org
Subject: RE: bug#12491: 24.2.50; `Info-insert-dir' should be able to not show
 msgs
Date: Thu, 28 Apr 2016 09:05:02 -0700 (PDT)
> As Eli pointed out, there's now `inhibit-message'.  Closing.

That is not the Emacs way.  It is not what is recommended
in the manual. See (elisp) `Distinguish Interactive'.

--

The recommended way to test whether
the function was called using 'call-interactively' is to give it an
optional argument 'print-message' and use the 'interactive' spec to make
it non-'nil' in interactive calls.  Here's an example:

     (defun foo (&optional print-message)
       (interactive "p")
       (when print-message
         (message "foo")))

We use '"p"' because the numeric prefix argument is never 'nil'.
Defined in this way, the function does display the message when called
from a keyboard macro.

   The above method with the additional argument is usually best,
because it allows callers to say "treat this call as interactive".  But
you can also do the job by testing 'called-interactively-p'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11851; Package emacs. (Thu, 28 Apr 2016 19:04:01 GMT) Full text and rfc822 format available.

Message #18 received at 11851 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: juri <at> jurta.org, larsi <at> gnus.org, 11851 <at> debbugs.gnu.org,
 12491 <at> debbugs.gnu.org
Subject: Re: bug#11851: bug#12491: 24.2.50;
 `Info-insert-dir' should be able to not show msgs
Date: Thu, 28 Apr 2016 22:03:34 +0300
> Date: Thu, 28 Apr 2016 09:05:02 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 12491 <at> debbugs.gnu.org, 11851 <at> debbugs.gnu.org
> 
> > As Eli pointed out, there's now `inhibit-message'.  Closing.
> 
> That is not the Emacs way.

It's in Emacs, so we clearly disagree with you.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11851; Package emacs. (Fri, 29 Apr 2016 00:42:01 GMT) Full text and rfc822 format available.

Message #21 received at 11851 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: juri <at> jurta.org, larsi <at> gnus.org, 11851 <at> debbugs.gnu.org,
 12491 <at> debbugs.gnu.org
Subject: RE: bug#11851: bug#12491: 24.2.50;	`Info-insert-dir' should be able
 to not show msgs
Date: Thu, 28 Apr 2016 17:41:33 -0700 (PDT)
> > > As Eli pointed out, there's now `inhibit-message'.  Closing.
> >
> > That is not the Emacs way.
> 
> It's in Emacs, so we clearly disagree with you.

Yes, you do.  But Emacs doesn't, as I indicated, with a
citation.

Or perhaps you want to remove Emacs's current and past
recommendation...




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 May 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 76 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.