all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Removing duplicated lines
Date: Thu, 29 Nov 2012 17:31:58 +0600	[thread overview]
Message-ID: <CAP_d_8XVbr_D16noHq0fEdStvLQKHMLBE9MCzfUtyde=N7Ajdw@mail.gmail.com> (raw)
In-Reply-To: <80wqx4hdm9.fsf@somewhere.org>

On Thu, Nov 29, 2012 at 6:06 PM, Sebastien Vauban
<wxhgmqzgwmuf@spammotel.com> wrote:
>> Does (vanilla) Emacs have some command for removing duplicated lines
>> in a given region?
> Shell command on a region: `M-| uniq RET'

+1 but I’d add that it will only detect consecutive duplicate lines.
sort|uniq or sort -u will remove all duplicates but will sort the
lines as a side effect, which may or may not be desired.



  parent reply	other threads:[~2012-11-29 11:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.14043.1354186273.855.help-gnu-emacs@gnu.org>
2012-11-29 11:06 ` Removing duplicated lines Sebastien Vauban
2012-11-29 11:25   ` Dani Moncayo
2012-11-29 11:57     ` Yuri Khan
2012-11-29 12:07       ` Dani Moncayo
     [not found]     ` <mailman.14047.1354190273.855.help-gnu-emacs@gnu.org>
2013-07-03 12:13       ` naisanza
2012-11-29 11:31   ` Yuri Khan [this message]
2013-07-03 12:14   ` naisanza
2012-11-29 10:50 Dani Moncayo
2012-11-29 12:12 ` Jambunathan K
2012-11-29 12:18   ` Dani Moncayo

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='CAP_d_8XVbr_D16noHq0fEdStvLQKHMLBE9MCzfUtyde=N7Ajdw@mail.gmail.com' \
    --to=yuri.v.khan@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.