From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: How to use case sensitive org-search-view? Date: Tue, 14 Nov 2017 08:26:53 -0600 Message-ID: <87efp1vsuq.fsf@fastmail.fm> 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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEcB3-00056U-Ae for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 09:27:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEcAz-0003K8-Ba for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 09:27:01 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:54359) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eEcAy-0003Ig-WE for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 09:26:57 -0500 In-Reply-To: <23045.57473.573321.290325@frac.u-strasbg.fr> (Alain Cochard's message of "Fri, 10 Nov 2017 18:23:13 +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 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. Best, Matt