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:30:39 +0200 Message-ID: References: <87blaz0xmm.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ad88b105bee6b9bd" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15006"; 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:36:37 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 1lRugn-0003k5-7P for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 12:36:37 +0200 Original-Received: from localhost ([::1]:44366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRugl-0005ZK-Ov for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Apr 2021 06:36:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRubQ-0000Jg-OS for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 06:31:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRubO-0004eN-1N for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 06:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRubN-0003MV-VK for bug-gnu-emacs@gnu.org; Thu, 01 Apr 2021 06:31:01 -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:31: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.161727305812914 (code B ref 47534); Thu, 01 Apr 2021 10:31:01 +0000 Original-Received: (at 47534) by debbugs.gnu.org; 1 Apr 2021 10:30:58 +0000 Original-Received: from localhost ([127.0.0.1]:56419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRubJ-0003ME-Qh for submit@debbugs.gnu.org; Thu, 01 Apr 2021 06:30:58 -0400 Original-Received: from mail-vs1-f46.google.com ([209.85.217.46]:35395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRubH-0003M0-RW for 47534@debbugs.gnu.org; Thu, 01 Apr 2021 06:30:56 -0400 Original-Received: by mail-vs1-f46.google.com with SMTP id h11so987693vsl.2 for <47534@debbugs.gnu.org>; Thu, 01 Apr 2021 03:30:55 -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=gm25PesaGT5RWJ3zzm4E4MQM84oQms7icq8L6Hz9Gn8=; b=kqxjEMroys88fmlrneN6Rd3HwsfempY4skCEitSPJwYPAWPXoRR5OvJ7gvWwfA6W1K F1x0WTEdB7iELIE+CQpPJWZm19VefUXlhfzQvEmy9IAMCiwG9vPfyJjoHXMSt69sSWtb 1IoJrKdxYkTrKVHXQFwPV8IABFzhfKjfClfR++ZX+sWW88US4+u6eQ/ZjL8Pus52xY4z i+RGF2F8xNH5Wci2VxtmQ6j4mFXbZh+IMfWmNqaWaA5+0TLL9YqVMzCF2YlKMA6Uh3tW +rMeJqiFZZ/fGXuiID1k4iyQOZQspV+rf0FmWpY8DKx1/Xzp3Bb0UloXw5jrb99OCpcy xpxA== 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=gm25PesaGT5RWJ3zzm4E4MQM84oQms7icq8L6Hz9Gn8=; b=J6DnNjIOHG0V1HN8fFxVFWX68hDZ4FJpOkYFesQEIOZ2viH4ljqWRPngT57kXigjsU L8S+aicsdCg9QeNhAjr44I8rDXp7K78+50SHbsIV8mOilAW/nTQKxmpdqx8RIxe5nVKn bbVh81DE40m89YELKkpTac/bicGL5+FQqqmOQdPOy/pJpl3xE2f+AUgKs5wcTM+Ee+7f O1ym0ayVC+B4er3tDWGyp/j5h8ae/aVCD4jUIedYQlngnDlrcPrxUSA53ZNjzVqw6m0W bdgJGUZHHZhlE1D+ZAhj7Zu6DuCEp7hdWyzGtobvRtmRjKbQ5hJr1+/zb6LxYTenYEjT WQwQ== X-Gm-Message-State: AOAM530hgWrYe3J9V4/nDg5ynzocA4uyAABdqu+Yx43KK9kWe9tzAFD+ 2BHefIMIEHj1OCTIsRzzjwqokrnhw2Vs5wDh8pk= X-Google-Smtp-Source: ABdhPJzexO/eOqD3PcqssmZstDMRSdPpwMUFY4wyVjrHF+rihVqDbL6TESUmpbBhhTND4QxdYgC0c46OcejoPoqAUUg= X-Received: by 2002:a67:e056:: with SMTP id n22mr4362311vsl.0.1617273050465; Thu, 01 Apr 2021 03:30:50 -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:203420 Archived-At: --000000000000ad88b105bee6b9bd Content-Type: text/plain; charset="UTF-8" Of course any feedback on the code (well... text) or my workflow is very welcome. On Thu, 1 Apr 2021 at 12:27, dalanicolai wrote: > 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 >>>> >>> --000000000000ad88b105bee6b9bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Of course any feedback on the code (well... text)=C2=A0 or= my workflow is very welcome.

On Thu, 1 Apr 2021 at 12:27, dalanicolai &= lt;dalanicolai@gmail.com> w= rote:
And here is a small patch for the docs

On Thu, 1 Apr 2021 at 12= :27, dalanicolai <dalanicolai@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@gmail.com> wrote:
Ah thanks. I thought= I used case sensitive replace-regexp before, but probably I am mistaking t= hen. Section "34.3 Regular Expressions"=C2=A0 of the Emacs manual= states that "[a-z]" or "[:lower:]" should match only l= ower case, while it is not mentioned at all that it will not work by defaul= t (case-fold-search as well as reb-toggle-case and reb-change-syntax are no= t mentioned at all in that section as far as I can find). Indeed I was refe= rring to the docstring of re-builder. Anyway, I am happy to provide a patch= .



On Thu, 1 Apr 2021 at 00:25, Basi= l 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
--000000000000ad88b105bee6b9bd--