From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#52265: Wishlist: Behavior of rectangles when last line is short Date: Sat, 04 Dec 2021 20:50:39 +0100 Message-ID: <87y25040a8.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37323"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 52265@debbugs.gnu.org To: Tor Kringeland Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 04 20:51:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtb3v-0009SK-8i for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Dec 2021 20:51:11 +0100 Original-Received: from localhost ([::1]:34458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtb3t-0007WA-2c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Dec 2021 14:51:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtb3m-0007VX-5M for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2021 14:51:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtb3l-0002MV-Tn for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2021 14:51:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtb3l-0001bb-Q6 for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2021 14:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Dec 2021 19:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52265 X-GNU-PR-Package: emacs Original-Received: via spool by 52265-submit@debbugs.gnu.org id=B52265.16386474506138 (code B ref 52265); Sat, 04 Dec 2021 19:51:01 +0000 Original-Received: (at 52265) by debbugs.gnu.org; 4 Dec 2021 19:50:50 +0000 Original-Received: from localhost ([127.0.0.1]:55039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtb3a-0001aw-A3 for submit@debbugs.gnu.org; Sat, 04 Dec 2021 14:50:50 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:40374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtb3Y-0001ag-Ui for 52265@debbugs.gnu.org; Sat, 04 Dec 2021 14:50:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sqHq7nXh0iJTWjN32AsIclI4hMv2ekZu3orLOnmQt9g=; b=MapAFAvVFLWmjKDIsyRRs2CB+v IbBSpcuYWtjbcTuLAcoUXQCvyOp/sY9tUv/4APBd+VyaUmPoTA8OQdjcIQ1QFyzvl9qnDb04md7po IUuiSTbsPU5RapdvJtMSI9sW9y0vLUtgrtXnVDqnXzuIwyQmYfAXHU8T1KrGwlgJzEf8=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtb3Q-0008Mk-Cc; Sat, 04 Dec 2021 20:50:43 +0100 X-Now-Playing: Pink Floyd's _Wish You Were Here_: "Shine On You Crazy Diamond (Part 6)" In-Reply-To: (Tor Kringeland's message of "Sat, 04 Dec 2021 00:06:52 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221493 Archived-At: Tor Kringeland writes: > Suppose we have the following text > > text123 > more text > text > first > second > third > > and want to turn it into > > text123,first > more text,second > text,third > > using rectangles. I'm not sure I understand. Does Emacs have a rectangle command that does this? And if so, what is it called? > 1. When moving POINT to the the empty line below the line containing > "third" and killing the region starting on the line with "first", > nothing happens. How about having the whole region killed as a > rectangle in this case? Killing the region (i.e., using `C-w') works fine for me... > 2. Having a user option or prefix argument affecting `yank-rectangle' > which when active would /e.g./ prompt the user for a string to > insert, instead of filling the space between the lines and the yanked > rectangle with tabs/spaces. Optionally, just place the given string > in front of the rectangle and put it at the end of the lines, without > worrying about visual alignment (so you wouldn't have to worry about > the first line being the longest). I think this is way outside the scope of rectangles. Your use case seems to be to turn a series of lines into CSV columns -- but that's better expressed through a CSV command. You might want to group them by two or three or four lines into columns, for instance. So I don't think using rectangles for something like this is totally the wrong tool, and it can't possibly work very well. Unless I'm misunderstanding something, which I might well be doing. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no