From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Scan of regexps in emacs Date: Sun, 10 Mar 2019 22:56:17 -0400 Message-ID: <58352543-82ea-6595-cc71-f3d1949338d0@gmail.com> References: <9f6f677b29f514c5f0bb1bb805e89d62eb146999.camel@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="64718"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 11 03:56: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 1h3B7B-000Gkv-B3 for ged-emacs-devel@m.gmane.org; Mon, 11 Mar 2019 03:56:33 +0100 Original-Received: from localhost ([127.0.0.1]:54407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3B7A-0000Zg-9C for ged-emacs-devel@m.gmane.org; Sun, 10 Mar 2019 22:56:32 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3B73-0000ZO-HL for emacs-devel@gnu.org; Sun, 10 Mar 2019 22:56:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3B71-0003j2-Aj for emacs-devel@gnu.org; Sun, 10 Mar 2019 22:56:25 -0400 Original-Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]:46782) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3B70-0003h0-4H for emacs-devel@gnu.org; Sun, 10 Mar 2019 22:56:22 -0400 Original-Received: by mail-qt1-x831.google.com with SMTP id z25so3497268qti.13 for ; Sun, 10 Mar 2019 19:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Oh/Vxubog7C/3sydAQYM54zuOVVu7+iSUoOaueG1m6Q=; b=Fz0J3ZbAsBZ0RjkSapAL5qp64zTyhn7iQ4xO0JsMimvLA3688c8yuFqiF3Z9fFAc4n H5MzUBQMeDHHzBWU188YSI+OvBCXDXEQJBfToE/cZHFDc3Tf2bejBou5TzCkmigdq9Jg ry8ZgwkULwCtWaEBqJLcVrCqDh7dqHwRh+ScABBjehzWOFeqHuppS+I6btDx0wbTnY1z p2l8GloveDQuDBBQaLccDL79UZDdba0QrSCpE93R07/3pHHMdo4p98sNMg1009Lm3x5y ac3Rk8CJo2VlRmiFs8jr5/eQzdWi0SlvSfGXaqkx5zsM7TIRWmNNagfs1n0dYkg9Fx15 TPbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Oh/Vxubog7C/3sydAQYM54zuOVVu7+iSUoOaueG1m6Q=; b=D/kQTy+SxSIv1YdRylkIir9Ux3wtm/61fiQG+cAXa7XUH/XEShSbbripnlfbinJjM+ cNYHzONqiiVHqvqVZwG94LaFtsNO95m+CeCxUsp2Ci3jxptSJnn3Cc7rKCBpQVayhv2u Wq094e4PpI9HX+tkUA2ZBkUeMxI24rBMIQcH0zrHJSv4wXI9tF+dD4tB0zXe1cKhP9IM a9v2Rx0vDWkB8B6mHTdw3rHLsCPxLaSD6ozHMguc9Wh6wzsjwbPT8bSfV13RbdXnbM/4 PJS3/fROCQqRtyxOuwwNphzAbTIi7Ktvnqk+yMFQ1tlCjjkP8RQi4h9O4SM99PVPRDeU iNAg== X-Gm-Message-State: APjAAAUB1qZG/u6IVjRxDzTNyH1tsqOBR/34MI6TSfMnmRUrxgAimRaO ld7Tbn2GHjmjrzEOkkG+Y9IsQxlx X-Google-Smtp-Source: APXvYqwrIJ5myend9meUbt/cTmXyRPISN4wL8cIUGW8j1xv2FvZsIyyB1fIcQ3I8bHc4XjC8tPkupw== X-Received: by 2002:ac8:43d5:: with SMTP id w21mr22440997qtn.98.1552272979274; Sun, 10 Mar 2019 19:56:19 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:8867:e47c:fac:51b? ([2601:184:4180:66e7:8867:e47c:fac:51b]) by smtp.googlemail.com with ESMTPSA id p5sm1276646qkj.4.2019.03.10.19.56.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2019 19:56:18 -0700 (PDT) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::831 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:234049 Archived-At: On 10/03/2019 22.45, Paul Eggert wrote: > - (while (string-match (concat "\\(^" comint-prompt-regexp > + (while (string-match (concat "\\(" comint-prompt-regexp > "\\)\\1+") > string) I think your change altered the meaning of that regexp. Was that intentional? Or am I misunderstanding? The manual says this: For historical compatibility reasons, ‘^’ can be used only at the beginning of the regular expression, or after ‘\(’, ‘\(?:’ or ‘\|’. …and indeed (string-match-p "\\(^abc\\)" "xabc") is nil but (string-match-p "\\(abc\\)" "xabc") is 1. Clément.