From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#33446: 26; `isearch-lazy-highlight-update' in MASTER today Date: Tue, 20 Nov 2018 15:47:53 -0800 (PST) Message-ID: <064c334d-cfd8-4610-a320-2d4ca68b437b@default> References: <2c20f006-c54f-423e-ad4e-f1208f3fa179@default> <87h8gb5owm.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1542757630 31267 195.159.176.226 (20 Nov 2018 23:47:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Nov 2018 23:47:10 +0000 (UTC) Cc: 33446@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 21 00:47:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPFjV-00083i-L1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Nov 2018 00:47:05 +0100 Original-Received: from localhost ([::1]:36546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPFlc-0002b4-8S for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Nov 2018 18:49:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPFlW-0002az-5P for bug-gnu-emacs@gnu.org; Tue, 20 Nov 2018 18:49:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPFlR-0002qP-7k for bug-gnu-emacs@gnu.org; Tue, 20 Nov 2018 18:49:10 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPFlO-0002nD-7F for bug-gnu-emacs@gnu.org; Tue, 20 Nov 2018 18:49:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gPFlO-0004eC-4P for bug-gnu-emacs@gnu.org; Tue, 20 Nov 2018 18:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Nov 2018 23:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33446 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33446-submit@debbugs.gnu.org id=B33446.154275768717798 (code B ref 33446); Tue, 20 Nov 2018 23:49:02 +0000 Original-Received: (at 33446) by debbugs.gnu.org; 20 Nov 2018 23:48:07 +0000 Original-Received: from localhost ([127.0.0.1]:37578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPFkU-0004d0-TJ for submit@debbugs.gnu.org; Tue, 20 Nov 2018 18:48:07 -0500 Original-Received: from userp2120.oracle.com ([156.151.31.85]:49474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPFkT-0004cX-R3 for 33446@debbugs.gnu.org; Tue, 20 Nov 2018 18:48:06 -0500 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAKNhfn6190109; Tue, 20 Nov 2018 23:47:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=y9q5rayAuHpt92e6vRgXiHNpwISp0oBIBFPXVe6rN4E=; b=IhTpphhskUjw4ElBboo0EzYXUfGIGCW4/pwxNehLJU+qyBBLY8jmNakchdM3DVlhlHPr AAxyVV6j8gjh7qWvzbO69ZS5jj7/HIcD7CqfnNi5Ast+S5NA7mRARpJfoNafoJ2d2Imm n+qK8y/5TXwh6kkZl0LqnSF7AKHjtXKlgxH7zvlvWj26kiGAnLY6A9sEcrmY865u+ST9 eqM5S1YWZqzX9hf6Te6FDj51wXrVNkircTf8un8Djpm/K493aN9Y/nBzlC5AOGXqGsNA 5hE2R8tpbOvMHaznYS4/MmfUkXAlQUqEhBOuuIu6US3OHlFlTv0+x/oOCSGYGdmPeJ/z RQ== Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2ntbmqpmdc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Nov 2018 23:47:59 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wAKNlsSj026181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Nov 2018 23:47:54 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wAKNlse3012903; Tue, 20 Nov 2018 23:47:54 GMT In-Reply-To: <87h8gb5owm.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4771.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9083 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=588 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811200209 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: 208.118.235.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:152603 Archived-At: > > The proximate cause of the error was likely due to > > my calling `isearch-lazy-highlight-update' outside > > searching (i.e., nil `isearch-mode'). But I think > > there might still be a bug in the Isearch code. >=20 > isearch-lazy-highlight-update is not intended > to be used in a window other than the window > where isearch-lazy-highlight-new-loop was called. > It has many dependencies on the original window > being selected. Yes, I guessed that finally. Beyond that, I think it's not intended to be invoked outside of search (i.e., when `isearch-mode' is nil). That was my mistake: invoking it in a command that can be used during Isearch or not. I know that wasn't intended as part of the Isearch design. Now I test for it and avoid calling `i-l-h-u'. (But it might not hurt for `i-l-h-u' itself to test and do nothing if `isearch-mode' is nil. I'm not requesting that, however.) > > The `isearch-lazy-highlight-update' code does this: > > > > (save-selected-window > > (if (and (window-live-p isearch-lazy-highlight-window) > > (not (memq (selected-window) > > isearch-lazy-highlight-window-group))) > > (select-window isearch-lazy-highlight-window)) > > > > That causes the window in the other frame to be selected. >=20 > It should select the same window where > isearch-lazy-highlight-new-loop was called. Which assumes it was called ;-) _and_ that we are still within Isearch. > > The code then does this: > > > > (setq window-start (window-group-start)) > > (setq window-end (window-group-end)) > > > > This causes `window-end' to be nil. Should `window-group-*' here > > be passed window `isearch-lazy-highlight-window'? >=20 > isearch-lazy-highlight-window should not be passed here > because it's guaranteed to be selected by the code above. OK (but see above). Feel free to close this bug, if you like. It's not clear to me whether any code change is needed.