From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: partial-completion-mode and mouse selection Date: Thu, 22 Mar 2007 17:56:33 -0400 Message-ID: <3r6rh9c32.fsf@fencepost.gnu.org> References: <20455115.241481174582123314.JavaMail.www@wwinf4103> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174600731 5990 80.91.229.12 (22 Mar 2007 21:58:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Mar 2007 21:58:51 +0000 (UTC) Cc: "Emacs Dev \[emacs-devel\]" To: alinsoar@voila.fr Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 22 22:58:43 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 1HUVIx-0003H4-9o for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2007 22:58:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUVKm-0003uy-Gm for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2007 17:00:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUVKi-0003sh-V2 for emacs-devel@gnu.org; Thu, 22 Mar 2007 18:00:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUVKh-0003rg-FV for emacs-devel@gnu.org; Thu, 22 Mar 2007 18:00:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUVKh-0003r4-8L for emacs-devel@gnu.org; Thu, 22 Mar 2007 17:00:31 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUVIr-0002K3-6K for emacs-devel@gnu.org; Thu, 22 Mar 2007 17:58:37 -0400 Original-Received: from [127.0.0.1] (helo=localhost) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUVGr-0006Lo-K6; Thu, 22 Mar 2007 17:56:33 -0400 X-Spook: spy Craig Livingstone red noise MP5K-SD hackers satellite X-Ran: tU0P<3a*gpfEAss)XjkS#WJ}9l\N!J(^2Hd&`J@<9W;rH1q09#Rcf>W^ce=;w5;n{QybDf X-Hue: cyan X-Attribution: GM In-Reply-To: <20455115.241481174582123314.JavaMail.www@wwinf4103> (A. Soare's message of "Thu, 22 Mar 2007 17:48:43 +0100 (CET)") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: 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:68335 Archived-At: A Soare wrote: > 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.