GNU bug report logs -
#10726
24.0.93; `find-file-noselect': why should it interrogate the user?
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sat, 4 Feb 2012 19:27:02 UTC
Severity: wishlist
Tags: wontfix
Merged with 8180,
13159
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 10726 in the body.
You can then email your comments to 10726 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#10726
; Package
emacs
.
(Sat, 04 Feb 2012 19:27: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, 04 Feb 2012 19:27:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm evaluating some Lisp code I'm testing. It is non-interactive code.
I invoke it using `M-:', which I've bound to `pp-eval-expression'.
I first visit a read-only file. Then I change the file (using
`dired-do-chmod') to writable. Then I use `M-:' to eval a sexp that
does `find-file-noselect'.
Even though the code was not invoked interactively (`M-:' should not be
counted as interactive here), I got this interactive dialog from
`find-file-noselect':
"File foobar.toto is writable on disk. Change buffer mode? "
When this happened I was quite surprised, and I had almost no idea what
was going on. I did not know how to answer the question posed. The
question did not even tell me which buffer it proposed changing the mode
of.
This interrogation does not seem right. When evaluating code this way
(and for other non-interacive evaluations) the user might have no idea
even that a file is being visited by the code. After all, this is
`find-file-noselect', not `find-file'.
Why should `find-file-noselect' interact with the user directly using
_any_ dialog? I can see why some particular code that _invokes_
`find-file-noselect' might choose to ask the user a question. And I can
see why `find-file-noselect' itself might raise an error in some
situations. But I do not see why `find-file-noselect' should ever
interrogate the user.
I do see that `find-file-noselect' has been posing questions to the user
since Day One. But I do not see why that is appropriate. I would think
that this function should be only for Lisp code to work on a file in a
buffer.
We could conceivably pass `find-file-noselect' a new optional argument
that would indicate whether `find-file-noselect' should question the
user to find out more information that might help the function do its
job, and if not just punt (e.g. raise an error) if it cannot proceed
normally. But why should it systematically do such interactive stuff?
When a user gets such a question in the context of `find-file-noselect'
being invoked by `find-file' or some other _command_, the questioning is
understandable - I've never been shocked by it in such a context. But
in this case I was surprised and perplexed.
In GNU Emacs 24.0.93.1 (i386-mingw-nt5.1.2600)
of 2012-01-29 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.6) --no-opt --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 --ldflags
-LD:/devel/emacs/libs/gnutls-3.0.9/lib'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10726
; Package
emacs
.
(Mon, 06 Feb 2012 14:12:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 10726 <at> debbugs.gnu.org (full text, mbox):
severity 10726 wishlist
thanks
> I do see that `find-file-noselect' has been posing questions to the user
> since Day One. But I do not see why that is appropriate. I would think
FWIW, I largely agree on the principle. But I think that requires
non-trivial changes, including maybe adding a new "really
non-interactive" version of find-file-noselect.
Stefan
Severity set to 'wishlist' from 'minor'
Request was from
Stefan Monnier <monnier <at> iro.umontreal.ca>
to
control <at> debbugs.gnu.org
.
(Mon, 06 Feb 2012 14:12:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#10726
; Package
emacs
.
(Mon, 06 Feb 2012 15:42:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 10726 <at> debbugs.gnu.org (full text, mbox):
> > I do see that `find-file-noselect' has been posing
> > questions to the user since Day One. But I do not
> see why that is appropriate.
>
> FWIW, I largely agree on the principle. But I think that requires
> non-trivial changes, including maybe adding a new "really
> non-interactive" version of find-file-noselect.
Yes. That's the point of the bug report. It would mean factoring out the truly
non-interactive part as the real `find-file-noselect' and using the
interrogation part as a wrapper that is called by commands when used
interactively.
Forcibly Merged 8180 10726.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 28 Apr 2016 13:28:02 GMT)
Full text and
rfc822 format available.
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 74 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.