From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: switch-to-completions (was: Vertical completions) Date: Wed, 18 Nov 2009 11:52:38 +0200 Organization: JURTA Message-ID: <87hbssw5xd.fsf_-_@mail.jurta.org> References: <61C01A08-8FB6-4908-B9F1-B9F1CE3E3D92@gmail.com> <20091111212658.GD12012@headley> <87fx8kjosa.fsf_-_@mail.jurta.org> <7b501d5c0911120209x7c8f493fm68fadef6f1311206@mail.gmail.com> <87bpj16pkh.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258539593 18990 80.91.229.12 (18 Nov 2009 10:19:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Nov 2009 10:19:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 18 11:19:46 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 1NAhdZ-0004w2-Pd for ged-emacs-devel@m.gmane.org; Wed, 18 Nov 2009 11:19:46 +0100 Original-Received: from localhost ([127.0.0.1]:51874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAhdY-0006Kz-T6 for ged-emacs-devel@m.gmane.org; Wed, 18 Nov 2009 05:19:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAhbx-0005G2-Qg for emacs-devel@gnu.org; Wed, 18 Nov 2009 05:18:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAhbs-0005Cj-3H for emacs-devel@gnu.org; Wed, 18 Nov 2009 05:18:04 -0500 Original-Received: from [199.232.76.173] (port=37376 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAhbr-0005Cf-TO for emacs-devel@gnu.org; Wed, 18 Nov 2009 05:17:59 -0500 Original-Received: from smtp-out3.starman.ee ([85.253.0.5]:58014 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NAhbr-00013W-0s for emacs-devel@gnu.org; Wed, 18 Nov 2009 05:17:59 -0500 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.31.20.cable.starman.ee [82.131.31.20]) by mx1.starman.ee (Postfix) with ESMTP id 094F63F411B for ; Wed, 18 Nov 2009 12:17:52 +0200 (EET) In-Reply-To: <87bpj16pkh.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 17 Nov 2009 19:45:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:117164 Archived-At: After scrolling with the help of `minibuffer-complete' or `minibuffer-complete-backward' to the middle of a long list of completions, and typing `M-v' or (bound to `switch-to-completions') to select a completion item using keyboard, point jumps to the beginning of the *Completions* buffer, thus requiring to scroll to the middle of the list again. I suppose moving point to the first item is necessary only in the new *Completions* buffer: Index: lisp/simple.el =================================================================== RCS file: /sources/emacs/emacs/lisp/simple.el,v retrieving revision 1.1030 diff -c -r1.1030 simple.el *** lisp/simple.el 15 Nov 2009 15:32:18 -0000 1.1030 --- lisp/simple.el 18 Nov 2009 09:50:52 -0000 *************** *** 6032,6045 **** "Select the completion list window." (interactive) (let ((window (or (get-buffer-window "*Completions*" 0) ! ;; Make sure we have a completions window. (progn (minibuffer-completion-help) (get-buffer-window "*Completions*" 0))))) (when window (select-window window) ! (goto-char (point-min)) ! (search-forward "\n\n" nil t) ! (forward-line 1)))) ;;; Support keyboard commands to turn on various modifiers. --- 6057,6071 ---- "Select the completion list window." (interactive) (let ((window (or (get-buffer-window "*Completions*" 0) ! ;; Make sure we have a completions window. (progn (minibuffer-completion-help) (get-buffer-window "*Completions*" 0))))) (when window (select-window window) ! ;; In the new buffer, go to the first completion. ! (when (bobp) ! (search-forward "\n\n" nil t) ! (forward-line 1))))) ;;; Support keyboard commands to turn on various modifiers. -- Juri Linkov http://www.jurta.org/emacs/