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 <m...@nicolasgoaziou.fr> writes:

> Hello,
>
> Matt Lundin <m...@imapmail.org> writes:
>
>> alain.coch...@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

Reply via email to