From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#36871: 26.1; I-search-toggle-csse-fold Date: Wed, 31 Jul 2019 20:05:36 -0400 Message-ID: <87k1bxu4vj.fsf@gmail.com> References: <001201d54775$5ca376a0$15ea63e0$@mail.ru> <83lfwei9ft.fsf@gnu.org> <85o91a47l2.fsf@gmail.com> <83a7cui776.fsf@gnu.org> <004b01d547b3$0cdb14a0$26913de0$@mail.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="3655"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) Cc: 36871@debbugs.gnu.org To: "a_subscriber" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 01 02:06:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hsybh-0000kI-FR for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Aug 2019 02:06:09 +0200 Original-Received: from localhost ([::1]:45124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsybf-00055Y-Pc for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Jul 2019 20:06:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37034) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsybb-00055D-Md for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 20:06:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsyba-0004nF-O5 for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 20:06:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44441) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hsyba-0004nB-LV for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 20:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hsyba-0000oc-EN for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2019 20:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Aug 2019 00:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36871 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: unreproducible Original-Received: via spool by 36871-submit@debbugs.gnu.org id=B36871.15646179463113 (code B ref 36871); Thu, 01 Aug 2019 00:06:02 +0000 Original-Received: (at 36871) by debbugs.gnu.org; 1 Aug 2019 00:05:46 +0000 Original-Received: from localhost ([127.0.0.1]:53262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsybK-0000o3-BX for submit@debbugs.gnu.org; Wed, 31 Jul 2019 20:05:46 -0400 Original-Received: from mail-io1-f51.google.com ([209.85.166.51]:38334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsybH-0000nM-Q8; Wed, 31 Jul 2019 20:05:44 -0400 Original-Received: by mail-io1-f51.google.com with SMTP id j6so20520504ioa.5; Wed, 31 Jul 2019 17:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RfKib4qClPWXpus1Os1coN9a0xEnB5zxEsHA5O6PmbY=; b=bZGsXtWwsrvK2cbvz32TeiEftbzPloNTIe6QIL+DxpnrOeQmbkpklO6vFoLTZYtxSk sxF+n+eTvtEtfjPEFI10LvlqNg2XIBwRgLOXUaZFPBIFHzYNSpIihpf5og7GFWUXcGFK vLK5kCgWjTbxWrtWNViQml+XX13ybi7lkM56igLV1QpCUhfbSaTQdP0FA07Qjj42NqxV GP6ozaPJjT6HaRDFDDIYflpy4EKMo9QMYW2ylzs/xK4LX+NPnt8h+adJt7Db18VHpeWy LTzh1fL4aJMx4A7w79s3eb9VAcz0fkavBl0sym6TuEblo3MGpQXV8KJO+dhc+MezSkuk +BVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=RfKib4qClPWXpus1Os1coN9a0xEnB5zxEsHA5O6PmbY=; b=qvGxrVgNi/e3AsSycTOBz57gMJlQ7xd6L/Q9GFCbUumY+5zFTNg0lLoLEEiRtV9M0O ZXJK5tNJmhSp6wgMcSKApEdofddDikUEhLHa5Hfng3TkrIys1qW5CbCidvj/xpz0aND3 ckM8Zd5BwZ+ldsj6iL0773FJNXTMaQTuhvgEkh9+xK9t9Ju6YLSslJir+HUExd8ltg9Q n98QtsbW5CnBSYCLivuYlCUfcUoIjdwe+CHZPnohaUE3nGWIX8Qalg84/WL1T/OmigNt KvQOX0dHalaNbk7umjvI79RC2Wnid0Tq4/aActOWWMPOYYs0Vp8Km/JvICb+7EvT9LGw 5Qhw== X-Gm-Message-State: APjAAAXMn8DfJXECD0umOlRT4wj24fUwjlxVYrEqVKIV+cCA9nVS7x2L 7Ghg7uknwlf2G4qpRtTHAV3hlMCd X-Google-Smtp-Source: APXvYqxh+igOP+sfDlbyRCjK+d2BXyWmKgHPTuA6miG4OkJ+VN5qsp6L6jF85j8OLizuEP1nIrfJBg== X-Received: by 2002:a02:c95a:: with SMTP id u26mr123195584jao.15.1564617938099; Wed, 31 Jul 2019 17:05:38 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id d25sm57182370iom.52.2019.07.31.17.05.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Jul 2019 17:05:37 -0700 (PDT) In-Reply-To: <004b01d547b3$0cdb14a0$26913de0$@mail.ru> (a. subscriber's message of "Wed, 31 Jul 2019 18:17:20 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164196 Archived-At: retitle 36871 isearch-toggle-case-fold outside of isearch causes unexpected fontification tags 36871 = confirmed severity 36871 minor quit "a_subscriber" 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)