unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: jostein@kjonigsen.net
Cc: casouri@gmail.com, 61104@debbugs.gnu.org,
	Theodor Thornhill <theo@thornhill.no>,
	Eli Zaretskii <eliz@gnu.org>
Subject: bug#61104: 29.0.60; typescript-ts-mode does not provide compilation-mode support
Date: Sat, 4 Feb 2023 12:59:10 +0100	[thread overview]
Message-ID: <792EC2CE-006B-42F1-81C2-453E71C2173C@gmail.com> (raw)
In-Reply-To: <316aee65-50c6-9dad-5b8d-08d90675c5a5@secure.kjonigsen.net>

Jostein, thank you for contributing a new compilation-mode pattern!

We generally want these regexps to be as tight as possible while still doing their job. This is partly because the large and ever-growing number of rules tend to interfere with one another, and over-broad patterns have shown to be a source of performance problems in the past.

I hope you don't mind helping us finishing the job:

First of all, both regexps match arbitrary amounts of horizontal whitespace at the beginning of a line, but neither message example you supplied contains any such leading whitespace. This means that either the set of test cases needs to be extended, or we could safely remove this leading whitespace matcher.

If leading whitespace indeed can occur, then when and how, exactly? Spaces or tabs, and how many? Please give us examples from actual compiler output.

Similarly the patterns match arbitrary whitespace before the word "error". This seems equally questionable -- would a single space do? If not, please provide actual output demonstrating it that could be added to the test suite, and tell us how it varies (tabs vs spaces, amount of whitespace, etc).

The following is a minor point that we'll fix but I thought you may want to know:

The use of [[:blank:]] and [[:alnum:]] is very likely more expensive than required since they accept Unicode whitespace and letters which obviously never will occur where matched so if it's all the same to you we'll reduce them to ASCII patterns.

Similarly, the inclusion of \r in patterns seems to be a misunderstanding: the tail part, "[^\r\n]+$", does not make sense -- normally, carriage returns aren't seen in buffers because line terminator translation convert everything to a single \n, and if a stray CR did occur then that pattern would never match anyway (why?).






  parent reply	other threads:[~2023-02-04 11:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 20:14 bug#61104: 29.0.60; typescript-ts-mode does not provide compilation-mode support Jostein Kjønigsen
2023-01-27 20:30 ` Eli Zaretskii
2023-01-27 20:52   ` Jostein Kjønigsen
2023-01-28  7:23     ` Eli Zaretskii
2023-01-28 14:28       ` Jostein Kjønigsen
2023-02-02 21:01         ` Jostein Kjønigsen
2023-02-03  5:30           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-03  7:06             ` Eli Zaretskii
2023-02-03  8:00               ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-04  8:24                 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-04 11:59 ` Mattias Engdegård [this message]
2023-02-05 20:36   ` Jostein Kjønigsen
2023-02-06 11:19     ` Mattias Engdegård
2023-02-06 17:05       ` Jostein Kjønigsen
2023-02-06 17:34         ` Mattias Engdegård

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=792EC2CE-006B-42F1-81C2-453E71C2173C@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=61104@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=jostein@kjonigsen.net \
    --cc=theo@thornhill.no \
    /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).