From: David De La Harpe Golden <david@harpegolden.net>
To: Chong Yidong <cyd@gnu.org>
Cc: 8996@debbugs.gnu.org
Subject: bug#8996: Set PRIMARY from last selection, not last selected window
Date: Sun, 25 Mar 2012 14:42:14 +0100 [thread overview]
Message-ID: <4F6F20B6.6090904@harpegolden.net> (raw)
In-Reply-To: <87iphtwdmc.fsf@gnu.org>
On 25/03/12 04:42, Chong Yidong wrote:
> David De La Harpe Golden<david@harpegolden.net> writes:
>
>> Well, that only catches cases that happen owing to things that trigger
>> the<select-window> event that handle-select-window is bound to.
>>
>> But that event isn't fired when you C-x o - other-window just straight
>> calls the select-window function. So, with your patch applied, it
>> probably fixes the visible issue in Stefan's focus-follows-mouse case,
>> but my keyboard recipe previously given still yields the "wrong"*
>> selection.
>
> OTOH, keyboard commands stealing the selection seems a little less
> problematic, because the user is specifically doing an Emacs command
> rather than just moving the mouse. I'm not sure it's wrong for C-x o to
> get the selection if the window switched to has an active region.
Hmm, well, subjectively it did feel wrong to me, it is after all the
context I spotted the issue in. But I'm now presumably also influenced
by months of using my locally munged emacs.
In terms of current practice of one of our "competitors" (loosely) that
has fairly similar functionality, kde kate, it does _not_ appear to
reset x11 primary to the older but still visibly highlighted region when
you just switch between windows, even with the keyboard (of course it
doesn't use emacs terminology for the entities in question, but
functionally similar), it sticks to the temporal order:
launch kate, enter a new session
enter "The quick brown fox jumps over the lazy dog."
hit Ctrl-Shift-T (split window)
select (shift-arrow keys) "fox" in window #1
hit F8 (switch window)
select (shift-arrow keys) "dog" in window #2
hit F8 (switch window)
-> current window #1 again, and has "fox" region still visibly
highlighted (and it is again current in terms of intra-kate ops like
overtyping it)
hit mouse-2
-> "dog" is inserted from primary.
In gvim, given modality there are probably too many differences for the
comparison to be fair, anyway it doesn't reset primary to the older (and
unlike emacs/kate, not visible anyway) region when you switch windows.
Visible region highlighting apparently disappears once you exit visual
mode, so the question of visual vs. temporal correspondence that arises
in emacs/kate is irrelevant, temporal is the natural option. Visual mode
seems to be exited when you switch windows to a window onto a different
buffer, it's only maintained if both windows are onto the same buffer
and in which case they apparently have the same visual region, so the
same-buffer/different-window/different-visible-region case of emacs or
kate probably can't arise (not a vim expert, mind).
next prev parent reply other threads:[~2012-03-25 13:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-04 17:19 bug#8996: Set PRIMARY from last selection, not last selected window Stefan Monnier
2011-07-04 19:11 ` David De La Harpe Golden
2011-07-04 20:27 ` Chong Yidong
2011-07-05 3:26 ` Stefan Monnier
2011-07-05 10:11 ` David De La Harpe Golden
2011-07-08 5:54 ` David De La Harpe Golden
2011-07-11 2:57 ` David De La Harpe Golden
2012-03-13 13:23 ` Stefan Monnier
2012-03-18 19:18 ` David De La Harpe Golden
2012-03-24 11:10 ` Chong Yidong
2012-03-25 3:32 ` David De La Harpe Golden
2012-03-25 3:42 ` Chong Yidong
2012-03-25 13:42 ` David De La Harpe Golden [this message]
2012-03-25 14:20 ` David De La Harpe Golden
2012-03-26 4:06 ` Chong Yidong
2012-03-27 0:16 ` David De La Harpe Golden
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F6F20B6.6090904@harpegolden.net \
--to=david@harpegolden.net \
--cc=8996@debbugs.gnu.org \
--cc=cyd@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.