GNU bug report logs -
#56662
29.0.50; Funny region highlights when highlight-nonselected-windows is t
Previous Next
Reported by: Visuwesh <visuweshm <at> gmail.com>
Date: Wed, 20 Jul 2022 11:36:02 UTC
Severity: normal
Tags: wontfix
Found in version 29.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #66 received at 56662 <at> debbugs.gnu.org (full text, mbox):
>> 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)))))
This bug report was last modified 2 years and 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.