From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#56662: 29.0.50; Funny region highlights when highlight-nonselected-windows is t Date: Wed, 20 Jul 2022 22:16:26 +0200 Message-ID: <871qufpmjp.fsf@gmail.com> References: <87bktk585s.fsf@gmail.com> <83wnc8klhw.fsf@gnu.org> <877d48550b.fsf@gmail.com> <83sfmwkl0y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12217"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56662@debbugs.gnu.org, Visuwesh To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 20 22:17:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEG89-00030a-Vu for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Jul 2022 22:17:14 +0200 Original-Received: from localhost ([::1]:41806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEG89-0000FN-0r for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Jul 2022 16:17:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEG7y-0000Ey-2u for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2022 16:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46365) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEG7x-0003aG-Qw for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2022 16:17:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oEG7x-0000vk-KB for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2022 16:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jul 2022 20:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56662 X-GNU-PR-Package: emacs Original-Received: via spool by 56662-submit@debbugs.gnu.org id=B56662.16583482003527 (code B ref 56662); Wed, 20 Jul 2022 20:17:01 +0000 Original-Received: (at 56662) by debbugs.gnu.org; 20 Jul 2022 20:16:40 +0000 Original-Received: from localhost ([127.0.0.1]:36112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEG7b-0000up-M9 for submit@debbugs.gnu.org; Wed, 20 Jul 2022 16:16:40 -0400 Original-Received: from mail-wm1-f42.google.com ([209.85.128.42]:37429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEG7W-0000uY-P3 for 56662@debbugs.gnu.org; Wed, 20 Jul 2022 16:16:37 -0400 Original-Received: by mail-wm1-f42.google.com with SMTP id c187-20020a1c35c4000000b003a30d88fe8eso2062507wma.2 for <56662@debbugs.gnu.org>; Wed, 20 Jul 2022 13:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=NiV/m8xp4x4xurIVL99a7zMLrcI7jQnmDdxyYWxftiE=; b=CeZTUI0385cHSw8DSKbEK4gWzctRTTrk0AmFdjJDtlj6VMiMnukYDWZ2tTOAXFRDZQ bHtuBrvtOVtbe3VLOKIvTCbJ/+QsCMnh0stYaw9MTCZK/PTyf70Y9Uzj3v9pLFXN44Ni YkgtCxpMyPzz3dtD+u5b8ieT3lu3fLBEHh0f7/Bl9idZQee13+mT8kGruH3nF8zqmdvN 9Zk9mSIbeth2jzDPlTLcCu/yeIP+uPIBoRyY0yG7ka+uosDRi+dWoAQy1qhnOBxq/fXC MoyclEjSICD5iIF1aY4w/WlqcO2Rodh8tJWsgz1/+UxAXXpU3I+JeRX7xeUUtQ9bV9Sd UiQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=NiV/m8xp4x4xurIVL99a7zMLrcI7jQnmDdxyYWxftiE=; b=PSjAf6Ee8pJLZmKkrke2GaJtFLYbuq/DcH2E70WpSppxL52sGRbTo5rsVVbDEJmxLs r1yiTC2Frn110JntVv7t4xsuRosJPqf/87DUTrxzGLXuGaY7/cP/wd99zMSpglZoW3Xj 25wSSSDfGssVZkOt75bQQ0a6Ft//9hs8O/QOouGuslOhQWatEyKakG/UwagADsQiTOhX SpgHELkt7Uz6qbKW2OFJ9wlqLqdDwss8UxtkXL1KBUIfJeLHja/McZrRMxT5q0jDm4iN 23IGJnhQj4lh1hJXI3qcQFceh2HCxXI4AOtuWAqlhkAGIp/fe7v68ZmRTUgSEViKfYhU zfbA== X-Gm-Message-State: AJIora9U6rkc1aWq+iTkaL7nbsobvHgn/1iBG7BWtnp/qSh6ynQ2Wvq1 2ARnPm/zfBE7ad8tmwS82a/ZElDYLpI= X-Google-Smtp-Source: AGRyM1urKmUv/3/vRm849Hg/jI9j4+xDLPQvy1mJLGjo7oQZnRn30XhAdOsyPTRmsT1Wqj/4Ww+gxw== X-Received: by 2002:a1c:5452:0:b0:3a3:2b9:6cfe with SMTP id p18-20020a1c5452000000b003a302b96cfemr5592994wmi.112.1658348188318; Wed, 20 Jul 2022 13:16:28 -0700 (PDT) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id e2-20020adfdbc2000000b0021d4aca9d1esm2344300wrj.99.2022.07.20.13.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 13:16:27 -0700 (PDT) In-Reply-To: <83sfmwkl0y.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 20 Jul 2022 15:48:13 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237521 Archived-At: Eli Zaretskii writes: >> >> From: Visuwesh >> >> Date: Wed, 20 Jul 2022 17:05:11 +0530 >> >>=20 >> >> 1. emacs -Q >> >> 2. Visit a longish file. >> >> 3. C-x 3 and scroll up in any of the window. >> >> 4. M-: (setq highlight-nonselected-windows t) RET. >> >> 5. Create an active region and compare the highlighting. >> > >> > What is wrong with this behavior? In each window the region between >> > the mark and point is highlighted, as you requested by turning on that >> > option. >> > >> > What am I missing? >>=20 >> Since the point is local to the window, it felt natural that the region >> would be too. > > And it is. But the mark originally is the same. If you switch to the > other window and set its mark in a different place, you will have > completely separate and independent highlighting. Mm. I was very interested in your answer because a big pet peeve of mine is not being able to activate a region in window-1, move to window-2 showing another portion of the same buffer, and work on that second portion while stealing glances at what I highlighted in window-1. Now I see that if I hit C-SPC in window-2 I can indeed change the highlighting in that window while keeping the highlighting in window-1 untouched, however=E2=80=A6 (1) Haven't been able to find a reproducible recipe, but on occasion, when hitting C-SPC in window-2, the highlighting in window-1 sometimes "snaps" and updates to match the mark I just set in window-2. (2) AFAICT I have to keep a region activated in window-2 for window-1 to retain its highlighting. For the use-case described above though, the first thing I do when moving to window-2 is C-g to deactivate the region, and AFAICT that deactivates the highlighting in window-2. I kind of wish there was a third value for this user option; e.g. (setq highlight-nonselected-windows 'lazy) to signify "keep highlighting as-is when leaving the window, and never update it until the window becomes current again"? =F0=9F=A4=B7 Not sure how well-defined that proposal is though (e.g. what should happen when part of the highlighted region is erased); and I have no idea how much work it would be to actually implement that. If any of (2) makes sense, could this bug remain open as a wishlist item? It's a bit frustrating to (a) highlight part of a window I want to glance at for reference (b) move to another window to work on another location (c) lose the highlighting because that location "just happens" to be in the same buffer.