From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Removing duplicated lines Date: Thu, 29 Nov 2012 17:31:58 +0600 Message-ID: References: <80wqx4hdm9.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1354188736 9360 80.91.229.3 (29 Nov 2012 11:32:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2012 11:32:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 29 12:32:28 2012 Return-path: Envelope-to: geh-help-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 1Te2Lz-0001Bx-KJ for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2012 12:32:27 +0100 Original-Received: from localhost ([::1]:39782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te2Lo-0002im-BY for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2012 06:32:16 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te2Ld-0002gM-IY for help-gnu-emacs@gnu.org; Thu, 29 Nov 2012 06:32:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Te2LX-0007rO-RQ for help-gnu-emacs@gnu.org; Thu, 29 Nov 2012 06:32:05 -0500 Original-Received: from mail-we0-f169.google.com ([74.125.82.169]:51651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te2LX-0007r6-Ko for help-gnu-emacs@gnu.org; Thu, 29 Nov 2012 06:31:59 -0500 Original-Received: by mail-we0-f169.google.com with SMTP id t49so4561524wey.0 for ; Thu, 29 Nov 2012 03:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=9kVNMfFoQmkXbt1QU9GwFMd6c+2m7FZ/T04Ae5eTIfg=; b=CbTfqBOSLIFvJaZ7qQTvl3rgBtSkbiDgjcRsM9h9kUUzCK3hU73IuD0q0XGVcR1/N3 2iaxZBzzQOTCysGWDW159RWx8ixJZfEpNwGo/e7bPIIZBpdF/D+3HqdNfts248ASAzgp H8v6CTW9Gpdx5TwA/NQ1dqroK1/79x0FzF1bhC9XIHrAuAHw7hUQA5ZN5pATEBjVWtgI LnqZFUk/bUUxLMNXuWrCs/CXXXWdvrcnf44r9Cq2NoBeF34Xsc6ngib/DdVgSVzVnGGZ Zu+uyfntnoHo1GKNgMDaE3N8pZU5HaZXfWzEE6E3itlYDxH2FkE0I79fFvdS8HSwuzH/ e0Ug== Original-Received: by 10.216.199.206 with SMTP id x56mr9068410wen.75.1354188718380; Thu, 29 Nov 2012 03:31:58 -0800 (PST) Original-Received: by 10.217.62.202 with HTTP; Thu, 29 Nov 2012 03:31:58 -0800 (PST) In-Reply-To: <80wqx4hdm9.fsf@somewhere.org> X-Google-Sender-Auth: PhZaUpnAZ2FhnDASRrMEMm-uADo X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.82.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87932 Archived-At: On Thu, Nov 29, 2012 at 6:06 PM, Sebastien Vauban 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=92d 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.