From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command Date: Tue, 04 Dec 2012 02:05:03 +0200 Organization: JURTA Message-ID: <87txs2iswg.fsf@mail.jurta.org> References: <87obig2ap2.fsf@mail.jurta.org> <874nk728ci.fsf@mail.jurta.org> <874nk63aps.fsf@mail.jurta.org> <87mwxxfhd3.fsf@mail.jurta.org> <87lidek86u.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354579788 24104 80.91.229.3 (4 Dec 2012 00:09:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2012 00:09:48 +0000 (UTC) To: 13032@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 01:10:00 2012 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 1Tfg5C-0005p5-8f for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 01:09:54 +0100 Original-Received: from localhost ([::1]:34818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfg50-0006Xi-Ae for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Dec 2012 19:09:42 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfg4x-0006XX-3B for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2012 19:09:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tfg4v-00057o-UZ for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2012 19:09:38 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfg4v-00057j-Rk for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2012 19:09:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tfg7G-0006K9-AO for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2012 19:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Dec 2012 00:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13032 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13032-submit@debbugs.gnu.org id=B13032.135457986524246 (code B ref 13032); Tue, 04 Dec 2012 00:12:02 +0000 Original-Received: (at 13032) by debbugs.gnu.org; 4 Dec 2012 00:11:05 +0000 Original-Received: from localhost ([127.0.0.1]:52142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tfg6L-0006J1-5u for submit@debbugs.gnu.org; Mon, 03 Dec 2012 19:11:05 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:52020 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tfg6J-0006Is-DD for 13032@debbugs.gnu.org; Mon, 03 Dec 2012 19:11:03 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 6EA2DAAB4B9C; Mon, 3 Dec 2012 16:08:37 -0800 (PST) In-Reply-To: <87lidek86u.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 04 Dec 2012 01:49:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:67878 Archived-At: >>> The ADJACENT argument is an optimization that doesn't require >>> additional memory (to store previous lines in the cache). >>> This is necessary when the user needs to delete duplicate lines >>> in a large sorted file. >> >> Ah, good point. I guess that the optimization is twofold: in memory >> and also in performance. Then, IMO this should be explained in the >> docstring, so that users know that they should use this feature when >> running this command over a large chunk of lines. > > Thanks for the suggestion, I added this as well. It just occurred to me that we could also add an alias `uniq' that will call the command `delete-duplicate-lines' with non-nil ADJACENT arg. We already have aliases like `mkdir' for `make-directory', so the command `uniq' would be handy too.