unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David De La Harpe Golden <david@harpegolden.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 8996@debbugs.gnu.org
Subject: bug#8996: Set PRIMARY from last selection, not last selected window
Date: Sun, 18 Mar 2012 19:18:24 +0000	[thread overview]
Message-ID: <4F663500.7070200@harpegolden.net> (raw)
In-Reply-To: <jwv4ntsy76s.fsf-monnier+gnus-read-ephemeral-bug@gnu.org>

On 13/03/12 13:23, Stefan Monnier wrote:

> I think this approach isn't as terrible as it sounds (tho I don't much like
> the name you chose, sorry).  We'd want to let-bind that new var in
> things like save-selected-window, with-selected-window, ... which is
> kind of ugly.

I dunno, maybe if 'tis getting time ordering right we're worried about, 
we should stop trying to make an ordering emergent from global state and 
impose one, probably more robust - save an actual timestamp or sequence 
number with saved positions (and restore it on position restore), and if 
the current selection postdates, it just shouldn't be reset (x11 
selections are already timestamped anyway IIRC, dunno about other 
platforms).

> Maybe a better approach is to record the selected window before running
> a command, and only do the select-active-regions dance if the command did
> not change the selected window.

Not convinced myself that covers commands that actually legitimately 
change the selected window and also set a new region, like maybe a mouse 
gesture. though turns out I'm now rusty in the area and may not have 
thought it through fully.

> and only do the select-active-regions is the
> buffer is the same and the region's status has changed.

I don't think that one can work - two different windows can routinely be 
open on the same buffer?





  reply	other threads:[~2012-03-18 19:18 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 [this message]
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
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

  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=4F663500.7070200@harpegolden.net \
    --to=david@harpegolden.net \
    --cc=8996@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).