From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Alain.Cochard@unistra.fr
Cc: emacs-orgmode@gnu.org
Subject: Re: How to use case sensitive org-search-view?
Date: Wed, 15 Nov 2017 12:55:20 +0100 [thread overview]
Message-ID: <871skzzrh3.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <23052.7096.615405.647000@frac.u-strasbg.fr> (Alain Cochard's message of "Wed, 15 Nov 2017 11:49:28 +0100")
Hello,
Alain.Cochard@unistra.fr writes:
> Thanks for pointing this out. But boy is it complicated:
It is not. It follows regular isearch in Emacs. Quoting Emacs manual:
An upper-case letter anywhere in the search string makes the search
case-sensitive. Thus, searching for ‘Foo’ does not find ‘foo’ or ‘FOO’.
This applies to regular expression search as well as to literal string
search. The effect ceases if you delete the upper-case letter from the
search string. The variable ‘search-upper-case’ controls this: if it is
non-‘nil’ (the default), an upper-case character in the search string
make the search case-sensitive; setting it to ‘nil’ disables this effect
of upper-case characters.
> 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'...
Then it is an issues in Emacs, not in Org specifically. Indeed,
multi-occur's docstrings is
Show all lines in buffers BUFS containing a match for REGEXP.
This function acts on multiple buffers; otherwise, it is exactly like
‘occur’.
and occur's is
If REGEXP contains upper case characters (excluding those preceded by ‘\’)
and ‘search-upper-case’ is non-nil, the matching is case-sensitive.
> 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.).
This is why `org-occur-case-fold-search' is a defcustom. If you set it
to nil, your search obeys to your regexp.
> PS: in the org-occur docstring:
[...]
> 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.
This is an Emacs idiom. You find it here and there in its manual and
some docstrings. See
<https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-10/msg00518.html>
for a related discussion in another package.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2017-11-15 11:55 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
2017-11-15 11:55 ` Nicolas Goaziou [this message]
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871skzzrh3.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=Alain.Cochard@unistra.fr \
--cc=emacs-orgmode@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).