all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Smith_RS <rsmithpv@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Annoying kill-ring behavior
Date: Tue, 1 Apr 2014 00:54:45 -0700 (PDT)	[thread overview]
Message-ID: <eb42cda4-2688-46e8-b3de-481b1d6c80da@googlegroups.com> (raw)
In-Reply-To: <mailman.18630.1396305973.10748.help-gnu-emacs@gnu.org>

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.


  parent reply	other threads:[~2014-04-01  7:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 22:06 Annoying kill-ring behavior Smith_RS
2014-03-31 22:45 ` Stefan Monnier
     [not found] ` <mailman.18630.1396305973.10748.help-gnu-emacs@gnu.org>
2014-04-01  7:54   ` Smith_RS [this message]
2014-04-01 16:23     ` Smith_RS
2014-04-02 11:59     ` Stefan Monnier
     [not found]     ` <mailman.18813.1396529475.10748.help-gnu-emacs@gnu.org>
2014-04-03 16:52       ` Smith_RS
2014-04-03 21:59         ` Smith_RS
2014-04-04  4:34           ` Joost Kremers
2014-04-04  7:00             ` Smith_RS

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=eb42cda4-2688-46e8-b3de-481b1d6c80da@googlegroups.com \
    --to=rsmithpv@gmail.com \
    --cc=help-gnu-emacs@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.