emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to use case sensitive org-search-view?


From: Tim Cross
Subject: Re: [O] How to use case sensitive org-search-view?
Date: Wed, 15 Nov 2017 07:55:55 +1100
User-agent: mu4e 0.9.18; emacs 25.3.1

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 <address@hidden> writes:

> 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,


-- 
Tim Cross



reply via email to

[Prev in Thread] Current Thread [Next in Thread]