From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: How to use case sensitive org-search-view? Date: Wed, 15 Nov 2017 12:55:20 +0100 Message-ID: <871skzzrh3.fsf@nicolasgoaziou.fr> References: <22975.53875.671661.416361@frac.u-strasbg.fr> <874lrzl1gr.fsf@fastmail.fm> <87lgl963jf.fsf@nicolasgoaziou.fr> <22986.5564.583945.909910@frac.u-strasbg.fr> <877ewl4u8s.fsf@nicolasgoaziou.fr> <22986.19586.309718.302611@frac.u-strasbg.fr> <87h8vmopww.fsf@nicolasgoaziou.fr> <22989.25593.198323.807112@frac.u-strasbg.fr> <87k20imrzb.fsf@nicolasgoaziou.fr> <22997.60031.814843.407658@frac.u-strasbg.fr> <23045.57473.573321.290325@frac.u-strasbg.fr> <87efp1vsuq.fsf@fastmail.fm> <87shdgzjhx.fsf@nicolasgoaziou.fr> <23052.7096.615405.647000@frac.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEwHv-00055S-Jf for emacs-orgmode@gnu.org; Wed, 15 Nov 2017 06:55:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEwHu-0002QH-G7 for emacs-orgmode@gnu.org; Wed, 15 Nov 2017 06:55:27 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:46393) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eEwHu-0002PE-98 for emacs-orgmode@gnu.org; Wed, 15 Nov 2017 06:55:26 -0500 In-Reply-To: <23052.7096.615405.647000@frac.u-strasbg.fr> (Alain Cochard's message of "Wed, 15 Nov 2017 11:49:28 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Alain.Cochard@unistra.fr Cc: emacs-orgmode@gnu.org Hello, Alain.Cochard@unistra.fr writes: > Thanks for pointing this out. But boy is it complicated: It is not. It follows regular isearch in Emacs. Quoting Emacs manual: An upper-case letter anywhere in the search string makes the search case-sensitive. Thus, searching for =E2=80=98Foo=E2=80=99 does not fin= d =E2=80=98foo=E2=80=99 or =E2=80=98FOO=E2=80=99. This applies to regular expression search as well as to literal string search. The effect ceases if you delete the upper-case letter from the search string. The variable =E2=80=98search-upper-case=E2=80=99 contro= ls this: if it is non-=E2=80=98nil=E2=80=99 (the default), an upper-case character in the= search string make the search case-sensitive; setting it to =E2=80=98nil=E2=80=99 dis= ables this effect of upper-case characters. > But it does not seem to apply to multi-occur, which 'C-c a /' is said > to use: both 'C-c a /' and 'M-x multi-occur' for 'FOO' only list > 'FOO'... Then it is an issues in Emacs, not in Org specifically. Indeed, multi-occur's docstrings is Show all lines in buffers BUFS containing a match for REGEXP. This function acts on multiple buffers; otherwise, it is exactly like =E2=80=98occur=E2=80=99. and occur's is If REGEXP contains upper case characters (excluding those preceded by = =E2=80=98\=E2=80=99) and =E2=80=98search-upper-case=E2=80=99 is non-nil, the matching is cas= e-sensitive. > From my (user) point of view, I would expect that what is supposed to > be a regexp behaves like a regexp, and in a consistent way for all > cases (with 'C-c a s', when filtering with > org-agenda-filter-by-regexp, etc.). This is why `org-occur-case-fold-search' is a defcustom. If you set it to nil, your search obeys to your regexp. > PS: in the org-occur docstring: [...] > The tree will show the lines where the regexp matches, and any > other context defined in `org-show-context-detail', which see. > > the last sentence above looks grammatically/syntactically funny to me. This is an Emacs idiom. You find it here and there in its manual and some docstrings. See for a related discussion in another package. Regards, --=20 Nicolas Goaziou