unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Scan of regexps in Emacs (March 17)
Date: Sat, 6 Apr 2019 11:43:08 +0200	[thread overview]
Message-ID: <8F82F7FF-8921-4ABF-AA1F-18777104BB2A@acm.org> (raw)
In-Reply-To: <692fe297-1c72-0cda-8765-c119fd0b5ef6@cs.ucla.edu>

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

3 apr. 2019 kl. 00.08 skrev Paul Eggert <eggert@cs.ucla.edu>:
> 
> On 4/2/19 7:15 AM, Mattias Engdegård wrote:
>> where does a user go to understand extant regexps?
> 
> A user that *really* wants to know can go read the source code and get
> confused, just like I did. :-)
> 
> But I think it's better if the documentation doesn't say what happens.
> If you prefer that the documentation explicitly say that it doesn't say
> what happens, I guess that would be OK too (what sort of wording would
> you like, though?).

I was mostly thinking about regexps like "^***" which do occur in actual code (by mistake), and are almost but not quite explained in the manual. But perhaps some knowledge is better hidden.

>> I've attached the ones found by a modified relint/xr, in case you are interested.
> 
> Sure! Fixed in the attached patch.

Thank you, it looks fine to me. Some tool improvements uncovered more oddities; log attached.


[-- Attachment #2: relint.log --]
[-- Type: application/octet-stream, Size: 1083 bytes --]

;; -*- compilation -*-
lisp/net/tramp.el:2811:30: `skip-regexp' cannot be used for arguments to `skip-chars-forward'
lisp/progmodes/sh-script.el:2909:37: In call to skip-chars-forward: Suspect skip set framed in `[...]' (pos 0)
  "[a-z0-9]*?"
   ^
lisp/progmodes/verilog-mode.el:14269:38: `sig-re' cannot be used for arguments to `skip-chars-backward'
lisp/progmodes/verilog-mode.el:14272:37: `sig-re' cannot be used for arguments to `skip-chars-forward'
lisp/vc/log-edit.el:353:10: In call to re-search-forward: Literal `-' not first or last in character alternative (pos 41)
  "^\\([^[:alpha:]]\\|[[:alnum:]-]+[^[:alnum:]-:]\\)"
   ...........................................^
lisp/xml.el:721:25: In call to re-search-forward: Literal `-' not first or last in character alternative (pos 24)
  "\\=\"\\([[:space:][:alnum:]-'()+,./:=?;!*#@$_%]*\\)\""
   ...........................^
lisp/xml.el:724:25: In call to re-search-forward: Literal `-' not first or last in character alternative (pos 24)
  "\\='\\([[:space:][:alnum:]-()+,./:=?;!*#@$_%]*\\)'"
   ..........................^

  parent reply	other threads:[~2019-04-06  9:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-17 13:50 Scan of regexps in Emacs (March 17) Mattias Engdegård
2019-03-19  1:21 ` Paul Eggert
2019-03-19 10:34   ` Mattias Engdegård
2019-03-20  1:53     ` Paul Eggert
2019-03-20  2:20       ` Stefan Monnier
2019-03-20 22:01         ` Paul Eggert
2019-03-20 22:59           ` Drew Adams
2019-03-20 23:10             ` Paul Eggert
2019-03-21  3:38               ` Eli Zaretskii
     [not found]             ` <<deeccd91-0f43-c329-6087-17435550b328@cs.ucla.edu>
     [not found]               ` <<83d0mk6go5.fsf@gnu.org>
2019-03-21  4:21                 ` Drew Adams
2019-03-21 14:17                   ` Eli Zaretskii
2019-03-21  0:57           ` Stefan Monnier
2019-03-21 11:15           ` Mattias Engdegård
2019-04-02  7:33             ` Paul Eggert
2019-04-02 14:15               ` Mattias Engdegård
2019-04-02 14:26                 ` Noam Postavsky
2019-04-02 19:13                   ` Mattias Engdegård
2019-04-02 16:58                 ` Stefan Monnier
2019-04-02 22:08                 ` Paul Eggert
2019-04-03  4:52                   ` Eli Zaretskii
2019-04-03 17:02                     ` Paul Eggert
2019-04-06  9:43                   ` Mattias Engdegård [this message]
2019-04-07  8:15                     ` Michael Albinus
2019-04-07  9:47                     ` Paul Eggert
2019-04-07 10:06                       ` Mattias Engdegård
2019-04-07 18:45                         ` Paul Eggert
2019-03-21  2:07         ` Richard Stallman
2019-03-22 13:26         ` Stephen Leake
2019-03-22 14:03           ` Stefan Monnier
2019-03-22 14:12           ` Mattias Engdegård
2019-03-20 10:04       ` 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=8F82F7FF-8921-4ABF-AA1F-18777104BB2A@acm.org \
    --to=mattiase@acm.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).