From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: fix for bug#34330 breaks makefile target complete in `compile' prompt Date: Sun, 15 Sep 2019 13:07:29 -0700 Message-ID: <86tv9dnx1a.fsf@stephe-leake.org> References: <8636gxq5wr.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="102067"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 15 22:07:44 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i9aoB-000QQn-PX for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2019 22:07:44 +0200 Original-Received: from localhost ([::1]:56826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9ao9-0002Nh-0T for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2019 16:07:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43071) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9ao2-0002N4-Qi for emacs-devel@gnu.org; Sun, 15 Sep 2019 16:07:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9ao1-0007s9-7l for emacs-devel@gnu.org; Sun, 15 Sep 2019 16:07:34 -0400 Original-Received: from gateway24.websitewelcome.com ([192.185.50.45]:40840) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i9ao0-0007ro-RQ for emacs-devel@gnu.org; Sun, 15 Sep 2019 16:07:33 -0400 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 9C7C6CFA3 for ; Sun, 15 Sep 2019 15:07:31 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id 9anzixHqS2PzO9anziq1Pt; Sun, 15 Sep 2019 15:07:31 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sLsgKuap0CYlA7BPd2ODwdC1vcItLxNMkElBZDIjzd8=; b=hz9QjPW/LIqVR0DVaEjVvWzeI X1jewVh9xKNEvI2BJICl7jHboL9BxgJdUijpiPeSC2SebJiqRR/h1BkWNwqlzJXz+ZUEXwEiCl6gy W/Y+S6+r67MUBJbqKt5sDs0NDJTAKMq1ppMUMbK3Ulp5pUrXnEzPbV8cBJ5fAEbymVbOA9MctYiT3 ByNiF1YjGngbmx0GfkqUEGJv7FH8FMlB5fgaE/qlSDk6WeSfwq26975jz7eFIiJ7BFe57hpx37k9Q UMOnQpJ+RNP5ryWfFDZgdQm902AptSwCauPCKio6dfWnpUJQ4ZqrOBHwdyylnyt1zDijGiqG3VlKs 1N6+Jr+bw==; Original-Received: from [76.77.182.20] (port=50782 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1i9anz-001FiR-14 for emacs-devel@gnu.org; Sun, 15 Sep 2019 14:07:31 -0600 In-Reply-To: (Stefan Monnier's message of "Sun, 15 Sep 2019 08:50:08 -0400") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1i9anz-001FiR-14 X-Source-Sender: (Takver4) [76.77.182.20]:50782 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 1 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.185.50.45 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:240054 Archived-At: Stefan Monnier writes: >> It's not clear from this if "applicable" means "there are actual >> completions", but it appears that it should. > > No. The idea rather is to decide on the completion-table to use only > based on *where* we are. You can't easily know whether there are > any completions (because it depends on completion-styles). Hmm. Why don't we know the style? Won't completion-try-completion, using the candidate completion table, return the right result? > Maybe we should remove comint-filename-completion from the list of > completion functions and rely on pcomplete-default-completion-function > for that instead? No, that's what bug 34330 is about; pcomplete does not handle that case properly; it either returns no completions, or incorrect completions. I guess that could be fixed, either by telling pcomplete to always return nil for a file completion, or by incorporating the logic from comint-complete (although I think that means adding pcomplete/ls etc, so it knows it's looking for a file). Setting pcomplete-default-completion-function to 'ignore might work (ie, "don't guess if you are not sure"). That could be done in pcomplete-completions-at-point, so it doesn't affect the normal operation of pcomplete. > Or maybe shell-dynamic-complete-functions should not do like > completion-at-point-functions and should run all its functions (without > stopping at the first non-nil answer) and then combine them using > completion-table-in-turn? That would work in more cases, but it's a big change. And all of the functions on shell-dynamic-complete-functions can also be on completion-at-point-functions, so that should change as well. -- -- Stephe