From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Trey Jackson Newsgroups: gmane.emacs.devel Subject: Re: minibuffer-scroll-window question Date: Tue, 26 May 2009 10:25:29 -0700 Message-ID: <198e25e10905261025h65ea6a2avc79cbfe7d04b7521@mail.gmail.com> References: <198e25e10905221939tc758f1bu5b585846e9dd834b@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e64755aa610bfe046ad40315 X-Trace: ger.gmane.org 1243358762 2498 80.91.229.12 (26 May 2009 17:26:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 May 2009 17:26:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 26 19:25:59 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M90PU-0002v1-VZ for ged-emacs-devel@m.gmane.org; Tue, 26 May 2009 19:25:57 +0200 Original-Received: from localhost ([127.0.0.1]:34761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M90PU-00084A-DO for ged-emacs-devel@m.gmane.org; Tue, 26 May 2009 13:25:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M90P6-0007wJ-5s for emacs-devel@gnu.org; Tue, 26 May 2009 13:25:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M90P5-0007vi-3X for emacs-devel@gnu.org; Tue, 26 May 2009 13:25:31 -0400 Original-Received: from [199.232.76.173] (port=47128 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M90P4-0007vd-VN for emacs-devel@gnu.org; Tue, 26 May 2009 13:25:31 -0400 Original-Received: from qw-out-1920.google.com ([74.125.92.145]:46507) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M90P4-0007Ke-JO for emacs-devel@gnu.org; Tue, 26 May 2009 13:25:30 -0400 Original-Received: by qw-out-1920.google.com with SMTP id 4so2093867qwk.24 for ; Tue, 26 May 2009 10:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=i419AQKrkMwDaz8FgYViXSQ/L3duO6py8VbS5jAfrgg=; b=nZnIm77fsQ/3mlpEoUo9NftiRuA60rZwWcDut45L+zbksIga0m4yndTEmjWL01FfBE m6+1IOxONkBLnMw4Gbp9Q2dgZ27BxgGCSsoW17OTAsT2K3OxFppn+l3bWuFSkLwHd3mk EnJYczonaL+x8lP0s0/Tz91Nx1WUD/2/ijhCU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=prWX47zLnOiHLGlbMgA7w4sfbpzVzG9Uo2MCW9rD0MFNP/x4Ay9VCsGEJUHbEODotE lBOjXVyoioaFRCicYIxDurEDWwU/fvkLG3PLvWfSiE9dRZj5540IRgpWe5YEiqkW4b4Q iuIQizWgwXebnRjZBkovAvE933Ewa5phhTY5c= Original-Received: by 10.220.72.79 with SMTP id l15mr6841883vcj.4.1243358729144; Tue, 26 May 2009 10:25:29 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:111120 Archived-At: --0016e64755aa610bfe046ad40315 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks for the explanation. The alternative worked well. Any chance the doc string for minibuffer-scroll-window could be updated to reflect that it's for internal use only, or at least that it's for read-only access? thanks, TJ On Mon, May 25, 2009 at 7:58 AM, Stefan Monnier wrote: > > (defun my-minibuffer-setup-hook () > > "try to force the scroll window to be the bottom-left window in the > > current frame" > > (setq minibuffer-scroll-window (window-at 0 (- (frame-height) 2)))) > > (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook) > > > However, in minibuf.c, the defun 'minibuffer-complete sets the > > minibuf_scroll_window variable to nil. > > > So, my question is, how and when can this variable be meaningfully used > by > > an end user? Should my hook have worked (i.e. this behavior is a bug)? > > It was not intended to be set by the end user, it's supposed to be > *read* instead (so you can't decide where to put the "scroll window" > but you can figure out which window it is). > > To tell you the truth, I think it's largely unsatisfactory, not only > because you can't do what you want, but also because that variable > can point to different buffers in different cases. > > In your case, which buffer do you expect to see in that scroll window? > The *Completions* buffer? In that case, maybe you'll be better off > using special-display-buffer-names to control how/where *Completions* > get displayed. > > > Stefan > -- Trey Jackson bigfaceworm@gmail.com "Like any truly useful program, `hello' contains a built-in mail reader." -- GNU's Bulletin, July 1996 --0016e64755aa610bfe046ad40315 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for the explanation.=A0 The alternative worked well.

Any chan= ce the doc string for minibuffer-scroll-window could be updated to reflect = that it's for
internal use only, or at least that it's for read-= only access?


thanks,

TJ

On Mon, May 25,= 2009 at 7:58 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
<= blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 2= 04, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> (defun my-minibuffer-setup-hook ()
> =A0 "try to force the scroll window to be the bottom-left window = in the
> current frame"
> =A0 (setq minibuffer-scroll-window (window-at 0 (- (frame-height) 2)))= )
> (add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook)
> However, in minibuf.c, the defun 'minibuffer-complete sets the
> minibuf_scroll_window variable to nil.

> So, my question is, how and when can this variable be meaningfully use= d by
> an end user? =A0Should my hook have worked (i.e. this behavior is a bu= g)?

It was not intended to be set by the end user, it's supposed to b= e
*read* instead (so you can't decide where to put the "scroll windo= w"
but you can figure out which window it is).

To tell you the truth, I think it's largely unsatisfactory, not only because you can't do what you want, but also because that variable
can point to different buffers in different cases.

In your case, which buffer do you expect to see in that scroll window?
The *Completions* buffer? =A0In that case, maybe you'll be better off using special-display-buffer-names to control how/where *Completions*
get displayed.


=A0 =A0 =A0 =A0Stefan



--
Trey Jackson
= bigfaceworm@gmail.com
"= ;Like any truly useful program, `hello' contains a built-in mail reader= ."
-- GNU's Bulletin, July 1996

--0016e64755aa610bfe046ad40315--