help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Annoying kill-ring behavior


From: Smith_RS
Subject: Re: Annoying kill-ring behavior
Date: Tue, 1 Apr 2014 00:54:45 -0700 (PDT)
User-agent: G2/1.0

On Monday, March 31, 2014 3:45:37 PM UTC-7, Stefan Monnier wrote:
> I remember fixing this kind of bug, so it might depend on which version
> of Emacs you're using.

Thanks. I first saw this under 24.3.1 build under Windows.

I went back and re-traced my steps. Back when I first started with 24.x I had 
the cut/paste problem as described here:

http://stackoverflow.com/questions/13036155/how-to-to-combine-emacs-primary-clipboard-copy-and-paste-behavior-on-ms-windows

So I added this to my .emacs, without *really* understanding how it was 
changing my default behavior:

(when (equal window-system 'w32)
  (setq select-active-regions nil)
  (setq mouse-drag-copy-region t)
  (global-set-key [mouse-2] 'mouse-yank-at-click))

If you execute these three lines and try my scenario as posted above, you 
should be able to duplicate the issue.

Since I move a lot between Linux and Windows (multiple times during my work 
day, and I use Git to keep my files straight) I'm keen on techniques that give 
me consistent cut/paste semantics. But I'm also at a point in my understanding 
of Emacs that I know the primary selection and the kill-ring are two different 
things. This commonly-suggested workaround for Windows users created confusion 
for me.

But it's not a Windows-specific bug, if you C-x C-e on this code:

(progn
  (setq select-active-regions nil)
  (setq mouse-drag-copy-region t)
  (global-set-key [mouse-2] 'mouse-yank-at-click))

And then do the mouse-1-micro-drag that I described earlier, you will see the 
zero-length entries in the kill-ring, on Windows and Linux.

For me personally, I'm probably going to turn off this "just use the kill ring 
all the time" behavior until I figure out what the best way to move forward is. 
It seems like it's one of those things you tell newbies to do so they'll leave 
you alone.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]