From: Juri Linkov <juri@linkov.net>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
56662@debbugs.gnu.org, Visuwesh <visuweshm@gmail.com>
Subject: bug#56662: 29.0.50; Funny region highlights when highlight-nonselected-windows is t
Date: Sun, 24 Jul 2022 19:41:20 +0300 [thread overview]
Message-ID: <864jz6784w.fsf@mail.linkov.net> (raw)
In-Reply-To: <87y1wm9kqh.fsf@gmail.com> ("Kévin Le Gouguec"'s message of "Fri, 22 Jul 2022 00:14:30 +0200")
>> In any case, I don't think there's any reasonable action we can take.
>> "Active region" is already bending Emacs quite a bit, the current
>> scenario seems to break the camel's hump in unexpected ways (altho
>> there's always a reason to explain the behaviour). Closing the bug
>> report.
>
> That's fair. My argument for keeping it open would be that people who
> would be able and willing to scratch that itch in the future might not
> think to search for closed reports; but then again I suppose there's not
> a lot of information in our present discussion that they wouldn't be
> able to rediscover on their own.
It's very easy to make region highlighting window-local with just
diff --git a/lisp/simple.el b/lisp/simple.el
index 5443d961e1..04002073bd 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6944,7 +6944,7 @@ redisplay--update-region-highlight
(eq window (minibuffer-selected-window))))))
(funcall redisplay-unhighlight-region-function rol)
(let* ((pt (window-point window))
- (mark (mark))
+ (mark (or (window-parameter window 'mark) (mark)))
(start (min pt mark))
(end (max pt mark))
(new
Then the main task would be to find the right logic of setting
the window-local mark. Since this feature request is closed,
here is a possible starting point for anyone who wants to experiment
with the prototype trying different use cases:
(add-hook 'activate-mark-hook
(lambda () (set-window-parameter nil 'mark (mark))))
(add-hook 'deactivate-mark-hook
(lambda () (set-window-parameter nil 'mark nil)))
(add-hook 'window-selection-change-functions
(lambda (window)
(when (eq window (selected-window))
(set-marker (mark-marker) (window-parameter window 'mark)))))
next prev parent reply other threads:[~2022-07-24 16:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 11:35 bug#56662: 29.0.50; Funny region highlights when highlight-nonselected-windows is t Visuwesh
2022-07-20 12:38 ` Eli Zaretskii
2022-07-20 12:43 ` Visuwesh
2022-07-20 12:48 ` Eli Zaretskii
2022-07-20 20:16 ` Kévin Le Gouguec
2022-07-21 6:22 ` Eli Zaretskii
2022-07-21 11:22 ` Visuwesh
2022-07-21 12:19 ` Eli Zaretskii
2022-07-21 12:32 ` Visuwesh
2022-07-21 12:39 ` Eli Zaretskii
2022-07-21 14:35 ` Visuwesh
2022-07-21 15:54 ` Eli Zaretskii
2022-07-21 16:13 ` Visuwesh
2022-07-21 16:34 ` Eli Zaretskii
2022-07-21 17:00 ` Visuwesh
2022-07-21 22:14 ` Kévin Le Gouguec
2022-07-24 16:41 ` Juri Linkov [this message]
2022-07-24 17:32 ` Eli Zaretskii
2022-07-23 7:09 ` Lars Ingebrigtsen
2022-07-23 7:08 ` Lars Ingebrigtsen
2022-07-20 18:05 ` Juri Linkov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=864jz6784w.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=56662@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=kevin.legouguec@gmail.com \
--cc=visuweshm@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).