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:58 +0200 Message-ID: References: <87blaz0xmm.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000000e998105bee6b0f2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10659"; 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:35:46 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 1lRufy-0002gV-K3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 12:35:46 +0200 Original-Received: from localhost ([::1]:43360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRufx-000514-Ls for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 06:35:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRuZS-00078O-Pr for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 06:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRuZS-0003aI-HQ for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 06:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRuZS-0003Hw-Dm for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 06:29: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:29: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.161727290912602 (code B ref 47534); Thu, 01 Apr 2021 10:29:02 +0000 Original-Received: (at 47534) by debbugs.gnu.org; 1 Apr 2021 10:28:29 +0000 Original-Received: from localhost ([127.0.0.1]:56415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRuYv-0003HB-2x for submit@debbugs.gnu.org; Thu, 01 Apr 2021 06:28:29 -0400 Original-Received: from mail-vs1-f42.google.com ([209.85.217.42]:39530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRuYg-0003Gk-A4 for 47534@debbugs.gnu.org; Thu, 01 Apr 2021 06:28:28 -0400 Original-Received: by mail-vs1-f42.google.com with SMTP id e72so969664vsc.6 for <47534@debbugs.gnu.org>; Thu, 01 Apr 2021 03:28:14 -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=43z+Aj4GifL1O+OGBLR+dhVLxb9S+wJnQHbOp3gHeM4=; b=fa9Q89eDcopSDU15ZRdEpdCwQz4Dcu9xBCs3cqCWrHyf0wMp4aWMJ7MH6UiI/qsjwE uWQNG79lkHL2SeSnJd92CG2DHlujJwz6zuqJpFteqfYxNWLCrjX9dduSfT41gXnbLiU3 xvJ8ZU+K4T74oY2RsXonaBCBaLFvkEI2SZGrKtID6rqRLYNGnGf+P6FcaqUrSaPCoxgR 8N/47z3Mvak5y9a6ebDj7WAfHK9OdRjHa8p3vtjEAeCFt4cTipWulmY+foQEDRgi7ZQc r6KwahCG7ODdZcgwJgU4Lmv3vctpZtBNEwhHZobuDbo0vKoSAT0mFkx2VQX9H7YuYZK7 M1sw== 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=43z+Aj4GifL1O+OGBLR+dhVLxb9S+wJnQHbOp3gHeM4=; b=aeTf2qKNDaFsodq5egjn3MxAlIsu55R4vRsU4++wWqj4hfaVAUt3ewUVgpq5ZhruHK liKXzEVI4CtmXb/FzErHGk0MhzS38yUYoKuKDyxQXtUrapFa7kz88ZPz9gfxYIoiCYZ1 ET/hJEw0s/5xukRjkc1cKrH/HMziZNfJtjBfgX365if2c7KIgAXDdAWc4E+2uju0TwcI OVpZ44Eeor4qlwkhlwXkKdU7doh9o1FXcuY88QENtdO3INgTpVo4rI4B/E41Vitd4ly9 eucrUiu83caVMX5bFZAyqL5gdcJSJaUNKzndF2AbQglN2+SObL3hapcokYNNxhk9slxH MPqg== X-Gm-Message-State: AOAM5300qo8lQmwV0VjnfyCGG2kjhr5J+rr+5Wc1szqJ+/ibWA26hleL uOIKW0wdfx0/h8wafmHiHV7f81N08uGjECoXNe2d0fUHbLM= X-Google-Smtp-Source: ABdhPJy5NmYrP5kaZ0YuIbS+EltjY0GRJEaUnoLQ93VSApC3hkoeKKOGV1377qKLMoBqXDXglg7AH3G+85sR1iSV2Tw= X-Received: by 2002:a67:324a:: with SMTP id y71mr4178811vsy.41.1617272889048; Thu, 01 Apr 2021 03:28:09 -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:203419 Archived-At: --0000000000000e998105bee6b0f2 Content-Type: multipart/alternative; boundary="0000000000000e997d05bee6b0f0" --0000000000000e997d05bee6b0f0 Content-Type: text/plain; charset="UTF-8" And here is a small patch for the docs On Thu, 1 Apr 2021 at 12:27, dalanicolai wrote: > 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 >>> >> --0000000000000e997d05bee6b0f0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
And here is a small patch for the docs

On Thu, 1 Apr 20= 21 at 12:27, dalanicolai <dalan= icolai@gmail.com> wrote:
Here is a small patch for the re-builder d= ocstring. I hope I did things correctly...

On Thu, 1 Apr 2021 at 10:12, = dalanicolai <= dalanicolai@gmail.com> wrote:
Ah thanks. I thought I used case= sensitive replace-regexp before, but probably I am mistaking then. Section= "34.3 Regular Expressions"=C2=A0 of the Emacs manual states that= "[a-z]" or "[:lower:]" should match only lower case, w= hile 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. Contovo= unesios <contovob@t= cd.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
--0000000000000e997d05bee6b0f0-- --0000000000000e998105bee6b0f2 Content-Type: application/octet-stream; name=improve-regexp-doc-add-note-case-sensitive Content-Disposition: attachment; filename=improve-regexp-doc-add-note-case-sensitive Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kmyqi3s70 ZGlmZiAtLWdpdCBhL2RvYy9saXNwcmVmL3NlYXJjaGluZy50ZXhpIGIvZG9jL2xpc3ByZWYvc2Vh cmNoaW5nLnRleGkKaW5kZXggMTZhOGU1NmU5MC4uMDViODFmMGNkMSAxMDA2NDQKLS0tIGEvZG9j L2xpc3ByZWYvc2VhcmNoaW5nLnRleGkKKysrIGIvZG9jL2xpc3ByZWYvc2VhcmNoaW5nLnRleGkK QEAgLTIzOSw3ICsyMzksNyBAQCBUaGlzIHZhcmlhYmxlIGlzIHVzZWQgYnkgcGFzc2luZyBpdCBh cyBhbiBhcmd1bWVudCB0byB0aGUgZnVuY3Rpb24KICAgQSBAZGZue3JlZ3VsYXIgZXhwcmVzc2lv bn0sIG9yIEBkZm57cmVnZXhwfSBmb3Igc2hvcnQsIGlzIGEgcGF0dGVybiB0aGF0CiBkZW5vdGVz IGEgKHBvc3NpYmx5IGluZmluaXRlKSBzZXQgb2Ygc3RyaW5ncy4gIFNlYXJjaGluZyBmb3IgbWF0 Y2hlcyBmb3IKIGEgcmVnZXhwIGlzIGEgdmVyeSBwb3dlcmZ1bCBvcGVyYXRpb24uICBUaGlzIHNl Y3Rpb24gZXhwbGFpbnMgaG93IHRvIHdyaXRlCi1yZWdleHBzOyB0aGUgZm9sbG93aW5nIHNlY3Rp b24gc2F5cyBob3cgdG8gc2VhcmNoIGZvciB0aGVtLgorcmVnZXhwczsgdGhlIGZvbGxvd2luZyBz ZWN0aW9uIHNheXMgaG93IHRvIHNlYXJjaCBmb3IgdGhlbS4gQnkgZGVmYXVsd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