GNU bug report logs -
#13159
24.3.50; `find-file-noselect' should not display or log messages
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Wed, 12 Dec 2012 18:48:01 UTC
Severity: wishlist
Tags: wontfix
Merged with 8180,
10726
Found in versions 24.0.50, 24.0.93, 24.3.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 13159 in the body.
You can then email your comments to 13159 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#13159
; Package
emacs
.
(Wed, 12 Dec 2012 18:48:01 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
.
(Wed, 12 Dec 2012 18:48:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm using `find-file-noselect', and I see this in *Messages*:
Note: file is write protected
First, that is not helpful at all, without saying WHICH file is
write-protected.
More importantly, why does it make sense to display or record
such a message when the file is not visited interactively?
This message comes from `after-find-file'. And there are umpteen
additional such messages issued from this function. The call to
`after-find-file' is in `find-file-noselect-1'.
I see that this is nothing new - it is the case even in Emacs 20.
Nevertheless, I do not understand why `find-file-noselect' would issue
messages.
If you decide to keep this behavior, please consider adding the file
name to such a message. At least that way, a user can learn something
from the *Messages* log.
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
of 2012-12-07 on MS-W7-DANI
Bzr revision: 111150 eggert <at> cs.ucla.edu-20121207175317-wxhrqxpp0173whq0
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.7) --no-opt --enable-checking --cflags
-Ic:/emacs/libs/libXpm-3.5.10/include -Ic:/emacs/libs/libXpm-3.5.10/src
-Ic:/emacs/libs/libpng-1.2.37-lib/include -Ic:/emacs/libs/zlib-1.2.5
-Ic:/emacs/libs/giflib-4.1.4-1-lib/include
-Ic:/emacs/libs/jpeg-6b-4-lib/include
-Ic:/emacs/libs/tiff-3.8.2-1-lib/include
-Ic:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2
-Ic:/emacs/libs/gnutls-3.0.9-w32-bin/include
-Ic:/emacs/libs/libiconv-1.9.2-1-lib/include'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13159
; Package
emacs
.
(Wed, 12 Dec 2012 23:19:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 13159 <at> debbugs.gnu.org (full text, mbox):
> And there are umpteen additional such messages issued from this function.
There are umpteen messages issued from umpteen functions,
all without a buffer's file name or other additional information.
For example:
Auto-saving...done
Mark set
Follow the link [2 times]
Type "q" to restore previous buffer.
mouse-2, RET: find function's definition
Mark saved where search started
Entering debugger...
Back to top level.
Commands: d, x; RET; q to quit; ? for help.
Making completion list...
Quit
Note: file is write protected
Using vacuous schema
Do you want to fix all of them too?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13159
; Package
emacs
.
(Wed, 12 Dec 2012 23:33:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 13159 <at> debbugs.gnu.org (full text, mbox):
> > And there are umpteen additional such messages issued from
> > this function.
>
> There are umpteen messages issued from umpteen functions,
> all without a buffer's file name or other additional information.
> For example:
>
> Auto-saving...done
> Mark set
> Follow the link [2 times]
> Type "q" to restore previous buffer.
> mouse-2, RET: find function's definition
> Mark saved where search started
> Entering debugger...
> Back to top level.
> Commands: d, x; RET; q to quit; ? for help.
> Making completion list...
> Quit
> Note: file is write protected
> Using vacuous schema
>
> Do you want to fix all of them too?
Without looking at the details, it sounds like all of them should be fixed.
But this report is only about fixing messages wrt `find-file-noselect'.
Do you disagree that it makes little sense to display messages when
`find-file-noselect' is called from a non-interactive function? And that it is
not too helpful to find a message in *Messages* telling you only that some
(unnamed) file (perhaps in a dolist that handles 12358 files) was
write-protected?
The priority of fixing bugs is for Emacs Dev to decide. And this one has been
around a very long time, so it is probably not the most important. But in any
case, it is a bug, no?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13159
; Package
emacs
.
(Thu, 13 Dec 2012 17:29:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 13159 <at> debbugs.gnu.org (full text, mbox):
> From: "Drew Adams" <drew.adams <at> oracle.com>
> Date: Wed, 12 Dec 2012 10:46:07 -0800
>
> I'm using `find-file-noselect', and I see this in *Messages*:
>
> Note: file is write protected
>
> First, that is not helpful at all, without saying WHICH file is
> write-protected.
>
> More importantly, why does it make sense to display or record
> such a message when the file is not visited interactively?
If you invoke this function non-interactively, pass it a non-nil value
as the 2nd argument. That should shut up any messages from this
function or the subroutines it calls. E.g.:
(find-file-noselect "/foo/bar/nonexistent-file" t)
=> #<buffer nonexistent-file>
and no messages.
Does this solve your problem?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13159
; Package
emacs
.
(Thu, 13 Dec 2012 17:48:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 13159 <at> debbugs.gnu.org (full text, mbox):
> If you invoke this function non-interactively, pass it a non-nil value
> as the 2nd argument. That should shut up any messages from this
> function or the subroutines it calls....
> Does this solve your problem?
Good point, Eli. And I do use that arg in many places.
I guess the problem here is that I do want actual warnings to be printed (to
*Messages*), but:
1. "Note: File is write-protected" is NOT a warning - it's just some extra
information - note the "Note:".
2. Such information about a particular file is anyway useless in a messages log
if it does not include the file name.
IOW, in this case, I would want warnings to be logged, and I would want them to
indicate the files that had problems. I don't need to log extra informational
notices, and I don't need to log even warnings that do not help users because
they don't mention the problematic file.
So thanks for pointing that out, but I think the proper fix here is to:
a. not have parameter NOWARN treat non-warning messages the same as warnings
and,
b. especially, add the file name to all file-specific messages, including
warnings.
Does that make sense?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13159
; Package
emacs
.
(Thu, 13 Dec 2012 18:10:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 13159 <at> debbugs.gnu.org (full text, mbox):
> From: "Drew Adams" <drew.adams <at> oracle.com>
> Cc: <13159 <at> debbugs.gnu.org>
> Date: Thu, 13 Dec 2012 09:46:18 -0800
>
> a. not have parameter NOWARN treat non-warning messages the same as warnings
> and,
>
> b. especially, add the file name to all file-specific messages, including
> warnings.
>
> Does that make sense?
Could be some additional value of NOWARN, perhaps.
Forcibly Merged 8180 10726 13159.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 28 Apr 2016 17:40:03 GMT)
Full text and
rfc822 format available.
Added tag(s) wontfix.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 01 May 2016 18:00:03 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
8180 <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
.
(Sun, 01 May 2016 18:00:04 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 30 May 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.