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: [ELPA] New package: xr Date: Fri, 01 Mar 2019 08:51:39 -0500 Message-ID: References: <875zt5feys.fsf@web.de> <23E9F007-5B84-45C6-9933-5A1220058CAA@acm.org> <87o96xdup3.fsf@web.de> <99EEC0DC-3E76-4CC7-80D7-B6ADF480C818@acm.org> <5904ECC1-8E45-49FB-B457-2924519733DA@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="238207"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 01 14:59:59 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 1gzihj-000zpR-9D for ged-emacs-devel@m.gmane.org; Fri, 01 Mar 2019 14:59:59 +0100 Original-Received: from localhost ([127.0.0.1]:38284 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzihh-0004qJ-Mn for ged-emacs-devel@m.gmane.org; Fri, 01 Mar 2019 08:59:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gziZs-0006Jf-MW for emacs-devel@gnu.org; Fri, 01 Mar 2019 08:51:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gziZq-0005XB-N1 for emacs-devel@gnu.org; Fri, 01 Mar 2019 08:51:51 -0500 Original-Received: from [195.159.176.226] (port=47330 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gziZp-0005VF-Dp for emacs-devel@gnu.org; Fri, 01 Mar 2019 08:51:50 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gziZk-000pgu-WB for emacs-devel@gnu.org; Fri, 01 Mar 2019 14:51:44 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:6VxarmPEYAnvJwnq33SHQoUl0YA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:233728 Archived-At: >> I'm definitely in favor of using the standard * + and ? > They are suggestive but I find `?' a bit on the hacky side. For instance, > you can't break the line after the operator, since it requires > a space following. Oh, indeed, that's a problem. > Interestingly, (not (any ...)) and (not (in ...)) are valid, but (not (char > ...)) isn't (although there is `not-char'). I guess this means we should go with `in`. Tho it should be easy to add (not (char ...)) if needed. BTE, I don't like (not (any ...)) and (not (in ...)) in any case: the negation should be within the `char`, `in`, or `any` not around it. This is because the negation of a regexp RE could be defined as a regexp which matches all strings not matched by RE (and hence when RE is (any ...), it will also match all strings of length != 1). This form of negation is supported in lex.el, for example. > Another implementation leak: since `any' is also an alias for `not-newline', > `char' and `in' are as well: > (rx any char in) => "..." But XR doesn't have to abuse this, luckily. Stefan