all messages for Emacs-related lists mirrored at yhetil.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 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.