GNU bug report logs -
#12491
24.2.50; `Info-insert-dir' should be able to not show msgs
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sat, 22 Sep 2012 22:45:02 UTC
Severity: wishlist
Merged with 11851
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 12491 in the body.
You can then email your comments to 12491 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12491
; Package
emacs
.
(Sat, 22 Sep 2012 22:45: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
.
(Sat, 22 Sep 2012 22:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
`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".
In GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600)
of 2012-09-17 on MARVIN
Bzr revision: 110062 cyd <at> gnu.org-20120917054104-r93rtwkrtva73ewe
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.7) --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'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12491
; Package
emacs
.
(Sat, 22 Sep 2012 22:55:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12491 <at> debbugs.gnu.org (full text, mbox):
Example: code that inserts the directory into a temp buffer
to do something with it. E.g.:
(Info-mode)
(info-initialize)
(Info-find-node-2 "dir" "top" t)
That invokes
(Info-virtual-call Info-directory-find-node "dir" "Top" t)
which invokes (Info-directory-find-node "dir" "Top" t)
which invokes (Info-insert-dir), which displays the message.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12491
; Package
emacs
.
(Sat, 22 Sep 2012 23:56:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 12491 <at> debbugs.gnu.org (full text, mbox):
> `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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12491
; Package
emacs
.
(Sun, 23 Sep 2012 02:28:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 12491 <at> debbugs.gnu.org (full text, mbox):
> > `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.
Thank works too, I suppose.
But I think that as a general rule it is better for a function that can interact
with the user (e.g. display a message) to also provide reasonably for use
without such interaction, assuming such a use makes sense for it.
If there are "many other" such messages, are there also many other such
functions displaying them? Perhaps they are all defective in this regard.
Better to set good examples than proliferate bad ones. I don't know whether the
functions you have in mind are in fact candidates for becoming better citizens.
But if they are, cleaning them up is the right approach.
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#12491
; Package
emacs
.
(Thu, 28 Apr 2016 15:51:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 12491 <at> debbugs.gnu.org (full text, mbox):
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:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12491
; Package
emacs
.
(Thu, 28 Apr 2016 16:06:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 12491 <at> debbugs.gnu.org (full text, mbox):
> 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#12491
; Package
emacs
.
(Thu, 28 Apr 2016 19:05:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 12491 <at> debbugs.gnu.org (full text, mbox):
> 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#12491
; Package
emacs
.
(Fri, 29 Apr 2016 00:42:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 12491 <at> debbugs.gnu.org (full text, mbox):
> > > 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 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.