GNU bug report logs - #6253
Please resize mini-buffer for queries even if resize-mini-windows is nil

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Sun, 23 May 2010 11:48:02 UTC

Severity: wishlist

Tags: patch

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 6253 in the body.
You can then email your comments to 6253 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6253; Package emacs. (Sun, 23 May 2010 11:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 23 May 2010 11:48:02 GMT) Full text and rfc822 format available.

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

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: Please resize mini-buffer for queries even if resize-mini-windows is 
	nil
Date: Sun, 23 May 2010 13:46:37 +0200
Otherwise you just see the last line of a multiple line query prompt.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6253; Package emacs. (Sun, 23 May 2010 13:44:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6253 <at> debbugs.gnu.org
Subject: Re: bug#6253: Please resize mini-buffer for queries even if
	resize-mini-windows is nil
Date: Sun, 23 May 2010 09:43:03 -0400
> Otherwise you just see the last line of a multiple line query prompt.

Hmm... IIUC when the user sets resize-mini-windows to nil, that's
because she doesn't want this resizing.
And multiline prompts are a problem (in cases where resizing is simply
impossible, for example) in any case.  So I think the right thing to do
is to report the "multiline prompts" as bugs.


        Stefan





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6253; Package emacs. (Sun, 23 May 2010 13:51:03 GMT) Full text and rfc822 format available.

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

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 6253 <at> debbugs.gnu.org
Subject: Re: bug#6253: Please resize mini-buffer for queries even if 
	resize-mini-windows is nil
Date: Sun, 23 May 2010 15:49:52 +0200
On Sun, May 23, 2010 at 3:43 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>> Otherwise you just see the last line of a multiple line query prompt.
>
> Hmm... IIUC when the user sets resize-mini-windows to nil, that's
> because she doesn't want this resizing.
> And multiline prompts are a problem (in cases where resizing is simply
> impossible, for example) in any case.  So I think the right thing to do
> is to report the "multiline prompts" as bugs.


I think what the user normally want is to avoid messages that resizes
the miniwindow. I guess most users want to see the whole multiline
prompt.

Why not distinguish between those cases? Maybe a new value for
resize-mini-windows.

With regards to multiline prompts please remember that a "short"
prompt may wrap because it includes something that is long. That could
for example be the case when the prompt includes a file path. So
beeing able to always resize the mini window is useful whatever we do.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6253; Package emacs. (Sun, 23 May 2010 14:12:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6253 <at> debbugs.gnu.org
Subject: Re: bug#6253: Please resize mini-buffer for queries even if
Date: Sun, 23 May 2010 10:10:48 -0400
> Why not distinguish between those cases? Maybe a new value for
> resize-mini-windows.

Ah, you mean a setting that allows resizing minibuffers but not the
echo area.  Yes, that seems reasonable (tho it may bump into some
surprising cases where the user may think he's interacting with
a minibuffer whereas she's really looking at the echo area).

I'd first want to see a patch for it,


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6253; Package emacs. (Sun, 23 May 2010 22:26:01 GMT) Full text and rfc822 format available.

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

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 6253 <at> debbugs.gnu.org
Subject: Re: bug#6253: Please resize mini-buffer for queries even if
Date: Mon, 24 May 2010 00:24:39 +0200
[Message part 1 (text/plain, inline)]
On Sun, May 23, 2010 at 4:10 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>> Why not distinguish between those cases? Maybe a new value for
>> resize-mini-windows.
>
> Ah, you mean a setting that allows resizing minibuffers but not the
> echo area.  Yes, that seems reasonable (tho it may bump into some
> surprising cases where the user may think he's interacting with
> a minibuffer whereas she's really looking at the echo area).
>
> I'd first want to see a patch for it,


Thanks. I looked for read_filtered_event too in the sources.

I have attached a patch.
[resize-mini-windows-1.diff (text/x-patch, attachment)]

Added tag(s) patch. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 21 Sep 2011 20:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6253; Package emacs. (Wed, 11 Apr 2012 11:16:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6253 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#6253: Please resize mini-buffer for queries even if
Date: Wed, 11 Apr 2012 13:13:55 +0200
Lennart Borgman <lennart.borgman <at> gmail.com> writes:

>> Ah, you mean a setting that allows resizing minibuffers but not the
>> echo area.  Yes, that seems reasonable (tho it may bump into some
>> surprising cases where the user may think he's interacting with
>> a minibuffer whereas she's really looking at the echo area).

Yeah, sounds like a good idea.

> I have attached a patch.

I've read the patch, and it looks good to me.  Do we want to discuss
this any further, or should I just apply the patch?

We also need a patch for the doc string and the manual, though.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6253; Package emacs. (Wed, 11 Apr 2012 12:58:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 6253 <at> debbugs.gnu.org, Lennart Borgman <lennart.borgman <at> gmail.com>
Subject: Re: bug#6253: Please resize mini-buffer for queries even if
Date: Wed, 11 Apr 2012 08:56:40 -0400
> I've read the patch, and it looks good to me.  Do we want to discuss
> this any further, or should I just apply the patch?

The patch I have (see below) doesn't look applicable as-is.
See comments below.

> --- trunk/src/fns.c	2010-04-25 22:16:58 +0000
> +++ patched/src/fns.c	2010-05-23 22:13:34 +0000
> @@ -2577,6 +2577,9 @@
>    Lisp_Object args[2];
>    struct gcpro gcpro1, gcpro2;
>    int count = SPECPDL_INDEX ();
> +  Lisp_Object old_Vresize_mini_windows = Vresize_mini_windows;
> +
> +  specbind (Qcursor_in_echo_area, Qt);
>  
>    specbind (Qcursor_in_echo_area, Qt);

I don't think we need to specbind the same variable twice ;-)

> @@ -2616,13 +2619,38 @@
 
>        {
>  	Lisp_Object pargs[3];
> -
> -	/* Colorize prompt according to `minibuffer-prompt' face.  */
> +        Lisp_Object face;
> +        Lisp_Object props;
> +        Lisp_Object use_face;
> +        Lisp_Object elt;
> +
> +        face = intern("face");
> +        props = Fsymbol_value (intern ("minibuffer-prompt-properties"));
> +        use_face = Qnil;
> +
> +        /* Colorize prompt according to `minibuffer-prompt-properties'.  */
> +        use_face = intern("default");
> +        while (1)
> +          {
> +            if (!CONSP (props) || EQ (XCAR (props), face))
> +              break;
> +
> +            props = XCDR (props);
> +          }
> +        if (CONSP (props))
> +          {
> +            props = XCDR (props);
> +            if (CONSP (props))
> +              {
> +                use_face = XCAR (props);
> +              }
> +          }
>  	pargs[0] = build_string ("%s(y or n) ");
>  	pargs[1] = intern ("face");
> -	pargs[2] = intern ("minibuffer-prompt");
> +        pargs[2] = use_face;

This seems unrelated.  Maybe it's a good change, but it should be
submitted separately, and motivated.

> -  Fmake_frame_visible (mini_frame);
> +  Fmake_frame_visible (mini_frame, Qnil);

That also seems unrelated.

> +  Vresize_mini_windows = Qt;

The main problem with the patch is that this new behavior cannot
be controlled.

> +  Lisp_Object old_Vresize_mini_windows = Vresize_mini_windows;
> +  Vresize_mini_windows = Qt;
> 
>    if (! NILP (prompt))
>      message_with_string ("%s", prompt, 0);
> 
>    val = read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), seconds);
> 
> +  if (! NILP (prompt))
> +      message (0); /* Resize. */
> +  Vresize_mini_windows = old_Vresize_mini_windows;

This technique you've used at various places is unreliable.  You want to
use specbind+unbind instead.

> --- trunk/src/lisp.h	2010-05-15 21:19:05 +0000
> +++ patched/src/lisp.h	2010-05-23 15:47:47 +0000
> @@ -2625,6 +2625,7 @@
>  extern void safe_bcopy P_ ((const char *, char *, int));
> 
>  /* Defined in xdisp.c */
> +extern Lisp_Object Vresize_mini_windows;
>  extern Lisp_Object Qinhibit_point_motion_hooks;
>  extern Lisp_Object Qinhibit_redisplay, Qdisplay;
>  extern Lisp_Object Qinhibit_eval_during_redisplay;

This is not needed.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6253; Package emacs. (Thu, 27 Jun 2019 17:13:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 6253 <at> debbugs.gnu.org, Lennart Borgman <lennart.borgman <at> gmail.com>
Subject: Re: bug#6253: Please resize mini-buffer for queries even if
Date: Thu, 27 Jun 2019 19:12:07 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> I've read the patch, and it looks good to me.  Do we want to discuss
>> this any further, or should I just apply the patch?
>
> The patch I have (see below) doesn't look applicable as-is.
> See comments below.

That was nine years ago, so I doubt we're going to see much progress on
this.  I'm closing the bug report, but please reopen if we can proceed.

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




bug closed, send any further explanations to 6253 <at> debbugs.gnu.org and Lennart Borgman <lennart.borgman <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 27 Jun 2019 17:13:02 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. (Fri, 26 Jul 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 273 days ago.

Previous Next


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