From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master ea93326: Add `union' and `intersection' to rx (bug#37849) Date: Sun, 15 Dec 2019 09:53:09 -0500 Message-ID: References: <20191210213842.5388.30110@vcs0.savannah.gnu.org> <20191210213843.EB6A520A23@vcs0.savannah.gnu.org> <67645170-D29F-4C77-99F4-09706856CEEB@acm.org> <719A6AF3-9624-422A-B6E6-FC942623B5C5@acm.org> <8D6E2D8D-4617-4EFA-9E60-F5C7B443C24C@acm.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="64453"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Emacs developers To: Mattias =?windows-1252?Q?Engdeg=E5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 15 15:54:03 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1igVHW-000Gcg-UH for ged-emacs-devel@m.gmane.org; Sun, 15 Dec 2019 15:54:03 +0100 Original-Received: from localhost ([::1]:40410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igVHV-00034n-E2 for ged-emacs-devel@m.gmane.org; Sun, 15 Dec 2019 09:54:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52984) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igVGr-0002dX-Ln for emacs-devel@gnu.org; Sun, 15 Dec 2019 09:53:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igVGp-00024T-HV for emacs-devel@gnu.org; Sun, 15 Dec 2019 09:53:20 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:59219) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1igVGp-00020L-9N for emacs-devel@gnu.org; Sun, 15 Dec 2019 09:53:19 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 62F5444D11A; Sun, 15 Dec 2019 09:53:18 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B76A044D117; Sun, 15 Dec 2019 09:53:12 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1576421592; bh=lkltdpvmx/UsQttZ7JKj9Dc16AjsK+okTysjnsr/wUE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=FRKd7ucwa3XAawCC9sxHNoWftkQBVsAbF/4lMV+2/CAf+SpTz4jqkp1YAq6jfNX06 tgF3nTxMqjlWlSYTm25CfMBgFn7u9adtt9EmQYt1aAGzqrp6L02GjXx4jJczZUz0DH JDvWw033Fk+nK2Faei0RNnPZ+8HUhZViEbyXnlv8FytA7P5+hqHYRMYXL+mdZpYXCd ypZoE+D/VacAkrHSUiTZnJezEAAcwesfy/aMT6QMbvF/agoo5PqVnv6dsowRAIY0vv m3uUg/03Hseef4NChpPD+F5nQ9L3IvUVqwICF/bzHO5t4vyHH50+r8rnmtSLnuA0bs NKopl989OOL+Q== Original-Received: from pastel (unknown [45.72.153.183]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 43705121213; Sun, 15 Dec 2019 09:53:12 -0500 (EST) In-Reply-To: ("Mattias \=\?windows-1252\?Q\?Engdeg\=E5rd\=22's\?\= message of "Sun, 15 Dec 2019 12:08:27 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243396 Archived-At: >>> Something like (longest-or STRING...) has been proposed, but was not well >>> received. A solution is still sought (preferably one that doesn't involve >>> rewriting the regexp engine). >> There's posix-string-match and friends, > A bit overkill just for matching a set of constant strings, don't you think? I think there's a lot of implicit assumptions here. Yes, there are cases where you may want the "longest match" rule and where `posix-string-match` can be too costly, but the ones I can think of seem to be fairly contrived. Stefan