From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#20070: 24.3; have commands such as downcase-region act on a rectangle region Date: Sat, 14 Mar 2015 12:31:08 -0400 Message-ID: References: <87bnjyf29d.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426350754 15925 80.91.229.3 (14 Mar 2015 16:32:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Mar 2015 16:32:34 +0000 (UTC) Cc: =?UTF-8?Q?P=C3=A5l_?= =?UTF-8?Q?Gr=C3=B8n=C3=A5s?= Drange , 20070@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 14 17:32:23 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 1YWoz8-0006i7-7C for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Mar 2015 17:32:22 +0100 Original-Received: from localhost ([::1]:41343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWoz7-0003Y3-AD for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Mar 2015 12:32:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWoz3-0003Xn-SU for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2015 12:32:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWoyy-0001sd-Sg for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2015 12:32:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWoyy-0001sZ-Pv for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2015 12:32:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YWoyo-00040H-72 for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2015 12:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Mar 2015 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20070-submit@debbugs.gnu.org id=B20070.142635067315329 (code B ref 20070); Sat, 14 Mar 2015 16:32:02 +0000 Original-Received: (at 20070) by debbugs.gnu.org; 14 Mar 2015 16:31:13 +0000 Original-Received: from localhost ([127.0.0.1]:46753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YWoy1-0003zB-4q for submit@debbugs.gnu.org; Sat, 14 Mar 2015 12:31:13 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:57009) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YWoxy-0003z2-CJ for 20070@debbugs.gnu.org; Sat, 14 Mar 2015 12:31:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsTAPOG1lRFxLnr/2dsb2JhbABbgwaDX4VTwGUEAgKBDUQBAQEBAQF8hA0BBAFWIwULCzQSFBgNJIg4CM4jAQEBAQYBAQEBHo94B4QqBZlfjhqBeYFFIoIygVgignMBAQE X-IPAS-Result: ArsTAPOG1lRFxLnr/2dsb2JhbABbgwaDX4VTwGUEAgKBDUQBAQEBAQF8hA0BBAFWIwULCzQSFBgNJIg4CM4jAQEBAQYBAQEBHo94B4QqBZlfjhqBeYFFIoIygVgignMBAQE X-IronPort-AV: E=Sophos;i="5.09,536,1418101200"; d="scan'208";a="113553961" Original-Received: from 69-196-185-235.dsl.teksavvy.com (HELO pastel.home) ([69.196.185.235]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Mar 2015 12:31:08 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9C1C0D40; Sat, 14 Mar 2015 12:31:08 -0400 (EDT) In-Reply-To: <87bnjyf29d.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 12 Mar 2015 21:23:58 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) 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:100478 Archived-At: > Currently, `downcase-region' is defined with the interactive spec 'r' > that calls the function with point and mark as 2 args. Indeed, same problem as kill-region, to which I had to add a `region' argument (which basically says "we're called interactively so use whatever is the region rather than BEG and END"). > For backward-compatibility reasons this can't be changed. So maybe > a new interactive spec e.g. 'R' should call the function with 2 lists > where the first list will contain a list of beginnings of all intervals > in the rectangular region, and the second list of endings of intervals? Obviously, there will be many more commands that need to be adjusted to the extended notion of "region" which can now be composed of various extents. I'm not sure we need/want a new "R", because I think all cases of "r" are currently broken when the region is non contiguous (i.e. they all need to use "the new system"). One way to handle it generically, is to change call-interactively such that when the argument is "r", the command is called once for each "extent". Obviously, this won't work correctly for all cases, tho. Another option is to make "r" behave along the lines of your "R" (tho I much prefer a list of pairs than a pair of lists, so one of the two args would end up "useless"). > Then a command using it will need to add another outermost loop to pop > interval boundaries from both list arguments `begs' and `ends' to process > intervals using the same logic like it processes a single region now. Indeed. Maybe such a loop would be common enough that it'd be worthwhile adding some ad-hoc handling (e.g. make call-interactively do the looping as suggested above, tho maybe only after checking some special property of the command). Stefan