GNU bug report logs - #47534
Subject: 28.0.50; Regexp lower case pattern matches upper case

Previous Next

Package: emacs;

Reported by: dalanicolai <dalanicolai <at> gmail.com>

Date: Wed, 31 Mar 2021 21:59:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 47534 <at> debbugs.gnu.org (full text, mbox):

From: dalanicolai <dalanicolai <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 47534 <at> debbugs.gnu.org
Subject: Re: bug#47534: Subject: 28.0.50; Regexp lower case pattern matches
 upper case
Date: Thu, 1 Apr 2021 12:27:58 +0200
[Message part 1 (text/plain, inline)]
And here is a small patch for the docs

On Thu, 1 Apr 2021 at 12:27, dalanicolai <dalanicolai <at> gmail.com> 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 <dalanicolai <at> 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"  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 <contovob <at> tcd.ie>
>> wrote:
>>
>>> dalanicolai <dalanicolai <at> 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).  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
>>>
>>
[Message part 2 (text/html, inline)]
[improve-regexp-doc-add-note-case-sensitive (application/octet-stream, attachment)]

This bug report was last modified 4 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.