GNU bug report logs -
#36871
isearch-toggle-case-fold outside of isearch causes unexpected fontification
Previous Next
Reported by: "a_subscriber" <a_subscriber <at> mail.ru>
Date: Wed, 31 Jul 2019 08:03:03 UTC
Severity: minor
Tags: confirmed, fixed
Found in version 26.1
Fixed in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
So, is this e bug?
It will be fix in future version of Emacs?
-----Original Message-----
From: Noam Postavsky <npostavs <at> gmail.com>
Sent: Thursday, August 1, 2019 03:06
To: a_subscriber <a_subscriber <at> mail.ru>
Cc: 'Eli Zaretskii' <eliz <at> gnu.org>; 36871 <at> debbugs.gnu.org
Subject: Re: bug#36871: 26.1; I-search-toggle-csse-fold
retitle 36871 isearch-toggle-case-fold outside of isearch causes unexpected
fontification tags 36871 = confirmed severity 36871 minor quit
"a_subscriber" <a_subscriber <at> mail.ru> writes:
> 1. Start emacs -Q
> 2. Input some text (see step1.jpg)
> 3. M-x isearch-toggle-case-fold (see step2.jpg)
> 4. C-s (isearch) HELLO (see step3.jpg) 5. C-g 6. M-x
> isearch-toggle-case-fold 7. and see result on step4.jpg
Ah, it's not the region, it's highlighting from a not-quite-activated
isearch. The problem is that isearch-toggle-case-fold wasn't really
expected to be called outside of isearch. I think throwing an error in this
case makes sense (I tried also just avoiding the call to isearch-update when
isearch-mode is nil which does avoid the OP's problem, but the actual
toggling part doesn't work).
--- i/lisp/isearch.el
+++ w/lisp/isearch.el
@@ -1971,6 +1971,8 @@ isearch-define-mode-toggle
,(format "Toggle %s searching on or off.%s" mode
(if docstring (concat "\n" docstring) ""))
(interactive)
+ (unless isearch-mode
+ (user-error "isearch not active"))
,@(when function
`((setq isearch-regexp-function
(unless (eq isearch-regexp-function #',function)
This bug report was last modified 5 years and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.