From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Smith_RS Newsgroups: gmane.emacs.help Subject: Re: Annoying kill-ring behavior Date: Tue, 1 Apr 2014 00:54:45 -0700 (PDT) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1396338925 24723 80.91.229.3 (1 Apr 2014 07:55:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2014 07:55:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 01 09:55:20 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WUtXT-0003UK-5U for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Apr 2014 09:55:19 +0200 Original-Received: from localhost ([::1]:53031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUtXS-0001pe-Gz for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Apr 2014 03:55:18 -0400 X-Received: by 10.66.222.105 with SMTP id ql9mr13614224pac.9.1396338886393; Tue, 01 Apr 2014 00:54:46 -0700 (PDT) X-Received: by 10.182.130.169 with SMTP id of9mr540348obb.26.1396338886277; Tue, 01 Apr 2014 00:54:46 -0700 (PDT) Original-Path: usenet.stanford.edu!ur14no315724igb.0!news-out.google.com!xg2ni0igc.0!nntp.google.com!l13no1094895iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=108.0.72.42; posting-account=FPshOQoAAABhQbXLwYlqquO5tX-UXyrO Original-NNTP-Posting-Host: 108.0.72.42 User-Agent: G2/1.0 Injection-Date: Tue, 01 Apr 2014 07:54:46 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:204629 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96898 Archived-At: 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 h= ad 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 cha= nging 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 s= hould 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 under= standing of Emacs that I know the primary selection and the kill-ring are t= wo different things. This commonly-suggested workaround for Windows users c= reated 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 t= he 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 r= ing all the time" behavior until I figure out what the best way to move for= ward is. It seems like it's one of those things you tell newbies to do so t= hey'll leave you alone.