all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Mathias Dahl <mathias.dahl@gmail.com>
Cc: Kaushal Modi <kaushal.modi@gmail.com>,
	Emacs developers <emacs-devel@gnu.org>,
	Tino Calancha <tino.calancha@gmail.com>
Subject: Re: [PATCH] New command to invert lines in region
Date: Sun, 16 Oct 2016 09:24:25 -0400	[thread overview]
Message-ID: <CAM-tV--0tCb4m9+tHjSrgkyowZX3Fq1p=j3bZBhtur9ikpNHKQ@mail.gmail.com> (raw)
In-Reply-To: <CABrcCQ4VpjxLO6ZWpkg5ay46tYJ==Y+WP25-Ki9r50Vo6QvJ6w@mail.gmail.com>

On Sat, Oct 15, 2016 at 6:25 PM, Mathias Dahl <mathias.dahl@gmail.com> wrote:
>
> 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 wrote my own naïve version that I think is much simpler to
> understand

It looks to me that your version is simpler mainly because you dropped
the handling of some corner cases. Having some tests to check those
would be required before replacing the implementation. Using
split-string does seem like a good idea though (probably that function
didn't exist yet when reverse-region was written).



  parent reply	other threads:[~2016-10-16 13:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03 10:43 [PATCH] New command to invert lines in region Tino Calancha
2016-10-03 11:02 ` Kaushal Modi
2016-10-03 11:21   ` Tino Calancha
2016-10-03 11:33     ` Tino Calancha
2016-10-15 22:25       ` Mathias Dahl
2016-10-15 23:57         ` Kaushal Modi
2016-10-16 11:03           ` Mathias Dahl
2016-10-16 13:24         ` Noam Postavsky [this message]
2016-10-16 14:00           ` Eli Zaretskii
2016-10-16 18:25         ` Kalle Olavi Niemitalo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM-tV--0tCb4m9+tHjSrgkyowZX3Fq1p=j3bZBhtur9ikpNHKQ@mail.gmail.com' \
    --to=npostavs@users.sourceforge.net \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=mathias.dahl@gmail.com \
    --cc=tino.calancha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.