From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.devel Subject: Re: regular expressions that match nothing Date: Fri, 17 May 2019 11:18:49 +1200 Message-ID: <39a146e4709b532db817abc47f17799b@webmail.orcon.net.nz> References: <7a6b23f52418b093a4cf7a6db4306cf425533249.camel@acm.org> <20190515194129.GA4103@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="257993"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Orcon Webmail Cc: Alan Mackenzie , Stefan Monnier , emacs-devel@gnu.org To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 17 01:19:33 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRPet-0014yB-Op for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 01:19:31 +0200 Original-Received: from localhost ([127.0.0.1]:38165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRPes-0008Ky-B0 for ged-emacs-devel@m.gmane.org; Thu, 16 May 2019 19:19:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRPel-0008Kg-Kt for emacs-devel@gnu.org; Thu, 16 May 2019 19:19:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRPej-0001wz-Mm for emacs-devel@gnu.org; Thu, 16 May 2019 19:19:23 -0400 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:39896) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRPej-0001mE-1p for emacs-devel@gnu.org; Thu, 16 May 2019 19:19:21 -0400 Original-Received: from [10.253.37.70] (port=43087 helo=webmail.orcon.net.nz) by smtp-1.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1hRPeD-0002QC-OR; Fri, 17 May 2019 11:18:51 +1200 Original-Received: from wlgwil-nat-office.catalyst.net.nz ([202.78.240.7]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Fri, 17 May 2019 11:18:49 +1200 In-Reply-To: X-Sender: psainty@orcon.net.nz X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 60.234.4.34 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:236605 Archived-At: > 15 maj 2019 kl. 21.41 skrev Alan Mackenzie : >> I think regexp-unmatchable is too much of a mouthful. I like it, myself. I think the meaning is 100% clear and unambiguous for the reader (which I can't say about the alternative suggestions that I've seen). Are we expecting this to be used so much that we're prioritising brevity over clarity? (That's a genuine question -- I have a similar definition in my own config, and I have exactly one use for it.) On 2019-05-16 22:54, Mattias EngdegÄrd wrote: > 4. The point of this name isn't to be shorter than the regexp string > it represents, but to be more readable and avoid mistakes and > substandard reinventions. Quite. > 2. (rx (or)) is even shorter than re-nomatch, and is very memorable. > (rx (|)) is shorter still. I don't think those are much better than people using "a\\`". *Surely* `rx` can simply acquire a symbol for this? (rx unmatchable) or similar? -Phil