all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#3613: [PATCH] Allow trailing spaces and " -" in filenames for the compile output parser
@ 2009-06-19  1:07 Laurence Darby
  2009-06-27  1:13 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Laurence Darby @ 2009-06-19  1:07 UTC (permalink / raw)
  To: bug-gnu-emacs



Hi,

I actually have a lot of files that have " -" in the names, this patch
fixes it for me.  If anyone understands this regex (I don't really,
just kept changing it till it worked), can you see if the change breaks
anything else?

Thanks,
Laurence

(Please CC me on replies, I'm not subscribed, thanks)

---
 lisp/progmodes/compile.el |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 11428d2..328f31f 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -245,11 +245,9 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
      ;; line number starts with "SS".  --Stef
 
      ;; The core of the regexp is the one with *?.  It says that a file name
-     ;; can be composed of any non-newline char, but it also rules out some
-     ;; valid but unlikely cases, such as a trailing space or a space
-     ;; followed by a -.
+     ;; can be composed of any non-newline char.
      "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\
-\\([0-9]*[^0-9\n]\\(?:[^\n ]\\| [^-/\n]\\)*?\\): ?\
+\\([0-9]*[^0-9\n]\\(?:[^\n]\\| [^/\n]\\)*?\\): ?\
 \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\
 \\(?:-\\([0-9]+\\)?\\(?:\\.\\([0-9]+\\)\\)?\\)?:\
 \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\
-- 
1.6.2.2







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

* bug#3613: [PATCH] Allow trailing spaces and " -" in filenames for the compile output parser
  2009-06-19  1:07 bug#3613: [PATCH] Allow trailing spaces and " -" in filenames for the compile output parser Laurence Darby
@ 2009-06-27  1:13 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2009-06-27  1:13 UTC (permalink / raw)
  To: Laurence Darby; +Cc: bug-gnu-emacs, 3613

> I actually have a lot of files that have " -" in the names, this patch
> fixes it for me.  If anyone understands this regex (I don't really,
> just kept changing it till it worked), can you see if the change breaks
> anything else?

Your change turns the (core of) regexp back to just ".*?" as it was in
the past.  We disallowed trailing spaces as well as " -" because they
lead to false positives in some cases.
There's no way to win in all cases, sadly.


        Stefan






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

end of thread, other threads:[~2009-06-27  1:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-19  1:07 bug#3613: [PATCH] Allow trailing spaces and " -" in filenames for the compile output parser Laurence Darby
2009-06-27  1:13 ` Stefan Monnier

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.