all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: "a_subscriber" <a_subscriber@mail.ru>
Cc: 36871@debbugs.gnu.org
Subject: bug#36871: 26.1; I-search-toggle-csse-fold
Date: Wed, 31 Jul 2019 20:05:36 -0400	[thread overview]
Message-ID: <87k1bxu4vj.fsf@gmail.com> (raw)
In-Reply-To: <004b01d547b3$0cdb14a0$26913de0$@mail.ru> (a. subscriber's message of "Wed, 31 Jul 2019 18:17:20 +0300")

retitle 36871 isearch-toggle-case-fold outside of isearch causes unexpected fontification
tags 36871 = confirmed
severity 36871 minor
quit

"a_subscriber" <a_subscriber@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)






  reply	other threads:[~2019-08-01  0:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31  7:55 bug#36871: 26.1; I-search-toggle-csse-fold a_subscriber
2019-07-31 14:07 ` Eli Zaretskii
2019-07-31 14:11   ` Noam Postavsky
2019-07-31 14:56     ` Eli Zaretskii
2019-07-31 14:59       ` a_subscriber
2019-07-31 15:17       ` a_subscriber
2019-08-01  0:05         ` Noam Postavsky [this message]
2019-08-01 11:13           ` a_subscriber
2019-08-02  6:36             ` Eli Zaretskii
2019-08-03  2:54               ` Noam Postavsky
2019-08-03  7:00                 ` Eli Zaretskii
2019-08-03 21:05           ` Juri Linkov
2019-08-04 20:46             ` Juri Linkov
2019-08-04 20:53               ` Noam Postavsky
2019-08-05 20:39                 ` Juri Linkov
2019-07-31 15:34     ` Drew Adams

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=87k1bxu4vj.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=36871@debbugs.gnu.org \
    --cc=a_subscriber@mail.ru \
    /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.