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: fix for bug#34330 breaks makefile target complete in `compile' prompt Date: Sun, 15 Sep 2019 02:12:52 -0700 Message-ID: <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="178283"; 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 11:15:38 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 1i9Qd7-000kF6-Op for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2019 11:15:38 +0200 Original-Received: from localhost ([::1]:53474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9Qd6-0006hM-7I for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2019 05:15:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57664) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9Qc9-0006hA-FW for emacs-devel@gnu.org; Sun, 15 Sep 2019 05:14:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9Qc7-0005Eh-JM for emacs-devel@gnu.org; Sun, 15 Sep 2019 05:14:36 -0400 Original-Received: from gateway24.websitewelcome.com ([192.185.50.45]:25301) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i9Qc7-0005Dh-94 for emacs-devel@gnu.org; Sun, 15 Sep 2019 05:14:35 -0400 Original-Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 3B7E23A7A for ; Sun, 15 Sep 2019 04:12:54 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id 9QaTi5dzc2qH79QaUiyyUO; Sun, 15 Sep 2019 04:12:54 -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:Date: 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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uyRcv9Z4yd5kOfOkzdt8D1k8D1EuiAgBycg6bEzLVzg=; b=ZITnkCRKJ452d9we88d9kElHnw deqTxnPHsSi6DwuRe+lxg1DsqQVfEhjrFASQL8GcYO6IszLlF3FxC1DXLNjPVlBqor72g4JydMabA 1Z2ULV8Ybl2KkJs+eigl0LPWDwv/ag97VfiW3PiO/zU+ehM8FuMk/2oaUEsC9wCTD0bPcyDHdYiQy 2RrSDQ3cnss7hNtngGtNBo9UwMNFTn4Cp/QcYis48xbxqVL5mb8xBcxV7YhhcSyD1TsQ7uOqaZD0R esd1a7+QZ2WBw8TErImIQ/3Ij+xUIPbxGAfYnN6QxremJHrJsD6VK/QSpPvyM0/GyIr28+lHvmFzC NYNoiLPA==; Original-Received: from [76.77.182.20] (port=50426 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1i9QaT-003qFl-J4 for emacs-devel@gnu.org; Sun, 15 Sep 2019 03:12:53 -0600 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: 1i9QaT-003qFl-J4 X-Source-Sender: (Takver4) [76.77.182.20]:50426 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:240042 Archived-At: bug#34330 (now closed) was about completing file names with special chars in the shell. The fix was to move `pcomplete-completions-at-point' to last in `shell-dynamic-complete-functions'. However, that now breaks completing on makefile targets in the prompt for `compile'. The problem is that `comint-filename-completion' returns non-nil even when there are no filename completions for the word at point. One fix would be to make `comint--complete-file-name-data' return nil if `try-completion' returns nil. The real cause for bug#34330 is that pcomplete uses `pcomplete-default-completion-function' in this case (there is no pcomplete/ls), and it also returns a non-nil result even when there are no completions. The doc string for `completion-at-point-functions' says, in part: should return either nil, meaning it is not applicable at point, It's not clear from this if "applicable" means "there are actual completions", but it appears that it should. So should these functions be fixed to return nil when there are no completions? -- -- Stephe