From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: How to use case sensitive org-search-view? Date: Wed, 15 Nov 2017 07:55:55 +1100 Message-ID: <87a7zok2as.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEiFb-0007B2-11 for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 15:56:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEiFZ-0001YU-V9 for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 15:56:06 -0500 Received: from mail-pf0-x231.google.com ([2607:f8b0:400e:c00::231]:46453) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEiFZ-0001X0-PO for emacs-orgmode@gnu.org; Tue, 14 Nov 2017 15:56:05 -0500 Received: by mail-pf0-x231.google.com with SMTP id i15so4975476pfa.3 for ; Tue, 14 Nov 2017 12:56:05 -0800 (PST) In-reply-to: <87shdgzjhx.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org, Alain.Cochard@unistra.fr my 2 cents would vote for a variable which manages case folding. This would be in-line with how isearch works and something familiar to most Emacs users. I also prefer a single function which behaves differently depending on a config variable setting over separate functions as I think it makes key binding easier (though admittedly, it is trivial to define a lambda which selects between different functions depending on the setting of a config variable or prefix arg etc ). Tim Nicolas Goaziou writes: > 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, -- Tim Cross