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 12:27:25 +0200 Message-ID: References: <87blaz0xmm.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000002d217805bee6ae43" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17567"; 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 12:37:11 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 1lRuhL-0004SY-H5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 12:37:11 +0200 Original-Received: from localhost ([::1]:45898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRuhK-0006CH-GV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 06:37:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRuYU-0005CR-E3 for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 06:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRuYU-0002xP-4p for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 06:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRuYU-0003GN-0e for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 06:28: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 10:28:01 +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.161727286512520 (code B ref 47534); Thu, 01 Apr 2021 10:28:01 +0000 Original-Received: (at 47534) by debbugs.gnu.org; 1 Apr 2021 10:27:45 +0000 Original-Received: from localhost ([127.0.0.1]:56411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRuYC-0003Fs-KE for submit@debbugs.gnu.org; Thu, 01 Apr 2021 06:27:44 -0400 Original-Received: from mail-vs1-f42.google.com ([209.85.217.42]:38766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRuYA-0003Fe-UG for 47534@debbugs.gnu.org; Thu, 01 Apr 2021 06:27:43 -0400 Original-Received: by mail-vs1-f42.google.com with SMTP id r12so972574vsj.5 for <47534@debbugs.gnu.org>; Thu, 01 Apr 2021 03:27: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=QVMTvC7M5R9KGqCfmXs7NdEtj0x5tT/qYHofgs2sWoY=; b=LY8YAaQQeyzjS3gdduCCk+Q36s9+vOSj9r/RWQmWoGAJk5L1oJtxS0/0m3oh6XvVkQ NQvuwntXAdwJY2j7Z66CoJZSWrRaK8ovMKUp7z2GuJ7rAagMFfiPwCu/51QwMN5lANl8 aub0kFYTp7wnXrj1QCXowIxbVLP1zo6krj/6YD2gtSU+rXsK4iv1E1vqt9PpITMn7Y7M g6Me4/VNX5HZF+/kJJd43LJ1KN5mmZwkqLYJuedunO/kwFQ5PGiXDxpleVGyjutHvaPG CVkLwioroRhQfGf9Xjv8s2639daUtaXLWndx41BhYMPw4UVBoWNdOh2dQLJCmdTu/O+X 2Ofw== 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=QVMTvC7M5R9KGqCfmXs7NdEtj0x5tT/qYHofgs2sWoY=; b=JCE6k6uKSZCvHAyrz1TS/40tYB+hPmZRyETKkIU2URTMyyGawwk4kujwbCl77XsHkn JOKJueSmQ+gh/HJOTGdv+l8JRaB+vzo9vLeOJxOGRNH1vvOTjECMgL8XH0aSZUYqjohH Pg39TQtjoY9QewNigoTwBuGgPOSF4DtyvcEC9ZW8rzGB98sx4UKalTIdB0TmJCXNGt3D zfZGa1fyfao0BLcnuR5d+HElYwrEjkAPKx/uJz3Y8oMWQc2YrmA0H/eleBuHfMU5OKu2 isOgzA2yRHpRfSgpXEmogOH7BQ3oXIxSO1BoPxUXitSGHPpy+mdEp3BU6Ly5E0OGJ0Cj qtOg== X-Gm-Message-State: AOAM532GdhjjbCS55njEuuMa+c7grhfo4z3l9e9rcxcWFrX4awfak89A tgho9upO+zTzlz+0oAOlnbwjU9bxdjjIiP8UjBs= X-Google-Smtp-Source: ABdhPJwZGTsBHZ9KcIlHlJRWSfBN2coRplOt7In1kJ6jLaI1uMxQvv/8OWs22FNBj8iR6jIGOd77uz4sDgF5SYE/UL4= X-Received: by 2002:a67:e056:: with SMTP id n22mr4358305vsl.0.1617272857471; Thu, 01 Apr 2021 03:27:37 -0700 (PDT) In-Reply-To: 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:203421 Archived-At: --0000000000002d217805bee6ae43 Content-Type: multipart/alternative; boundary="0000000000002d217505bee6ae41" --0000000000002d217505bee6ae41 Content-Type: text/plain; charset="UTF-8" Here is a small patch for the re-builder docstring. I hope I did things correctly... On Thu, 1 Apr 2021 at 10:12, dalanicolai wrote: > 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 >> > --0000000000002d217505bee6ae41 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here is a small patch for the re-builder docstring. I hope= I did things correctly...

On Thu, 1 Apr 2021 at 10:12, dalanicolai <= dalanicolai@gmail.com> wrot= e:
Ah thanks. I thought I used case sensitive replace-regexp before, = but probably I am mistaking then. Section "34.3 Regular Expressions&qu= ot;=C2=A0 of the Emacs manual states that "[a-z]" or "[:lowe= r:]" should match only lower case, while it is not mentioned at all th= at 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 T= hu, 1 Apr 2021 at 00:25, Basil L. Contovounesios <contovob@tcd.ie> wrote:
dalanicolai <dalanicolai@gmail.com>= 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).=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
--0000000000002d217505bee6ae41-- --0000000000002d217805bee6ae43 Content-Type: application/octet-stream; name=re-builder-improve-docstring Content-Disposition: attachment; filename=re-builder-improve-docstring Content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