From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: A Soare Newsgroups: gmane.emacs.devel Subject: Re: partial-completion-mode and mouse selection Date: Fri, 23 Mar 2007 13:57:46 +0100 (CET) Message-ID: <12695166.45041174654666017.JavaMail.www@wwinf4205> Reply-To: alinsoar@voila.fr NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1174654685 31783 80.91.229.12 (23 Mar 2007 12:58:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2007 12:58:05 +0000 (UTC) Cc: "Emacs Dev \[emacs-devel\]" To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 23 13:57:59 2007 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 1HUjLB-00057a-O1 for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 13:57:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUjN5-0006a6-EY for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 07:59:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUjMz-0006Y0-4m for emacs-devel@gnu.org; Fri, 23 Mar 2007 08:59:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUjMy-0006XP-AU for emacs-devel@gnu.org; Fri, 23 Mar 2007 08:59:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUjMx-0006XB-SF for emacs-devel@gnu.org; Fri, 23 Mar 2007 07:59:48 -0500 Original-Received: from smtp3.voila.fr ([193.252.22.173]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUjL1-0000AE-Vt; Fri, 23 Mar 2007 08:57:48 -0400 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf4201.voila.fr (SMTP Server) with ESMTP id 1698C1C0014F; Fri, 23 Mar 2007 13:57:46 +0100 (CET) Original-Received: from wwinf4205 (wwinf4205 [10.232.2.32]) by mwinf4201.voila.fr (SMTP Server) with ESMTP id 087BB1C000A1; Fri, 23 Mar 2007 13:57:46 +0100 (CET) X-ME-UUID: 20070323125746348.087BB1C000A1@mwinf4201.voila.fr X-Originating-IP: [89.34.170.37] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~| X-WUM-REPLYTO: |~| X-detected-kernel: Linux 2.4-2.6 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:68386 Archived-At: > > 1. partial completion mode started. > > > > 2. M-: > > > > Eval: (n-f > > > > Select using left mouse button one choice. > > This bug report is still somewhat vague, but I see your point. > > Please test how the following patch affects partial completion in > general. > > > *** complete.el 21 Mar 2007 19:23:12 -0000 1.67 > --- complete.el 22 Mar 2007 21:53:28 -0000 > *************** > *** 743,755 **** > (and completion-auto-help > (eq last-command this-command)) > (eq mode 'help)) > (with-output-to-temp-buffer "*Completions*" > (display-completion-list (sort helpposs 'string-lessp)) > (with-current-buffer standard-output > ;; Record which part of the buffer we are completing > ;; so that choosing a completion from the list > ;; knows how much old text to replace. > ! (setq completion-base-size dirlength))) > (PC-temp-minibuffer-message " [Next char not unique]")) > nil))))) > > --- 743,758 ---- > (and completion-auto-help > (eq last-command this-command)) > (eq mode 'help)) > + (let ((width (minibuffer-prompt-width))) > (with-output-to-temp-buffer "*Completions*" > (display-completion-list (sort helpposs 'string-lessp)) > (with-current-buffer standard-output > ;; Record which part of the buffer we are completing > ;; so that choosing a completion from the list > ;; knows how much old text to replace. > ! (setq completion-base-size (if dirname > ! dirlength > ! (- beg 1 width)))))) > (PC-temp-minibuffer-message " [Next char not unique]")) > nil))))) > > *************** > *** 799,804 **** > --- 802,808 ---- > (setq quit-flag nil > unread-command-events '(7)))))))) > > + (defvar PC-lisp-complete-end nil) > > (defun PC-lisp-complete-symbol () > "Perform completion on Lisp symbol preceding point. > *************** > *** 825,831 **** > (or (boundp sym) (fboundp sym) > (symbol-plist sym)))))) > (PC-not-minibuffer t)) > ! (PC-do-completion nil beg end))) > > (defun PC-complete-as-file-name () > "Perform completion on file names preceding point. > --- 829,838 ---- > (or (boundp sym) (fboundp sym) > (symbol-plist sym)))))) > (PC-not-minibuffer t)) > ! (if (equal last-command 'PC-lisp-complete-symbol) > ! (PC-do-completion nil beg PC-lisp-complete-end) > ! (setq PC-lisp-complete-end (point-marker)) > ! (PC-do-completion nil beg end)))) > > (defun PC-complete-as-file-name () > "Perform completion on file names preceding point. > > > I have just installed to me and checked this patch on a few examples, and it works well for them. So it seems to be good for the bug reported. Alin Soare.