[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How to use case sensitive org-search-view?
From: |
Nicolas Goaziou |
Subject: |
Re: [O] How to use case sensitive org-search-view? |
Date: |
Tue, 14 Nov 2017 21:35:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Matt Lundin <address@hidden> writes:
> address@hidden 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