unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: psmith@gnu.org
Cc: 42411@debbugs.gnu.org
Subject: bug#42411: Bug with M-x compile
Date: Fri, 31 Jul 2020 21:42:01 +0300	[thread overview]
Message-ID: <838sezedc6.fsf@gnu.org> (raw)
In-Reply-To: <7a41931db76f055f1e904c964fd5b12eb2ee27b8.camel@gnu.org> (message from Paul Smith on Fri, 31 Jul 2020 14:20:38 -0400)

> From: Paul Smith <psmith@gnu.org>
> 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?





  reply	other threads:[~2020-07-31 18:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18  9:01 bug#42411: Bug with M-x compile Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-25  7:24 ` Eli Zaretskii
2020-07-25 23:29   ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-26 13:55     ` Eli Zaretskii
2020-07-31 18:20       ` Paul Smith
2020-07-31 18:42         ` Eli Zaretskii [this message]
2020-07-31 18:58           ` Paul Smith
2020-08-21 10:45 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838sezedc6.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=42411@debbugs.gnu.org \
    --cc=psmith@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).