unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42411: Bug with M-x compile
@ 2020-07-18  9:01 Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-07-25  7:24 ` Eli Zaretskii
  2020-08-21 10:45 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-07-18  9:01 UTC (permalink / raw)
  To: 42411


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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-21 10:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-07-31 18:58           ` Paul Smith
2020-08-21 10:45 ` Lars Ingebrigtsen

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).