From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.help Subject: Re: Completion window location Date: Thu, 01 Nov 2012 18:59:08 +0100 Message-ID: <5092B86C.6060905@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1351792762 30509 80.91.229.3 (1 Nov 2012 17:59:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Nov 2012 17:59:22 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: jasonsewall@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 01 18:59:31 2012 Return-path: Envelope-to: geh-help-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 1TTz3C-0007QN-TG for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Nov 2012 18:59:31 +0100 Original-Received: from localhost ([::1]:57499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTz34-0003GT-H8 for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Nov 2012 13:59:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTz2y-0003FO-QH for help-gnu-emacs@gnu.org; Thu, 01 Nov 2012 13:59:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTz2x-0003VS-MA for help-gnu-emacs@gnu.org; Thu, 01 Nov 2012 13:59:16 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:40602) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TTz2x-0003RP-CK for help-gnu-emacs@gnu.org; Thu, 01 Nov 2012 13:59:15 -0400 Original-Received: (qmail invoked by alias); 01 Nov 2012 17:59:13 -0000 Original-Received: from 62-47-53-132.adsl.highway.telekom.at (EHLO [62.47.53.132]) [62.47.53.132] by mail.gmx.net (mp041) with SMTP; 01 Nov 2012 18:59:13 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19g/RExxItg7fA5Rqhpk2t/+2hVvBvGN4nElvP66K 5lGN6lWDPuVBdv Original-References: CADqa0D6hE-8T32y2FgCqy8A5u67ridwEo2j5GgiYMbk2=Ld9cg@mail.gmail.com X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 213.165.64.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87514 Archived-At: > When emacs is set to fullscreen-mode (or even when it is just a little > wider than square) or if I have the frame split horizontally, the > completions buffer takes over one of those frames temporarily. It is > still useful, but my eyes have to crawl all the way up to the top of > the screen to read the first completion candidates, then back down to > the minibuffer, ad nauseum. > > I usually use emacs with a fullscreen frame, split horizontally into > two big windows. How can Emacs be persuaded to use a short, temporary > frame just above the minibuffer to show candidates? I rarely need > space to see 50-100 completion candidates at once, and if I did, I > would use some search refining or some such. I have some familiarity > with with Emacs lisp, but I haven't not much hacking and I'm not very > familiar with Emacs internals. I'm currently trying to write a function to do that. The following is a first stab. (defun display-buffer-at-bottom-left (buffer alist) "Try displaying BUFFER in a window at the bottom-left corner of the selected frame." (or (display-buffer-reuse-window buffer alist) (let ((bottom-window (let ((bottom-edge (nth 3 (window-edges (frame-root-window))))) (catch 'window (walk-window-tree (lambda (window) (when (= (nth 3 (window-edges window)) bottom-edge) (throw 'window window))))))) window) (or (and (not (frame-parameter nil 'unsplittable)) (setq window (window--try-to-split-window bottom-window alist)) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated)) (and (not (frame-parameter nil 'unsplittable)) (setq window (condition-case nil (split-window (frame-root-window)) (error nil))) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated)) (and (setq window bottom-window) (not (window-dedicated-p window)) (window--display-buffer buffer window 'reuse alist display-buffer-mark-dedicated)))))) You have to customize `display-buffer-alist' to add a rule that achieves (customize-set-variable 'display-buffer-alist '(("*Completions*" display-buffer-at-bottom-left))) for this to take effect. martin