all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gregory Heytings via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 42411@debbugs.gnu.org
Subject: bug#42411: Bug with M-x compile
Date: Sat, 18 Jul 2020 09:01:48 +0000	[thread overview]
Message-ID: <alpine.NEB.2.21.2007181038001394.17147@sdf.lonestar.org> (raw)


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





             reply	other threads:[~2020-07-18  9:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18  9:01 Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2020-07-25  7:24 ` bug#42411: Bug with M-x compile 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
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

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

  git send-email \
    --in-reply-to=alpine.NEB.2.21.2007181038001394.17147@sdf.lonestar.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=42411@debbugs.gnu.org \
    --cc=ghe@sdf.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.