From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.bugs Subject: bug#47534: Subject: 28.0.50; Regexp lower case pattern matches upper case Date: Thu, 1 Apr 2021 10:12:25 +0200 Message-ID: References: <87blaz0xmm.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000059b86f05bee4cb97" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16658"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47534@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 01 10:14:45 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRsTV-0004CR-CH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 10:14:45 +0200 Original-Received: from localhost ([::1]:42882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRsTU-0000pM-AS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 04:14:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRsRq-0006SS-OZ for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 04:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRsRq-0007N1-FO for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 04:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRsRq-00087I-9v for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 04:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Apr 2021 08:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47534 X-GNU-PR-Package: emacs Original-Received: via spool by 47534-submit@debbugs.gnu.org id=B47534.161726476431175 (code B ref 47534); Thu, 01 Apr 2021 08:13:02 +0000 Original-Received: (at 47534) by debbugs.gnu.org; 1 Apr 2021 08:12:44 +0000 Original-Received: from localhost ([127.0.0.1]:56219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRsRY-00086k-92 for submit@debbugs.gnu.org; Thu, 01 Apr 2021 04:12:44 -0400 Original-Received: from mail-ua1-f52.google.com ([209.85.222.52]:37560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRsRW-00086W-HU for 47534@debbugs.gnu.org; Thu, 01 Apr 2021 04:12:43 -0400 Original-Received: by mail-ua1-f52.google.com with SMTP id e1so269373uaa.4 for <47534@debbugs.gnu.org>; Thu, 01 Apr 2021 01:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GC5KhkI2Wl5/FWaI5W3DZaL4nwVRqe8wfFwBs9QUYbg=; b=PzDNwDEPBmuOM6xEmV0aeadaHbK8Di3qNUmU0ANQlnYGa/YFKnc+MXU0DrR13jLZTJ OmtnQ/eEzZcp3+qMbR4BH6HADvxCE4Yf5Hjj50keZon6sVRwre2GGs5XI7LPpbetF1k/ VRB2xBKkKFDuUWifpgXZMnHnUEPAxFCbb4txXIwRyFKVWBWi8jaXuyYBJWZyo4uC108g EKbR0sI9XUdHkPdoiFXh7WuWfT+fnUSuV+7oI+5u4GgXpcfo/2EUhoT9W4uEIlf07bXJ Te4qm9exlYKG4zjzN8M+2U5BVlOboaJmCbc80BDAnHv604VoKYszhh+vJneOYD9jL/CH qZkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GC5KhkI2Wl5/FWaI5W3DZaL4nwVRqe8wfFwBs9QUYbg=; b=rz2KE9/m3XG05KeUpVuy/JS/7n57hGizo+SpVh2NL4LPrF6PwvcSSy0dz2Ywc5C68f mw/6ZWLv3xg56dJRQ1wmuejan8qn/ODgLVaXUJ032UZt0b8OMrIUFirMD8LpgSfm63rl R5lM491BfN8j11PoYZLdMWgrA5I/M7Wp/eYOXnNyY97h0Kz5W1O4MVWWQtAmKLnLJd41 2x7/sLIIc+VIiRYfaqUjq89g9+TH8PsC6VqB3b3cUWTQrflX/EAEWl6O8mtNPZVFgqvd FOTmpYTJsvFQPZZ1nPDzTmiiTcupORTDMhEg8M9Zq2G5rWyllZnM7ZiFTzj79BBk5rvq Hbiw== X-Gm-Message-State: AOAM533aTNUg35lntkLletECA+HyR2tbVGPaHymD1lakwlWFByt1ZNUF OIql7t50G4VWZcJcxM9gG83HmzSckUla0qEi92I= X-Google-Smtp-Source: ABdhPJyLhWxH4SFsY2FOD+wmtkwHTrS44ioUPZ+oITxBuX6XIuvaofau1yKsIPwDU/QpctlmmAjonMACuavTirdw6bA= X-Received: by 2002:ab0:7316:: with SMTP id v22mr3937284uao.134.1617264757028; Thu, 01 Apr 2021 01:12:37 -0700 (PDT) In-Reply-To: <87blaz0xmm.fsf@tcd.ie> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203413 Archived-At: --00000000000059b86f05bee4cb97 Content-Type: text/plain; charset="UTF-8" Ah thanks. I thought I used case sensitive replace-regexp before, but probably I am mistaking then. Section "34.3 Regular Expressions" of the Emacs manual states that "[a-z]" or "[:lower:]" should match only lower case, while it is not mentioned at all that it will not work by default (case-fold-search as well as reb-toggle-case and reb-change-syntax are not mentioned at all in that section as far as I can find). Indeed I was referring to the docstring of re-builder. Anyway, I am happy to provide a patch. On Thu, 1 Apr 2021 at 00:25, Basil L. Contovounesios wrote: > dalanicolai writes: > > > When using the regexp builder and trying to match only lower case > > letters (and spaces), Emacs also includes upper case matches. > > I think this is the effect of the user option case-fold-search, which > defaults to non-nil (this is the case across most search-related parts > of Emacs, including Isearch). You can toggle it in re-builder > specifically with C-c C-c (reb-toggle-case), or across all buffers by > customising case-fold-search to be nil. > > > Also, I am unable to find in the manual any information about the > > option of setting different syntaxes in the regexp builder > > I think most of the documentation for re-builder.el is in its commentary > at the start of the file; see M-x find-library RET re-builder RET. > > I haven't used re-builder much, but from M-x customize-group RET > re-builder RET I see there is a user option reb-re-syntax for > controlling the default syntax. C-h m in the re-builder buffer further > reveals that the command C-c C-i (reb-change-syntax) can modify > reb-re-syntax on the fly. > > > (also the option is not mentioned in the regexp-builder docstring). So > > I would additionally like to report this as a documentation bug. > > Are you referring to the docstring of the re-builder command, or > something else? And is it a listing of key bindings you would like to > see, or something else? Would you like to provide a patch with > suggestions for improvements? > > Thanks, > > -- > Basil > --00000000000059b86f05bee4cb97 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah thanks. I thought I used case sensitive replace-re= gexp before, but probably I am mistaking then. Section "34.3 Regular E= xpressions"=C2=A0 of the Emacs manual states that "[a-z]" or= "[:lower:]" should match only lower case, while it is not mentio= ned at all that it will not work by default (case-fold-search as well as re= b-toggle-case and reb-change-syntax are not mentioned at all in that sectio= n as far as I can find). Indeed I was referring to the docstring of re-buil= der. Anyway, I am happy to provide a patch.

<= br>

On Thu, 1 Apr 2021 at 00:25, Basil L. Contovounesios <contovob@tcd.ie> wrote:
dalanicolai <dalanicolai@gmail.com> wr= ites:

> When using the regexp builder and trying to match only lower case
> letters (and spaces), Emacs also includes upper case matches.

I think this is the effect of the user option case-fold-search, which
defaults to non-nil (this is the case across most search-related parts
of Emacs, including Isearch).=C2=A0 You can toggle it in re-builder
specifically with C-c C-c (reb-toggle-case), or across all buffers by
customising case-fold-search to be nil.

> Also, I am unable to find in the manual any information about the
> option of setting different syntaxes in the regexp builder

I think most of the documentation for re-builder.el is in its commentary at the start of the file; see M-x find-library RET re-builder RET.

I haven't used re-builder much, but from M-x customize-group RET
re-builder RET I see there is a user option reb-re-syntax for
controlling the default syntax.=C2=A0 C-h m in the re-builder buffer furthe= r
reveals that the command C-c C-i (reb-change-syntax) can modify
reb-re-syntax on the fly.

> (also the option is not mentioned in the regexp-builder docstring). So=
> I would additionally like to report this as a documentation bug.

Are you referring to the docstring of the re-builder command, or
something else?=C2=A0 And is it a listing of key bindings you would like to=
see, or something else?=C2=A0 Would you like to provide a patch with
suggestions for improvements?

Thanks,

--
Basil
--00000000000059b86f05bee4cb97--