From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jiehong Ma Newsgroups: gmane.emacs.bugs Subject: bug#12723: 24.2; Improvement: changing text rectangle kill/past and its integration with the kill-ring Date: Wed, 24 Oct 2012 19:40:46 +0200 Message-ID: <5088281E.1080208@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1351102042 27901 80.91.229.3 (24 Oct 2012 18:07:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Oct 2012 18:07:22 +0000 (UTC) To: 12723@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 24 20:07:30 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 1TR5MT-0000Qu-Uj for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Oct 2012 20:07:26 +0200 Original-Received: from localhost ([::1]:44520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR5ML-00022l-OQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Oct 2012 14:07:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR5MF-00020c-N7 for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 14:07:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR5M7-0000dX-Q4 for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 14:07:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR5M7-0000dT-MN for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 14:07:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TR5O2-0006fO-98 for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 14:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jiehong Ma Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Oct 2012 18:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12723 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.135110209825574 (code B ref -1); Wed, 24 Oct 2012 18:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Oct 2012 18:08:18 +0000 Original-Received: from localhost ([127.0.0.1]:59944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TR5NJ-0006eO-QI for submit@debbugs.gnu.org; Wed, 24 Oct 2012 14:08:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47261) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TR4z5-00062S-OG for submit@debbugs.gnu.org; Wed, 24 Oct 2012 13:43:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR4x4-0000MD-RQ for submit@debbugs.gnu.org; Wed, 24 Oct 2012 13:41:11 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:34429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR4x4-0000M2-Bw for submit@debbugs.gnu.org; Wed, 24 Oct 2012 13:41:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR4x3-0005Jg-0C for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 13:41:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR4ws-0000IF-3V for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 13:41:08 -0400 Original-Received: from mail-bk0-f41.google.com ([209.85.214.41]:59550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR4wr-0000G4-Sn for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2012 13:40:58 -0400 Original-Received: by mail-bk0-f41.google.com with SMTP id jm1so388356bkc.0 for ; Wed, 24 Oct 2012 10:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=18cI0xbsTjPmy5jqXis52Iu/mrZOJuB3YlSMB+6pYys=; b=dNC4JVuqmyWjLOlmHokOnaKqSuMHWgvz/wYZvyRs/tjyLAtlF9N3i59hm/uJYt00LI RbIUyGGkaDDmYWaXdHWFVv5xTiysssWc4m5PCRTTyZjOjxz77gPYkoEFoPwZ8NDlbqPs MZ3EnjeznCUKBalPOAoi5ub16ljDKyuiaTzBstFoa4YLWkCYK+OMCR5P7BK42qvSGYqO rMxemVXUeGDhu1Gaz5hl7/g4Xxj8ePzPXo0TWIy1FBLHcUtxT1cnGjlTCqdIqlKXf0Bt pjVzr+Hpk8XPuGVL0tcRe5qL1dqEHGlXcNR62lgTsGpf19jLVJXWaJNlkogBMnk2foLF jq+Q== Original-Received: by 10.204.149.10 with SMTP id r10mr5020256bkv.61.1351100449792; Wed, 24 Oct 2012 10:40:49 -0700 (PDT) Original-Received: from [10.0.201.59] ([78.250.137.8]) by mx.google.com with ESMTPS id 9sm8848318bkq.13.2012.10.24.10.40.47 (version=SSLv3 cipher=OTHER); Wed, 24 Oct 2012 10:40:48 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121012 Thunderbird/16.0.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 24 Oct 2012 14:08:16 -0400 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:65991 Archived-At: This is actually a kind of improvement I would like to submit here. We all know how rectangle selections are working with registers. The idea of having a rectangle selection is great, but the key-bindings to use it is far from that adjective. In the following, I would like to present how I think it would be nicer, and also more accessible to users. 1. Every selection should start, and act the same way, i.e. by using C-SPC. 2. While the selection is active, switch into a rectangular-mode thanks to a key-binding (I propose C-x r), and visually show it to the user. (as does the rect-mark package for example). 3. When the rectangular selection is fully chosen by the user, use a =E2=80=9Cnormal=E2=80=9D function to kill it: C-w, M-w. 4. Give access to this rectangle in the kill-ring directly (no need to name a register). 5. When the user yank a normal piece of text, act as usual. However, if the current entry in the buffer is a rectangle, yang it accordingly ( for both C-y, M-y) Having such a work-flow would make the usage of text-rectangle selection a piece of cake, since we would only need to remember 1 key-binding to switch the selection into a rectangle-mode. Registers could be bind to different key-bindings as well. Technically, I do not really know how to do that. I thought that it may be possible to actually keep a kind of pointer into the kill ring, pointing to a register having a unique name. Maybe it could be simpler. I can't tell, since my knowledge of elisp is limited. Jiehong Ma In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.4) of 2012-08-28 on shaun Windowing system distributor `The X.Org Foundation