From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#12389: 24.2.50; mark, transient-mark-mode and registers Date: Wed, 03 Oct 2012 20:01:04 +0530 Message-ID: <87mx03aaqf.fsf@gmail.com> References: <87ligkwctv.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1349274679 28107 80.91.229.3 (3 Oct 2012 14:31:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Oct 2012 14:31:19 +0000 (UTC) Cc: 12389@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 03 16:31:22 2012 Return-path: Envelope-to: geb-bug-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 1TJPyK-0002fb-MX for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Oct 2012 16:30:48 +0200 Original-Received: from localhost ([::1]:50230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJPyF-0007LW-4N for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Oct 2012 10:30:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJPy5-0007Cr-B6 for bug-gnu-emacs@gnu.org; Wed, 03 Oct 2012 10:30:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJPxy-0005ps-1S for bug-gnu-emacs@gnu.org; Wed, 03 Oct 2012 10:30:33 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJPxx-0005pW-In for bug-gnu-emacs@gnu.org; Wed, 03 Oct 2012 10:30:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TJPyY-0001cI-E0 for bug-gnu-emacs@gnu.org; Wed, 03 Oct 2012 10:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Oct 2012 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12389 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12389-submit@debbugs.gnu.org id=B12389.13492746256170 (code B ref 12389); Wed, 03 Oct 2012 14:31:02 +0000 Original-Received: (at 12389) by debbugs.gnu.org; 3 Oct 2012 14:30:25 +0000 Original-Received: from localhost ([127.0.0.1]:39604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJPxx-0001bT-DY for submit@debbugs.gnu.org; Wed, 03 Oct 2012 10:30:25 -0400 Original-Received: from mail-pb0-f44.google.com ([209.85.160.44]:62148) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJPxu-0001bI-Fw for 12389@debbugs.gnu.org; Wed, 03 Oct 2012 10:30:23 -0400 Original-Received: by pbbro8 with SMTP id ro8so10185571pbb.3 for <12389@debbugs.gnu.org>; Wed, 03 Oct 2012 07:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=BGeMdol8ZtVGt2I1VAk7GHP0wYLMmElpSRmBa9pbHow=; b=X6FDAN8bz1xI06w0h01Bhu7kaJ6jvuUeukm3xr+7xG7cVXbbCSVtZXyJ/z0Kbe+IiA ffdVyUmeWfPX6ieaiMiMJ3w88vvnAzFxXUlkubDU4eDh+Q0H2QPHlIVfNAG0eID+5p5I jFf5SrTQqVYzX7K/dvvVYLHcb1M0K1KzOq5coZqCgrOh9xAu90Msa/4uUNvx/gMCfqZN U0TihoOPPjK/SJIoY8M7Z/0I8/l+s3Qdx4o9KM86eYa99q63nqzxa8cCduA+rJZyZZj1 LM8ouQ4h7GhZxQcoUoPQlBemjGLYONlfZjRMw+S/h9oxjjZq9jtGZLSDFgxxWiwyLFDs fFEA== Original-Received: by 10.68.223.37 with SMTP id qr5mr13388987pbc.101.1349274583380; Wed, 03 Oct 2012 07:29:43 -0700 (PDT) Original-Received: from debian-6.05 ([115.242.250.191]) by mx.google.com with ESMTPS id oq7sm2687194pbc.69.2012.10.03.07.29.39 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Oct 2012 07:29:42 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 08 Sep 2012 16:17:32 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65161 Archived-At: --=-=-= Content-Type: text/plain Stefan Monnier writes: >> Item-1 >> ====== >> My upvotes for de-activating mark after `prepend-to-register' and >> `append-to-register. > > Fine by me. I am attaching a patch. Please leave the bug open. I will continue my discussion on Item-2 sometime later. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=bug12389.diff Content-Description: bug12389.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-03 08:50:49 +0000 +++ lisp/ChangeLog 2012-10-03 14:26:48 +0000 @@ -1,3 +1,9 @@ +2012-10-03 Jambunathan K + + * register.el (append-to-register, prepend-to-register): + Deactivate mark. This accords with current behaviour of + `copy-to-register'. See (Bug#12389). + 2012-10-03 Martin Rudalics * menu-bar.el (kill-this-buffer): Don't do anything when === modified file 'lisp/register.el' --- lisp/register.el 2012-09-09 08:10:56 +0000 +++ lisp/register.el 2012-10-03 13:21:46 +0000 @@ -382,6 +382,7 @@ register (cond ((not reg) text) ((stringp reg) (concat reg separator text)) (t (error "Register does not contain text"))))) + (setq deactivate-mark t) (cond (delete-flag (delete-region start end)) ((called-interactively-p 'interactive) @@ -400,6 +401,7 @@ register (cond ((not reg) text) ((stringp reg) (concat text separator reg)) (t (error "Register does not contain text"))))) + (setq deactivate-mark t) (cond (delete-flag (delete-region start end)) ((called-interactively-p 'interactive) --=-=-= Content-Type: text/plain >> Item-2 >> ====== >> 1. Enable transient-mark-mode >> 2. C-SPC >> 3. >> 4. C-g >> 5. C-u C-x r s a > > That's normal: the same happens with C-w instead of C-u C-x r s a. > >> Now as a transient mark user, I find disappearance of a non-highlighted >> text in (5) surprising. Comments? > > What did you expect to happen? That the text is copied but not deleted? > Or that neither happens and you get an error. > If you want an error, you can set mark-even-if-inactive to nil. > > > Stefan --=-=-=--