From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6253: Please resize mini-buffer for queries even if Date: Wed, 11 Apr 2012 08:56:40 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1334149040 5674 80.91.229.3 (11 Apr 2012 12:57:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2012 12:57:20 +0000 (UTC) Cc: 6253@debbugs.gnu.org To: Lars Magne Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 11 14:57:17 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SHx6j-000070-Bp for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Apr 2012 14:57:09 +0200 Original-Received: from localhost ([::1]:57092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHx6i-0000iY-79 for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Apr 2012 08:57:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHx6b-0000iI-42 for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 08:57:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHx6W-0004WD-79 for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 08:57:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHx6W-0004W8-3j for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 08:56:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SHx7Z-0001v2-VC for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 08:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Apr 2012 12:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6253 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 6253-submit@debbugs.gnu.org id=B6253.13341490737362 (code B ref 6253); Wed, 11 Apr 2012 12:58:01 +0000 Original-Received: (at 6253) by debbugs.gnu.org; 11 Apr 2012 12:57:53 +0000 Original-Received: from localhost ([127.0.0.1]:50724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHx7Q-0001ug-Ol for submit@debbugs.gnu.org; Wed, 11 Apr 2012 08:57:53 -0400 Original-Received: from ironport-out.teksavvy.com ([206.248.143.162]:14970) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHx7N-0001uX-NW for 6253@debbugs.gnu.org; Wed, 11 Apr 2012 08:57:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjEKACxOgk9FxL8q/2dsb2JhbABDtheCDAOBDIEIggkBAQQBViMFCws0EhQYDSSIHAW2MothhHkEpEWBXYMD X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="173302542" Original-Received: from 69-196-191-42.dsl.teksavvy.com (HELO pastel.home) ([69.196.191.42]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Apr 2012 08:56:41 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 2744458D2B; Wed, 11 Apr 2012 08:56:41 -0400 (EDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Wed, 11 Apr 2012 13:13:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:58797 Archived-At: > 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