[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calling occur from within isearch
From: |
Johan Bockgård |
Subject: |
Re: Calling occur from within isearch |
Date: |
Fri, 23 Nov 2007 02:05:28 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) |
Juri Linkov <address@hidden> writes:
> + (let ((case-fold-search isearch-case-fold-search))
> + (if (and (eq case-fold-search t) search-upper-case)
> + (setq case-fold-search
> + (isearch-no-upper-case-p isearch-string isearch-regexp)))
> + (occur regexp nlines)))
> +
Occur already does the "upper-case implies case-sensitive" step. The
interesting case is where this should not be done--that is when the
search string is mixed case, and the user explicitly turns off
case-sensitivity with M-c (this is the situation where
isearch-case-fold-search is `yes').
So the idea is more like
;; Except that this doesn't really work, since occur doesn't care
;; about `search-upper-case'.
(let ((case-fold-search isearch-case-fold-search)
(search-upper-case nil))
(occur regexp nlines))
Maybe upper-case input should only have magic effects in
interactive calls.
(occur REGEXP &optional NLINES UPPER-CASE-IMPLIES-CASE-SENSITIVE)
--
Johan Bockgård
RE: Calling occur from within isearch, Drew Adams, 2007/11/21
Re: Calling occur from within isearch, Richard Stallman, 2007/11/22
Re: Calling occur from within isearch, Juri Linkov, 2007/11/22