From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#42411: Bug with M-x compile Date: Fri, 31 Jul 2020 21:42:01 +0300 Message-ID: <838sezedc6.fsf@gnu.org> References: <83tuxwcb0h.fsf@gnu.org> <83r1sybctq.fsf@gnu.org> <7a41931db76f055f1e904c964fd5b12eb2ee27b8.camel@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37927"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42411@debbugs.gnu.org To: psmith@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 31 20:43:11 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 1k1Zzr-0009me-J1 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Jul 2020 20:43:11 +0200 Original-Received: from localhost ([::1]:38808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1Zzq-0008Dc-Et for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Jul 2020 14:43:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1Zzi-0008DE-C1 for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2020 14:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55307) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1Zzi-00084u-36 for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2020 14:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k1Zzh-0003Vo-VT for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2020 14:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jul 2020 18:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42411 X-GNU-PR-Package: emacs Original-Received: via spool by 42411-submit@debbugs.gnu.org id=B42411.159622094213447 (code B ref 42411); Fri, 31 Jul 2020 18:43:01 +0000 Original-Received: (at 42411) by debbugs.gnu.org; 31 Jul 2020 18:42:22 +0000 Original-Received: from localhost ([127.0.0.1]:38620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1Zz3-0003Uo-Mv for submit@debbugs.gnu.org; Fri, 31 Jul 2020 14:42:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1Zz2-0003Ud-6n for 42411@debbugs.gnu.org; Fri, 31 Jul 2020 14:42:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47901) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1Zyw-00083P-Uq; Fri, 31 Jul 2020 14:42:14 -0400 Original-Received: from [176.228.60.248] (port=2977 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k1Zyw-0004Pc-Ek; Fri, 31 Jul 2020 14:42:14 -0400 In-Reply-To: <7a41931db76f055f1e904c964fd5b12eb2ee27b8.camel@gnu.org> (message from Paul Smith on Fri, 31 Jul 2020 14:20:38 -0400) 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:183745 Archived-At: > From: Paul Smith > Cc: 42411@debbugs.gnu.org > Date: Fri, 31 Jul 2020 14:20:38 -0400 > > It's definitely true that technically, it is possible to have targets > that are indented by TABs. A line indented by a TAB is only considered > part of a recipe if it appears in the "recipe context", which means > somewhere that a recipe is legal in the syntax. > > If it's not legal for a recipe command to appear there then TABs are > treated like any other whitespace. > > In practice, I think it's highly unlikely that anyone would > intentionally use TABs to indent targets because it's so fragile: any > reordering of the makefile or adding new lines could cause that > makefile to break. > > So, as a simplifying assumption it makes sense to me to ignore any line > starting with TAB when trying to detect targets. > > Of course, as Eli points out there are certainly a large number of > potential targets which cannot be determined using this type of simple > investigation. The most obvious are targets that match patterns. > > However I'll say two things about this: > > First, I think it's unlikely that users would really want to see all > the potential matches of targets when doing completion. It's most > likely that they are interested in the "top level" intended command > line goals rather than every possible object, source, etc. file that > make considers a target due to pattern or suffix rules. > > Second, I don't think there's currently any good way to list those > targets anyway. Just using --print-database by itself won't do it. > Using the -n option will help, but many makefiles are not carefully > written to ensure that -n is really idempotent, and make -n could > delete files or similar operations. And of course this still only > finds the targets that are available "by default"; providing a target > on the command line could cause more pattern rules to generate more > targets that the "default" goal target doesn't. > > I hope that helps but if I completely missed the point please feel free > to redirect me! Thanks for the feedback. So you think the current regexp is trying to match too much, and the proposed change is TRT and we should make it unconditionally?