From: Alain.Cochard@unistra.fr
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org, Alain.Cochard@unistra.fr
Subject: Re: How to use case sensitive org-search-view?
Date: Wed, 15 Nov 2017 11:49:28 +0100 [thread overview]
Message-ID: <23052.7096.615405.647000@frac.u-strasbg.fr> (raw)
In-Reply-To: <87shdgzjhx.fsf@nicolasgoaziou.fr>
Nicolas Goaziou writes on Tue 14 Nov 2017 21:35:
> Matt Lundin <mdl@imapmail.org> writes:
>
> > Alain.Cochard@unistra.fr writes:
> >> 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.
> >> [...]
> >> 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'.
Thanks for pointing this out. But boy is it complicated:
I have:
org-occur-case-fold-search is a variable defined in `org.el'.
Its value is t
Documentation:
Non-nil means `org-occur' should be case-insensitive.
If set to `smart' the search will be case-insensitive only if it
doesn't specify any upper case character.
and indeed, if I use
M-x org-occur <RET> FOO
in my FOO/foo buffer, both instances are found.
But it does not seem to apply to multi-occur, which 'C-c a /' is said
to use: both 'C-c a /' and 'M-x multi-occur' for 'FOO' only list
'FOO'...
> 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?
From my (user) point of view, I would expect that what is supposed to
be a regexp behaves like a regexp, and in a consistent way for all
cases (with 'C-c a s', when filtering with
org-agenda-filter-by-regexp, etc.). I would even expect a regexp
search within an Org buffer to behave exactly like a regexp search
within a plain emacs buffer, but I would understand if this not
reasonable to ask for.
Regards,
a.
PS: in the org-occur docstring:
org-occur is an interactive compiled Lisp function in `org.el'.
(org-occur REGEXP &optional KEEP-PREVIOUS CALLBACK)
Make a compact tree which shows all matches of REGEXP.
The tree will show the lines where the regexp matches, and any
other context defined in `org-show-context-detail', which see.
the last sentence above looks grammatically/syntactically funny to me.
Maybe this is because of my insufficient level in English -- I just
don't understand what "which see" is supposed to mean. If the English
is indeed correct, maybe a reformulation would be in order, for the
sake of non native people.
--
EOST (École et Observatoire des Sciences de la Terre)
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | Fax: +33 (0)3 68 85 01 25
next prev parent reply other threads:[~2017-11-15 10:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 14:04 Confused about the explanation for 'org-cycle' Alain.Cochard
2017-09-19 5:08 ` Matt Lundin
2017-09-20 10:57 ` Nicolas Goaziou
2017-09-26 8:54 ` Alain.Cochard
2017-09-26 10:41 ` Nicolas Goaziou
2017-09-26 12:48 ` Alain.Cochard
2017-09-28 13:44 ` org-list-empty-line-terminates-plain-lists removed but still mentioned in the manual Alain.Cochard
2017-09-28 14:07 ` Nicolas Goaziou
2017-09-28 14:31 ` Confused about the explanation for 'org-cycle' Nicolas Goaziou
2017-09-28 15:29 ` Robert Horn
2017-09-28 16:10 ` Kyle Meyer
2017-09-28 16:17 ` Eric S Fraga
2017-09-28 21:04 ` Alain.Cochard
2017-09-28 21:22 ` Josiah Schwab
2017-09-28 21:30 ` Nicolas Goaziou
2017-10-05 8:17 ` Alain.Cochard
2017-11-10 17:23 ` How to use case sensitive org-search-view? Alain.Cochard
2017-11-14 14:26 ` Matt Lundin
2017-11-14 15:30 ` Alain.Cochard
2017-11-14 20:35 ` Nicolas Goaziou
2017-11-14 20:55 ` Tim Cross
2017-11-15 14:02 ` Nicolas Goaziou
2017-11-15 21:14 ` Tim Cross
2017-11-16 10:05 ` Alain.Cochard
2017-11-15 10:49 ` Alain.Cochard [this message]
2017-11-15 11:55 ` Nicolas Goaziou
2017-11-15 12:35 ` Alain.Cochard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23052.7096.615405.647000@frac.u-strasbg.fr \
--to=alain.cochard@unistra.fr \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.