GNU bug report logs - #18340
24.4.50; Bad UI for `find-file-literally'

Previous Next

Package: emacs;

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

Date: Wed, 27 Aug 2014 21:39:02 UTC

Severity: normal

Tags: moreinfo

Merged with 5423

Found in versions 23.1.91, 24.4.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 18340 in the body.
You can then email your comments to 18340 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#18340; Package emacs. (Wed, 27 Aug 2014 21:39: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. (Wed, 27 Aug 2014 21:39: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.4.50; Bad UI for `find-file-literally'
Date: Wed, 27 Aug 2014 14:37:45 -0700 (PDT)
Summary: Don't show a multi-line message for prompting `y-or-n-p'
in the echo area and expect users to see it.

The UI for `find-file-literally' depends on `resize-mini-windows' being
non-nil.  Not a good idea.  To see how bad it can be, set
`resize-mini-windows' to nil, then visit a file, then try to visit it
using `M-x find-file-literally'.  You see only this line in the echo
area, which is not even a question:

  The file foo.el is already visited normally.

Huh?  A user who sees that has no clue as to what is going on.

Beyond this design being incredibly ill-advised in general, it breaks
the use of a standalone minibuffer frame, for which
`resize-mini-windows' has no effect.  In my code, for example, I do this,
where `'1on1-fit-minibuffer-frame' resizes the minibuffer frame to fit
its current contents:

  (add-hook 'post-command-hook '1on1-fit-minibuffer-frame)

That of course has no effect during `read-key', which is what is used by
`y-or-n-p' (which is used by `find-file-literally').

`1on1-fit-minibuffer-frame' is also a command that increases the
minibuffer frame height by a line when it is repeated.  It is bound
in the minibuffer to `C-o'.  But of course that is ineffective for
something like `y-or-n-p', which does not use the minibuffer.

Please reimplement the multiple-line message and associated y-or-n
question for `find-file-literally', so that the message part is visible
somewhere outside of the echo area.  Pop up a separate window for it,
show it in a tooltip, or show it any number of other reasonable ways.


In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-08-15 on LEG570
Bzr revision: 117706 rgm <at> gnu.org-20140815043406-p5hbu97cbm7pulcn
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18340; Package emacs. (Wed, 04 May 2016 01:00:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 18340 <at> debbugs.gnu.org
Subject: Re: bug#18340: 24.4.50; Bad UI for `find-file-literally'
Date: Wed, 04 May 2016 02:59:36 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> Summary: Don't show a multi-line message for prompting `y-or-n-p'
> in the echo area and expect users to see it.
>
> The UI for `find-file-literally' depends on `resize-mini-windows' being
> non-nil.  Not a good idea.  To see how bad it can be, set
> `resize-mini-windows' to nil, then visit a file, then try to visit it
> using `M-x find-file-literally'.  You see only this line in the echo
> area, which is not even a question:
>
>   The file foo.el is already visited normally.

We should perhaps consider obsoleting `resize-mini-windows'.  Emacs has
many prompts now that don't make sense in a single line.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18340; Package emacs. (Wed, 04 May 2016 14:48:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 18340 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#18340: 24.4.50; Bad UI for `find-file-literally'
Date: Wed, 04 May 2016 17:47:26 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Wed, 04 May 2016 02:59:36 +0200
> Cc: 18340 <at> debbugs.gnu.org
> 
> Drew Adams <drew.adams <at> oracle.com> writes:
> 
> > Summary: Don't show a multi-line message for prompting `y-or-n-p'
> > in the echo area and expect users to see it.
> >
> > The UI for `find-file-literally' depends on `resize-mini-windows' being
> > non-nil.  Not a good idea.  To see how bad it can be, set
> > `resize-mini-windows' to nil, then visit a file, then try to visit it
> > using `M-x find-file-literally'.  You see only this line in the echo
> > area, which is not even a question:
> >
> >   The file foo.el is already visited normally.
> 
> We should perhaps consider obsoleting `resize-mini-windows'.  Emacs has
> many prompts now that don't make sense in a single line.

Those prompts should bind resize-mini-windows non-nil.

I don't understand the rest of the bug report, but the specific part
about find-file-literally will be definitely fixed by that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18340; Package emacs. (Wed, 04 May 2016 15:06:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 18340 <at> debbugs.gnu.org
Subject: RE: bug#18340: 24.4.50; Bad UI for `find-file-literally'
Date: Wed, 4 May 2016 08:05:04 -0700 (PDT)
> > We should perhaps consider obsoleting `resize-mini-windows'.  Emacs has
> > many prompts now that don't make sense in a single line.
> 
> Those prompts should bind resize-mini-windows non-nil.
> 
> I don't understand the rest of the bug report, 

What don't you understand about it?  (To quote a famous person.)

> but the specific part about find-file-literally will be
> definitely fixed by that.

I don't think so.  `resize-mini-windows' will do nothing for a
standalone minibuffer.  Again: "Don't show a multi-line message
for prompting `y-or-n-p' in the echo area and expect users to see it."

It is NOT a good idea to depend on `resize-mini-windows' showing
all of a multi-line message.

If the code _really_ needs to interact with the user using a
multi-line message, then `y-or-n-p' is the _wrong_ way to ask
the question.  If users need to read multiple lines then hitting
a single key to choose is probably not appropriate.

This should be rethought, IMO.  If the prompt cannot reasonably
be a single line then some other interaction should be used.
Do not just look for a way to force minibuffer-window resizing.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18340; Package emacs. (Wed, 04 May 2016 15:25:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 18340 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#18340: 24.4.50; Bad UI for `find-file-literally'
Date: Wed, 04 May 2016 18:23:51 +0300
> Date: Wed, 4 May 2016 08:05:04 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 18340 <at> debbugs.gnu.org
> 
> > > We should perhaps consider obsoleting `resize-mini-windows'.  Emacs has
> > > many prompts now that don't make sense in a single line.
> > 
> > Those prompts should bind resize-mini-windows non-nil.
> > 
> > I don't understand the rest of the bug report, 
> 
> What don't you understand about it?

I understood nothing beyond the example with resize-mini-windows and a
normal frame which has a minibuffer.

> > but the specific part about find-file-literally will be
> > definitely fixed by that.
> 
> I don't think so.  `resize-mini-windows' will do nothing for a
> standalone minibuffer.

Please show a recipe, as I didn't understand the problem.  Repeating
what you said the first time doesn't help.

> Again: "Don't show a multi-line message for prompting `y-or-n-p' in
> the echo area and expect users to see it."

Please let us judge what would be the best solution for problems.

> It is NOT a good idea to depend on `resize-mini-windows' showing
> all of a multi-line message.

You contradict yourself: above you said that the value of
resize-mini-windows doesn't necessarily help.

> If the code _really_ needs to interact with the user using a
> multi-line message, then `y-or-n-p' is the _wrong_ way to ask
> the question.  If users need to read multiple lines then hitting
> a single key to choose is probably not appropriate.

I don't think I agree.  I see no reason to treat single-line and
multi-line prompts differently, not without a good reason.  The fact
that there's more than one line doesn't cut it.

> This should be rethought, IMO.  If the prompt cannot reasonably
> be a single line then some other interaction should be used.
> Do not just look for a way to force minibuffer-window resizing.

Once again, please don't dictate solutions for problems.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18340; Package emacs. (Sun, 10 Oct 2021 22:32:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 18340 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#18340: 24.4.50; Bad UI for `find-file-literally'
Date: Sun, 10 Oct 2021 15:30:56 -0700
tags 18340 + moreinfo
thanks

Drew Adams <drew.adams <at> oracle.com> writes:

> Summary: Don't show a multi-line message for prompting `y-or-n-p'
> in the echo area and expect users to see it.
>
> The UI for `find-file-literally' depends on `resize-mini-windows' being
> non-nil.  Not a good idea.  To see how bad it can be, set
> `resize-mini-windows' to nil, then visit a file, then try to visit it
> using `M-x find-file-literally'.  You see only this line in the echo
> area, which is not even a question:
>
>   The file foo.el is already visited normally.
>
> Huh?  A user who sees that has no clue as to what is going on.

Eli Zaretskii <eliz <at> gnu.org> writes:

> Please show a recipe, as I didn't understand the problem.

I also don't understand the problem.  I tried doing the above steps with
(setq resize-mini-windows nil) and I don't see anything that is
different from when it is t.

Could we have a recipe to reproduce this issue?




Added tag(s) moreinfo. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 10 Oct 2021 22:32:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18340; Package emacs. (Mon, 11 Oct 2021 01:07:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: "18340 <at> debbugs.gnu.org" <18340 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: RE: [External] : Re: bug#18340: 24.4.50; Bad UI for
 `find-file-literally'
Date: Mon, 11 Oct 2021 01:06:09 +0000
It's hard for me to believe that this bug report
hasn't been understood.  Let me try one last time.

Emacs 27.2, emacs -Q

foo.el is an existing Elisp file (contents not important).
_______

(setq resize-mini-windows nil)

C-x C-f foo.el

M-x find-file-literally RET foo.el RET

  Do you want to revisit the file literally now? (y or n) y

  You can run the command ‘find-file-literally’ with M-x f-f-l RET

  The file foo.el is already visited normally.
_______

That's all you see.  It's not understandable (to
me).  However, if I go look in *Messages* I see
this additional text, which was not visible
because `resize-mini-windows' is nil:
________
 You have asked to visit it literally,
 meaning no coding system decoding, format conversion, or local variables.
 But Emacs can visit a file in only one way at a time.
________

If you still don't understand the problem, drop it.

But if you now understand the problem, and repro it,
then I'll ask you to reread the original bug report
and see if it doesn't make sense on its own.

I think it does, and I'd completely forgotten about
this bug report.  I just read it afresh myself now,
and I just did what it describes, and saw the
reported problem immediately.

Clearly I'm missing something about what's missing
in others trying to understand this.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18340; Package emacs. (Mon, 11 Oct 2021 06:47:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 18340 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#18340: 24.4.50; Bad UI for `find-file-literally'
Date: Mon, 11 Oct 2021 09:17:06 +0300
>> Summary: Don't show a multi-line message for prompting `y-or-n-p'
>> in the echo area and expect users to see it.
>...
>
> Could we have a recipe to reproduce this issue?

This is already fixed in Emacs 28 where this prompt is not multi-line
anymore (commit 0a8cd0116204354e95fbb4ebde64c58123502aa2 from bug#5423).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18340; Package emacs. (Mon, 11 Oct 2021 11:42:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Juri Linkov <juri <at> linkov.net>
Cc: 18340 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#18340: 24.4.50; Bad UI for `find-file-literally'
Date: Mon, 11 Oct 2021 04:41:22 -0700
unarchive 5423
forcemerge 5423 18340
thanks

Juri Linkov <juri <at> linkov.net> writes:

>>> Summary: Don't show a multi-line message for prompting `y-or-n-p'
>>> in the echo area and expect users to see it.
>>...
>>
>> Could we have a recipe to reproduce this issue?
>
> This is already fixed in Emacs 28 where this prompt is not multi-line
> anymore (commit 0a8cd0116204354e95fbb4ebde64c58123502aa2 from bug#5423).

Right.  I'm merging the bug reports, so that this one is also closed.




Forcibly Merged 5423 18340. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 11 Oct 2021 11:42:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18340; Package emacs. (Mon, 11 Oct 2021 11:58:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 18340 <at> debbugs.gnu.org, stefan <at> marxist.se
Subject: Re: [External] : Re: bug#18340: 24.4.50; Bad UI for
 `find-file-literally'
Date: Mon, 11 Oct 2021 14:57:25 +0300
> From: Drew Adams <drew.adams <at> oracle.com>
> CC: "18340 <at> debbugs.gnu.org" <18340 <at> debbugs.gnu.org>,
>         Eli Zaretskii
> 	<eliz <at> gnu.org>
> Date: Mon, 11 Oct 2021 01:06:09 +0000
> 
> (setq resize-mini-windows nil)
> 
> C-x C-f foo.el
> 
> M-x find-file-literally RET foo.el RET
> 
>   Do you want to revisit the file literally now? (y or n) y
> 
>   You can run the command ‘find-file-literally’ with M-x f-f-l RET
> 
>   The file foo.el is already visited normally.
> _______
> 
> That's all you see.  It's not understandable (to
> me).  However, if I go look in *Messages* I see
> this additional text, which was not visible
> because `resize-mini-windows' is nil:

This problem doesn't exist in Emacs 28, so the issue was resolved.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 08 Nov 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 162 days ago.

Previous Next


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