From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs completion matches selection UI Date: Fri, 20 Dec 2013 09:32:11 -0500 Message-ID: References: <87fvqtg02v.fsf@flea.lifelogs.com> <8338moevm3.fsf@gnu.org> <8761rkaa5e.fsf@flea.lifelogs.com> <87txf0390n.fsf@flea.lifelogs.com> <87y53komex.fsf@flea.lifelogs.com> <87haa8moh6.fsf@flea.lifelogs.com> <874n67n450.fsf@flea.lifelogs.com> <87eh5bkxca.fsf@flea.lifelogs.com> <87d2kuzzqj.fsf@uwakimon.sk.tsukuba.ac.jp> <87a9fylusq.fsf@flea.lifelogs.com> <878uvizrwz.fsf@uwakimon.sk.tsukuba.ac.jp> <8761qmkyn1.fsf@flea.lifelogs.com> <87zjnyxdpb.fsf@uwakimon.sk.tsukuba.ac.jp> <87k3f2j7xv.fsf@flea.lifelogs.com> <2518D79A-B9E4-45DF-A403-8330145DFD17@gmail.com> <87eh58j0x3.fsf@flea.lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1387549947 27514 80.91.229.3 (20 Dec 2013 14:32:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Dec 2013 14:32:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 20 15:32:33 2013 Return-path: Envelope-to: ged-emacs-devel@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 1Vu17w-0003rz-Gq for ged-emacs-devel@m.gmane.org; Fri, 20 Dec 2013 15:32:32 +0100 Original-Received: from localhost ([::1]:49882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu17v-0001xc-Mf for ged-emacs-devel@m.gmane.org; Fri, 20 Dec 2013 09:32:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu17l-0001wc-FO for emacs-devel@gnu.org; Fri, 20 Dec 2013 09:32:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vu17e-0001nl-4S for emacs-devel@gnu.org; Fri, 20 Dec 2013 09:32:21 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:37294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu17d-0001ne-Vm for emacs-devel@gnu.org; Fri, 20 Dec 2013 09:32:14 -0500 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id rBKEWA3P022684; Fri, 20 Dec 2013 09:32:11 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 9FC40AE15C; Fri, 20 Dec 2013 09:32:11 -0500 (EST) In-Reply-To: <87eh58j0x3.fsf@flea.lifelogs.com> (Ted Zlatanov's message of "Thu, 19 Dec 2013 10:49:44 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4798=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4798> : inlines <343> : streams <1094033> : uri <1630229> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166661 Archived-At: >>> If theres another point to this debate, please forgive me, because >>> I have missed it. >> Personally, I'm trying to understand what it is that Ted is suggesting. > I've explained it so many times I'm starting to wonder if my English is > the problem. It's never really control of language, but each word can mean many different things, and we seem to have very different assumptions and contexts, hence the difficulty. The way I see it, the subject under discussion can be divided into various mostly orthogonal elements: - when does the completion code get invoked: - upon hitting TAB - after typing the first N chars of a completable element - when entering minibuffer - ... - what completion operations take place: - insert a few chars at point - bring up a list of candidates - ... - how to display the list of candidates: - in a separate buffer - at point, via clever overlay tricks - at point, via a special frame - at point, via a x-popup-menu - ... - what operations can be performed while the list of candidates is displayed: - keep on editing as if the list was not displayed - select among candidates with the mouse - select with up/down - ... - how/when to update the list of completions and to pop it down. - what Lisp function to call to display the list of elements. We currently don't really have something clear here. IIUC this is the API part you care about (the rest is mostly behavior rather than API). - ... Can you clarify which parts you care about? As said, many are (or should be) orthogonal. > Yup, absolutely. The autocomplete web browser widgets (e.g. the jQuery > UI one) have that on-the-fly narrowing. This specifically conflicts > with the way in-buffer completion works right now, It doesn't conflict at all. The current UI doesn't update *Completions* on-the-fly, but it very much could (and pretty easily too). > and the in-minibuffer completion kind of works like this if you turn > `icomplete-mode' on and hit TAB to see the candidates every time you > type a character. IMO this should be an API option. I don't see why it should appear in the API. It looks like a user preference instead. See below for a very crude approximation. Stefan ;; Verbose icomplete-mode (defun verbose--icomplete-do () (let ((beg (minibuffer-prompt-end)) (end (point-max)) (non-essential t)) (when (and (not (eq beg end)) buffer-undo-list) (while-no-input (minibuffer-completion-help beg end))))) (defun verbose-icomplete-setup () (when minibuffer-completion-table (add-hook 'post-command-hook #'verbose--icomplete-do nil 'local))) (define-minor-mode verbose-icomplete-mode ;; FIXME: find a better name "" :global t (if verbose-icomplete-mode (add-hook 'minibuffer-setup-hook 'verbose-icomplete-setup) (remove-hook 'minibuffer-setup-hook 'verbose-icomplete-setup)))