|
From: | Dmitry Gutov |
Subject: | bug#40940: 27.0.91; project-query-replace-regexp stops too early |
Date: | Sat, 2 May 2020 02:21:57 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 01.05.2020 18:45, Eli Zaretskii wrote:
Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org From: Dmitry Gutov <dgutov@yandex.ru> Date: Fri, 1 May 2020 18:27:45 +0300 On 01.05.2020 09:57, Eli Zaretskii wrote:I see no reference to either case-fold-search or case-fold in isearch-no-upper-case-p. So why would we need to update its doc string?Sorry if that was unclear: I think we'd need to update the docstring of fileloop-initialize-replace. Which doesn't offer any hints that the logic of isearch-no-upper-case-p will be employed.Ah, okay. Agreed.
Should I leave that to you? At least the "updated docstring" part.
Does that really work in the case in point? Unless I'm missing something, if case-fold-search is t by default, this patch would cause the search to be case-insensitive even if the FROM regexp includes upper-case characters. But in that case, perform-replace will internally decide to be case-sensitive, and we have the same failure on our hands. This is why the patch I proposed explicitly examined the FROM regexp for upper-case characters. Whereas yours doesn't.Since we bind search-upper-case to nil in this patch, perform-replace won't try to alter the value of case-fold-search internally.But that's contrary to how query-replace works, isn't it?
I suppose. But query-replace documents that aspects of its behavior: Matching is independent of case if `case-fold-search' is non-nil and FROM-STRING has no uppercase letters. Though it doesn't mention the search-upper-case variable.
[Prev in Thread] | Current Thread | [Next in Thread] |