From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: How to use case sensitive org-search-view? Date: Tue, 14 Nov 2017 21:35:22 +0100 Message-ID: <87shdgzjhx.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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEhvd-0001Jw-8y for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 15:35:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEhvb-0006GV-Sy for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 15:35:29 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:42213) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eEhvb-0006FS-MV for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 15:35:27 -0500 In-Reply-To: <87efp1vsuq.fsf@fastmail.fm> (Matt Lundin's message of "Tue, 14 Nov 2017 08:26:53 -0600") 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, Matt Lundin writes: > Alain.Cochard@unistra.fr writes: > >> Hello. Sorry about this seemingly basic question, but I spent several >> hours (literally) googling and experimenting without any progress... >> >> Suppose I have an org file with >> >> * FOO * foo >> >> I would like to use org-search-view (C-c a s) so as to (say) list >> only the first entry. >> >> Among other things I tried using +FOO, +"FOO", +{FOO}, +{\bFOO\b}, >> with case-fold-search being t or nil, with several emacs+org >> versions, but each time it lists both headlines. >> >> Is there a way to perform what I want? > > Unfortunately, it looks like org-search-view is hard-coded to be > case-insensitive. I think a very hackish workaround would be to advise > org-search-view to create and then remove an "around" advice that > wraps re-search-forward in a "let" declaration setting > case-fold-search to nil. But this would be a fairly horrific hack. > > In the long run, I believe the Org Mode code would need to be changed > to make this customizable. Note that there is `org-occur-case-fold-search'. We could implement something similar with, e.g., `org-agenda-search-view-case-fold-search'. Or maybe use a variable for every search related function in Org: `org-case-fold-search'. WDYT? Regards, -- Nicolas Goaziou