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:12:54 +0300 Organization: LINKOV.NET Message-ID: <87r3oj399d.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> <87mvzfa5f2.fsf@mail.linkov.net> <877fqi89ii.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436307742 4650 80.91.229.3 (7 Jul 2015 22:22:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jul 2015 22:22:22 +0000 (UTC) Cc: Bastien , 19829@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 08 00:22:10 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 1ZCbFi-0006ou-3U for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jul 2015 00:22:10 +0200 Original-Received: from localhost ([::1]:60624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCbFh-0002MV-9G for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jul 2015 18:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCbFd-0002MK-Uf for bug-gnu-emacs@gnu.org; Tue, 07 Jul 2015 18:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCbFa-00009b-Oi for bug-gnu-emacs@gnu.org; Tue, 07 Jul 2015 18:22:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCbFa-00009U-Ky for bug-gnu-emacs@gnu.org; Tue, 07 Jul 2015 18:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZCbFa-0005kP-3E 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.143630767922027 (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:19 +0000 Original-Received: from localhost ([127.0.0.1]:43749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCbEs-0005j8-2R for submit@debbugs.gnu.org; Tue, 07 Jul 2015 18:21:18 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:44079 helo=homiemail-a11.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCbEp-0005iz-7S for 19829@debbugs.gnu.org; Tue, 07 Jul 2015 18:21:16 -0400 Original-Received: from homiemail-a11.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a11.g.dreamhost.com (Postfix) with ESMTP id 249DE6E06C; Tue, 7 Jul 2015 15:21:14 -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-a11.g.dreamhost.com (Postfix) with ESMTPA id DDBD96E070; Tue, 7 Jul 2015 15:21:12 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 07 Jul 2015 08:20:28 -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:104810 Archived-At: > I think the first thing is to figure out what is the ideal API, ignoring > backward compatibility. In this ideal case, I think we'd just want > a single arg which takes a "region descriptor" (along the lines of what > you described earlier, tho its format would be opaque) with methods like > `region-contiguous-p', `region-beginning', `region-end', > `region-chunks', `region-extract', ... > > Then we can try and figure how to adapt it to the real world and how to > get from here to there. But I think it mostly means we'll want to go > from two args (START/END) to just a single arg. So adding an argument > doesn't seem to be the obvious best choice. To achieve the ideal API we need to remove at least one arg END anyway. But when we'll find a backward-compatible way to remove one arg, then it would be equally easy to remove two args START and END, leaving the new arg REGION completely with the new meaning. OTOH, it would be more difficult to achieve the ideal API while going thru an intermediate START-OR-REGION arg with the combined meaning because before changing the meaning of START-OR-REGION to just REGION requires adapting of function bodies to the new meaning of this arg, i.e. the choice is between "removing two args START and END" vs. "removing END and adapting START-OR-REGION".