From unknown Thu Sep 11 11:55:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#29254 <29254@debbugs.gnu.org> To: bug#29254 <29254@debbugs.gnu.org> Subject: Status: 24.4; Unexpected case-folding in occur when case-fold-search set Reply-To: bug#29254 <29254@debbugs.gnu.org> Date: Thu, 11 Sep 2025 18:55:12 +0000 retitle 29254 24.4; Unexpected case-folding in occur when case-fold-search = set reassign 29254 emacs submitter 29254 Fran Burstall severity 29254 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 10 15:10:54 2017 Received: (at submit) by debbugs.gnu.org; 10 Nov 2017 20:10:54 +0000 Received: from localhost ([127.0.0.1]:34456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDFde-0004uA-6Q for submit@debbugs.gnu.org; Fri, 10 Nov 2017 15:10:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDFdc-0004tx-4m for submit@debbugs.gnu.org; Fri, 10 Nov 2017 15:10:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDFdV-0005pE-PJ for submit@debbugs.gnu.org; Fri, 10 Nov 2017 15:10:46 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_50,DRUGS_MUSCLE, FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44122) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eDFdV-0005p6-Lc for submit@debbugs.gnu.org; Fri, 10 Nov 2017 15:10:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDFdU-0004jL-D1 for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2017 15:10:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDFdQ-0005nI-Bc for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2017 15:10:44 -0500 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:39610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDFdQ-0005mt-58 for bug-gnu-emacs@gnu.org; Fri, 10 Nov 2017 15:10:40 -0500 Received: by mail-wm0-x232.google.com with SMTP id b189so4837081wmd.4 for ; Fri, 10 Nov 2017 12:10:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=o60bLnkecXNoHiuMHoOAVa2afMfSqz5Q96oitLKydYo=; b=eMv/zxzsh8wJQFa7Mg2E34rH7h5VINp2eduAb4v6QPXFj71MJjJfehJfEIRzkg8nmB TPdPDqSpRYhLOadQVGM+lP8svA1gOjkZh2pBEmXb12XHoviVgh3zVpXryABp6NFor6EJ X1dB/qAbOZUn8bAwI+DYHjvlX+J78pbG3zpSk4vrxkiPfoRH+jfdTaSWZyrnUndMbgE3 kFV+TRI1mBjg+8uusaSWBZwN5sWxosTAivQpDb11KKcW1+KO5u1PZHF+lP181Ty+mCLq SVcC8aaSw2kDrqFhCDGgYp6CWiXT5lTDy7esmhzWWzP/i07rYsR3S/ytjiWRMGE9Es64 0+RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=o60bLnkecXNoHiuMHoOAVa2afMfSqz5Q96oitLKydYo=; b=KfU/+hJQ3R2Pl1+WpDfYE0DmFK3w6GthzFgS1YdUT1d1tgapH3fPiiL76zJqgLgFoy FL2s9Bq4w13r82GOj5rS1Y+am+FN66E/i1XqIS6R78Y/OH6HLcbujDPXud2pBpTJCMdE UWhq2YgDyyNxSJqhFss0UZnBP+5cw7vR8Lr7oywLGhkkiltwCbcARqdLxWAakUX3qbXn p8AwkhYpIrpTqnNZWD8nuxfO+U0pcUkBRh4/dpRyFpYizlLl45sU3tKG1FG+i2+if8gQ qdD+dh1d5BimBuViQn9xr2X6we0YCurDoK8TeBzF6zM6QTjEdQZb8V+W2kvtIR6F+oa2 lPRg== X-Gm-Message-State: AJaThX7iPf5oHJNKlkbt5m2EV7Q2Q60nPAd/gg1+OorYXFJNVrd6dwRW gtVftyiQhZ0a05bR4GEPrl8+UFLV X-Google-Smtp-Source: AGs4zMaOqF220xKg7gHF/1W444uRoTMMuzSe5JJswqaltiTJeMU0adNghIv1QjYgZ/mAb8BL3jGiew== X-Received: by 10.28.13.15 with SMTP id 15mr1111853wmn.72.1510344638214; Fri, 10 Nov 2017 12:10:38 -0800 (PST) Received: from darboux (177.23.6.51.dyn.plus.net. [51.6.23.177]) by smtp.gmail.com with ESMTPSA id o190sm2079495wmd.32.2017.11.10.12.10.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 12:10:36 -0800 (PST) From: Fran Burstall To: bug-gnu-emacs@gnu.org Subject: 24.4; Unexpected case-folding in occur when case-fold-search set Date: Fri, 10 Nov 2017 20:10:35 +0000 Message-ID: <87tvy151z8.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.5 (-) >From emacs -Q: Put the following text in a buffer: MA ma MA ma Do M-x set-variable to set case-fold-search to t (buffer-locally). Do M-s o to call occur with regexp "MA". I expect: 2 lines in the *Occur* buffer matching the MA lines I get: 4 lines matching all occurrences of the string regardless of case. I get the expected (documented) behaviour if I do not explicitly set case-fold-search to t. Commentary: the problem is in occur-engine. This correctly sets case-fold-search to nil at the start of the function but that seems to get overridden by the time the actual search happens inside the with-current-buffer clause. Some weird scope thing with buffer-local variables? ---Fran In GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) of 2017-09-12 on hullmann, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11604000 System Description: LMDE 2 Betsy Configured using: `configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro' Important settings: value of $LANG: en_GB.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-h v c a s e - f o l d - s e M A m a M A m a M-s o M A M-x s e t - v a r i a b l e c a s e - f o l d - s e a r t M-s o M-x r e p o r t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Type C-x 1 to delete the help window. Searched 1 buffer; 2 matches for `MA' Searched 1 buffer; 4 matches for `MA' Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cus-edit wid-edit cl-loaddefs cl-lib cus-start cus-load help-mode easymenu help-fns time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 91794 4676) (symbols 48 19365 0) (miscs 40 46 124) (strings 32 13753 3607) (string-bytes 1 373062) (vectors 16 10107) (vector-slots 8 393223 8222) (floats 8 73 294) (intervals 56 261 19) (buffers 960 13) (heap 1024 23656 1037)) To: Subject: --text follows this line-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 18 06:08:03 2017 Received: (at 29254-done) by debbugs.gnu.org; 18 Nov 2017 11:08:03 +0000 Received: from localhost ([127.0.0.1]:45578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eG0yh-0001YV-1R for submit@debbugs.gnu.org; Sat, 18 Nov 2017 06:08:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eG0yf-0001Y2-Oo for 29254-done@debbugs.gnu.org; Sat, 18 Nov 2017 06:08:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eG0yX-00087p-Ck for 29254-done@debbugs.gnu.org; Sat, 18 Nov 2017 06:07:56 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eG0yX-00087b-9f; Sat, 18 Nov 2017 06:07:53 -0500 Received: from [176.228.60.248] (port=4624 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eG0yV-0005cX-At; Sat, 18 Nov 2017 06:07:52 -0500 Date: Sat, 18 Nov 2017 13:07:38 +0200 Message-Id: <83tvxrg805.fsf@gnu.org> From: Eli Zaretskii To: Fran Burstall In-reply-to: <87tvy151z8.fsf@gmail.com> (message from Fran Burstall on Fri, 10 Nov 2017 20:10:35 +0000) Subject: Re: bug#29254: 24.4; Unexpected case-folding in occur when case-fold-search set References: <87tvy151z8.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29254-done Cc: 29254-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Fran Burstall > Date: Fri, 10 Nov 2017 20:10:35 +0000 > > > >From emacs -Q: > > Put the following text in a buffer: > > MA > ma > MA > ma > > Do M-x set-variable to set case-fold-search to t (buffer-locally). > > Do M-s o to call occur with regexp "MA". > > I expect: 2 lines in the *Occur* buffer matching the MA lines > > I get: 4 lines matching all occurrences of the string > regardless of case. Thanks, fixed on the emacs-26 release branch. From unknown Thu Sep 11 11:55:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 16 Dec 2017 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator