From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#42411: Bug with M-x compile Date: Sat, 18 Jul 2020 09:01:48 +0000 Message-ID: Reply-To: Gregory Heytings Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30747"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.21 (NEB 202 2017-01-01) To: 42411@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 18 11:03:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwikP-0007ps-H0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Jul 2020 11:03:09 +0200 Original-Received: from localhost ([::1]:35194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwikO-0001pz-JI for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Jul 2020 05:03:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwikI-0001pr-6j for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2020 05:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jwikH-00041O-Sh for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2020 05:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jwikH-0000EM-OX for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2020 05:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jul 2020 09:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42411 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1595062934826 (code B ref -1); Sat, 18 Jul 2020 09:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Jul 2020 09:02:14 +0000 Original-Received: from localhost ([127.0.0.1]:58419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwijW-0000DG-FR for submit@debbugs.gnu.org; Sat, 18 Jul 2020 05:02:14 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwijR-0000D6-Nq for submit@debbugs.gnu.org; Sat, 18 Jul 2020 05:02:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwijR-0001mz-FM for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2020 05:02:09 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:65160) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwijP-0003wr-Fm for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2020 05:02:09 -0400 Original-Received: from sdf.org (IDENT:ghe@faeroes.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 06I91puA023348 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 18 Jul 2020 09:01:51 GMT Original-Received: (from ghe@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 06I91p0s015227; Sat, 18 Jul 2020 09:01:51 GMT Received-SPF: pass client-ip=205.166.94.24; envelope-from=ghe@sdf.org; helo=mx.sdf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/18 03:43:37 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:183167 Archived-At: Thanks for fixing (the second part of) bug#42383. The first part remains unfixed, however: There are too many completion candidates in the list of targets when completing M-x compile. For example, for the Makefile "foo:\n\techo\x20bar:\n" three candidates are displayed: "foo", "echo" and "bar". The regexp in pcmpl-gnu-make-targets is too large, and should be fixed as follows: --- pcmpl-gnu.el.orig 2020-06-29 17:39:26.000000000 +0000 +++ pcmpl-gnu.el 2020-07-15 22:43:14.368938346 +0000 @@ -118,7 +118,7 @@ Return the new list." (goto-char (point-min)) (while (re-search-forward - "^\\s-*\\([^\n#%.$][^:=\n]*\\)\\s-*:[^=]" nil t) + "^\\([^\t\n#%.$][^:=\n]*\\)\\s-*:[^=]" nil t) (setq targets (nconc (split-string (match-string-no-properties 1)) targets))) targets) I see no reason to allow one or more TABs or spaces at the beginning of targets, as does the "^\\s-*". If one really wants to allow spaces (but not TABs) at the beginning of a target label, the following regexp could also be used: "^ *\\([^\t\n#%.$][^:=\n]*\\)\\s-*:[^=]". The current regexp is an old one (since Emacs 21 at least), and is inconsistent with for example how bash computes completions (see _make_target_extract_script). If changing the regexp is not an option, please make it a configuration option. Gregory