From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#19829: 25.0.50; Design of commands operating on rectangular regions Date: Wed, 08 Jul 2015 01:15:45 +0300 Organization: LINKOV.NET Message-ID: <87pp43397y.fsf@mail.linkov.net> References: <87r3txhkz1.fsf@ceis-strat.com> <87twyt5o8q.fsf@mail.linkov.net> <874mqsq6ar.fsf@mail.linkov.net> <87zj8iljfk.fsf@mail.linkov.net> <87r3tnax8h.fsf@mail.linkov.net> <877fvdu34b.fsf@mail.linkov.net> <87mw44phaf.fsf@mail.linkov.net> <87d20dszao.fsf_-_@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436307744 4665 80.91.229.3 (7 Jul 2015 22:22:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jul 2015 22:22:24 +0000 (UTC) Cc: bzg@gnu.org, 19829@debbugs.gnu.org To: Richard Stallman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 08 00:22:11 2015 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 1ZCbFj-0006q6-9P for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jul 2015 00:22:11 +0200 Original-Received: from localhost ([::1]:60626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCbFi-0002O4-Kz for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jul 2015 18:22:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCbFd-0002ML-VA for bug-gnu-emacs@gnu.org; Tue, 07 Jul 2015 18:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCbFb-00009m-3u for bug-gnu-emacs@gnu.org; Tue, 07 Jul 2015 18:22:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCbFb-00009h-0U for bug-gnu-emacs@gnu.org; Tue, 07 Jul 2015 18:22:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZCbFa-0005kW-Mu for bug-gnu-emacs@gnu.org; Tue, 07 Jul 2015 18:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jul 2015 22:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19829 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19829-submit@debbugs.gnu.org id=B19829.143630768222044 (code B ref 19829); Tue, 07 Jul 2015 22:22:02 +0000 Original-Received: (at 19829) by debbugs.gnu.org; 7 Jul 2015 22:21:22 +0000 Original-Received: from localhost ([127.0.0.1]:43752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCbEv-0005jU-W7 for submit@debbugs.gnu.org; Tue, 07 Jul 2015 18:21:22 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:42560 helo=homiemail-a18.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCbEt-0005jK-Du for 19829@debbugs.gnu.org; Tue, 07 Jul 2015 18:21:19 -0400 Original-Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 9DD71250071; Tue, 7 Jul 2015 15:21:18 -0700 (PDT) Original-Received: from localhost.linkov.net (m213-102-33-19.cust.tele2.ee [213.102.33.19]) (Authenticated sender: jurta@jurta.org) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPA id 0F42B250069; Tue, 7 Jul 2015 15:21:16 -0700 (PDT) In-Reply-To: (Richard Stallman's message of "Tue, 07 Jul 2015 17:27:50 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:104811 Archived-At: > > +(defvar region-insert-function > > + (lambda (lines) > > + (let ((first t)) > > + (while lines > > + (or first > > + (insert ?\n)) > > + (insert-for-yank (car lines)) > > + (setq lines (cdr lines) > > + first nil)))) > > + "Function to insert the region's content. > > +Called with one argument LINES. > > +Insert the region as a list of lines.") > > What is the meaning of a list of lines as the region > if it is NOT a rectangle? What would that kind of region mean, > and when would it be used? Actually this function is not intended for a rectangle. It's a generic implementation that works like `insert-for-yank' currently does. But it uses a list of lines as its argument for compatibility with the existing `cua--insert-rectangle' and the new proposed `rectangle--insert-region' (that uses the existing `insert-rectangle') and that both of them accept a list of lines as their argument. > (I ask because there's a different function for rectangles, > so this function won't be used with a list of lines for rectangles.) The generic `region-insert-function' needs to have the same argument (i.e. a list of lines) for the case when it's overridden by one of the rectangle-handling functions. But its generic implementation inserts a list of lines the same way as `insert-for-yank' inserts a single string where lines are separated by newlines.