From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] New command to invert lines in region Date: Sat, 15 Oct 2016 23:57:43 +0000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f403045e3b0c81ceac053ef01cad X-Trace: blaine.gmane.org 1476575946 14851 195.159.176.226 (15 Oct 2016 23:59:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Oct 2016 23:59:06 +0000 (UTC) Cc: Emacs developers To: Mathias Dahl , Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 16 01:59:02 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvYqW-0007jT-G9 for ged-emacs-devel@m.gmane.org; Sun, 16 Oct 2016 01:58:32 +0200 Original-Received: from localhost ([::1]:54462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvYqY-0003QT-Ec for ged-emacs-devel@m.gmane.org; Sat, 15 Oct 2016 19:58:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvYpx-0003QL-7e for emacs-devel@gnu.org; Sat, 15 Oct 2016 19:57:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvYpw-0007eE-DS for emacs-devel@gnu.org; Sat, 15 Oct 2016 19:57:57 -0400 Original-Received: from mail-ua0-x232.google.com ([2607:f8b0:400c:c08::232]:35297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bvYpw-0007dB-7Z for emacs-devel@gnu.org; Sat, 15 Oct 2016 19:57:56 -0400 Original-Received: by mail-ua0-x232.google.com with SMTP id r64so8767347uar.2 for ; Sat, 15 Oct 2016 16:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cfcXGAKqUUEx2s2pmC3EZELwZMhMeIcmNDLftDBhD6Q=; b=dmTddQp+duzLq8rlU1fL4ZQ/61Du8BJef7fZ8N6IfvtB8kJS5pz57xb+paC13GO+Mp lE6IFgXWsXGpkEz+GGeX+8MawMHO4Tgd4kTdtqEPpZcaI4ug/1mKt6ddJBw6k/LTTuUv Ibs2YwVnPdnys+LaqQcLQ2sDUYpZQq3WQ3GjtMCPFyWIVJ+BDSNTdDwAAcyRvL0Sc0+y jyaBkGgCsxX3ZQE3bYtFPmDM66eSkkKnp9JT/E0iqJ/esMaIHwegZ4l8uI1QCg9c+Tjy CmTzwNwrKh6phwVl9Vo/hIaCGYynKs+pU3o0pgMDIPDPUBPU6fK6Smy6Il4AeO1kcGzO XYlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cfcXGAKqUUEx2s2pmC3EZELwZMhMeIcmNDLftDBhD6Q=; b=b8MWGV9GS0b+ZdGbIx0l9K7lzhIxrKZW1kzYRyZjet8ZBaDWyzRdK/1PQgVGCZa/vU GlAwh1naQOSfKRZTm2gApnxZqHIIM6kj2qfKlWmqRFOJtA4v9fIDkqbG0A8E8/E7lBAZ NY8if1CXiSyEwF+NK0kGhc6lFi8dB2WJ4ryyI6h/HOKbL0ABQkSbJcBQn86CKGA0ycSb SQDQod8QGDf2s/NVHytykGkgNTQKnFAGC8uI9d/TdeBepYjj3WdFRkumdWV8QgJWRmda Zmjsd2DW+fWwzdxZFP9HeEY6SVWb/odJ7cdHwqe/Eh/Nd8UF+E2GjOmUipFrNjpWksmB h3LQ== X-Gm-Message-State: AA6/9RmP7m60pPsGsh11uqh17cvLc6XawV0bEhqJrcuVjaIOnvRSoupY9HSFPkeV4YRvzaaZpI2cMcI7qhG4mw== X-Received: by 10.159.48.83 with SMTP id i19mr2483051uab.52.1476575874891; Sat, 15 Oct 2016 16:57:54 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c08::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208313 Archived-At: --f403045e3b0c81ceac053ef01cad Content-Type: text/plain; charset=UTF-8 On Sat, Oct 15, 2016, 6:25 PM Mathias Dahl wrote: > > > OK, i found it: reverse-region. Pretty similar. > It doesn't allow writting to a different buffer than the current one. > The proposed command here allow that and save some consing. > > > Writing the result into another buffer sounds quite arbitrary. > +1. I have never needed to save the result in a different buffer. Is it really such a common scenario that this function should do it? Those > who needs to have the result in another buffer can easily add a few lines > in the calling code to make it so. > Exactly. Out of curiosity I had a look at the current implementation of > `reverse-region' and found it quite complicated and hard to understand what > it does. > I don't have any for or against opinion on this (may be a slight against, based on the "if it's not broken, why 'fix'" motto). I have been using `reverse-region` for many years and it works just fine. -- Kaushal Modi --f403045e3b0c81ceac053ef01cad Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Sat, Oct 15, 2016, 6:25 PM M= athias Dahl <mathias.dahl@gmai= l.com> wrote:
=C2=A0
OK, i found it: reverse-region.=C2=A0 Pretty similar.
It doesn't allow writting to a different buffer than the current one. The proposed command here allow that and save some consing.

Writing the result into another buffer sounds quite arbitrary.
<= /div>

+1. I have never ne= eded to save the result in a different buffer.=C2=A0

Is it really such a common scenar= io that this function should do it? Those who needs to have the result in a= nother buffer can easily add a few lines in the calling code to make it so.=

Exactly.=C2= =A0

Out of = curiosity I had a look at the current implementation of `reverse-region'= ; and found it quite complicated and hard to understand what it does.

I don't have = any for or against opinion on this (may be a slight against, based on the &= quot;if it's not broken, why 'fix'" motto). I have been us= ing `reverse-region` for many years and it works just fine.=C2=A0
--

Kaushal Modi

--f403045e3b0c81ceac053ef01cad--