From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.devel Subject: Re: eshell/pcomplete suggestion: indicator for completion cycling Date: Thu, 08 Jan 2004 07:52:58 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87wu837wz9.fsf@emptyhost.emptydomain.de> References: <87ekudpid6.fsf@emptyhost.emptydomain.de> <87isjoxj2d.fsf@emptyhost.emptydomain.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073544895 29643 80.91.224.253 (8 Jan 2004 06:54:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2004 06:54:55 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jan 08 07:54:51 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeU4B-0008WV-00 for ; Thu, 08 Jan 2004 07:54:51 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeU4B-0005FI-00 for ; Thu, 08 Jan 2004 07:54:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AeV19-0004E1-0h for emacs-devel@quimby.gnus.org; Thu, 08 Jan 2004 02:55:47 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AeV0T-0003un-G7 for emacs-devel@gnu.org; Thu, 08 Jan 2004 02:55:05 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AeUzv-00039f-I3 for emacs-devel@gnu.org; Thu, 08 Jan 2004 02:55:02 -0500 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AeUzv-00039Z-2u for emacs-devel@gnu.org; Thu, 08 Jan 2004 02:54:31 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AeU2P-0000Lq-00 for ; Thu, 08 Jan 2004 07:53:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeU2N-0000Li-00 for ; Thu, 08 Jan 2004 07:52:59 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AeU2N-0007fY-00 for ; Thu, 08 Jan 2004 07:52:59 +0100 Original-Lines: 62 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Gnus/5.1004 (Gnus v5.10.4) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:n+/iCNCMvv+UJhivlyXTHLs1u90= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19090 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19090 Richard Stallman writes: > Cycling completions means that the first TAB, instead of completing f > to foo, inserts the first possible completion, foo1. Hitting TAB > again replaces foo1 with foo2, and again replaces that with foo3, and > again goes back to foo1. > > I am not sure that should be the default, since it might confuse > people who were not expecting it. Yes. I just wanted to change its behavior when it is on. Whether or not it should be on by default is orthogonal. I can think of a way to make it behave more similar to non-cycling completion, but I'm not sure if this is acceptable: With delete-selection-mode (or a similar mode) turned on, one could insert the common prefix normally, and the suffix that's unique to the first completion could be selected. Then users just typing more characters will delete the part that they don't expect, and those people who want to keep the unique suffix can just disable the selection. (I used the term "selection" because it is part of the name delete-selection-mode; maybe I should have said region or active region instead? But I think you understand what I mean.) The "inserted part is selected, and typing a key removes the selection" behavior is common to other programs/systems, too, so many people will be familiar with it. > It certainly should not be the default in eshell only, since that is > inconsistent. However, having it as an option everywhere in Emacs > would be good. I agree. This has (partially) been discussed some moons ago: shell-mode was changed to use the pcomplete package instead of comint-dynamic-complete. But then people complained about the change in behavior, so shell-mode was made to use comint-dynamic-complete again. I *think* that it would have been sufficient to turn off cycling in pcomplete to make the complainers happy, but I never really got the chance to find out. Maybe now is the time to discuss this again? Above and beyond what has been discussed up to now, I think that unifying completion across Emacs would be good. There are a number of packages that influence completion in one way or another. In addition to pcomplete (which provides cycling completion, but my understanding is that its focus is on selecting the right set of completions -- restrict completion to *.dvi files after the command xdvi, for example), there is also iswitchb and ido, which provide completion for C-x b and/or C-x C-f. And then there is icomplete which I think affects all minibuffer completions. > And maybe having it as the default everywhere in Emacs would be > good, I am just not sure. Same here. Kai