From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command Date: Tue, 04 Dec 2012 16:02:17 +0100 Organization: Emacs Helm Message-ID: <87txs16eti.fsf@gmail.com> References: <87obig2ap2.fsf@mail.jurta.org> <87obia9u36.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354633442 29176 80.91.229.3 (4 Dec 2012 15:04:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2012 15:04:02 +0000 (UTC) Cc: 13032@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 16:04:13 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 1Tfu2a-0005aJ-JE for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 16:04:08 +0100 Original-Received: from localhost ([::1]:55705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfu2O-0004HI-OG for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 10:03:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfu2G-0004FZ-O8 for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 10:03:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tfu27-0000FD-7Z for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 10:03:48 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfu27-0000F8-40 for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 10:03:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tfu4P-0003Wf-Tn for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 10:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Dec 2012 15:06:01 +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.135463350213472 (code B ref 13032); Tue, 04 Dec 2012 15:06:01 +0000 Original-Received: (at 13032) by debbugs.gnu.org; 4 Dec 2012 15:05:02 +0000 Original-Received: from localhost ([127.0.0.1]:53299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tfu3Q-0003V3-3K for submit@debbugs.gnu.org; Tue, 04 Dec 2012 10:05:02 -0500 Original-Received: from mail-wi0-f176.google.com ([209.85.212.176]:52674) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tfu3M-0003Uv-Ng for 13032@debbugs.gnu.org; Tue, 04 Dec 2012 10:04:58 -0500 Original-Received: by mail-wi0-f176.google.com with SMTP id hm6so744714wib.15 for <13032@debbugs.gnu.org>; Tue, 04 Dec 2012 07:02:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=kznr9csd/XTS0olOQGBfQndOktCBzULBT4KJLyRcxtk=; b=yF87KYkmfzDlDYOE/EwJSMhTDMQ3N7Aki4WATgpyKK6p/Ha0vdzi3NdycHgsOJxQAK 13DmmSx+fWULb3wSBNFTF2jwAQhV1Jx8WIucJYjLJwsTqjJoESLB2OV+QmC/BnZIgmfn 6gd6614crd3lgWYEuexkM4vsu1Uilx7r/xE0g6tMugdGvooatomrbQ5fVur9KmYPkIOV hxIMjBqPgEqIKSST6Z4ucf9phfUNqLsalhVcg+CFKTcPGp8/CeOL/ri2ZqfWUA5US+q5 rMSKo5EKDzmI23g+vqLR5XdmXs1JV+tFhCMqD/CsU0+k17V4xJBFVINgl9HUGyvuUfKM HI1A== Original-Received: by 10.216.28.213 with SMTP id g63mr4878842wea.66.1354633346398; Tue, 04 Dec 2012 07:02:26 -0800 (PST) Original-Received: from dell-14z (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by mx.google.com with ESMTPS id s12sm15370005wik.11.2012.12.04.07.02.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Dec 2012 07:02:25 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Tue, 04 Dec 2012 09:46:33 -0500") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.90 (gnu/linux) 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:67897 Archived-At: Stefan Monnier writes: >> (let ((lines (helm-fast-remove-dups >> (split-string (buffer-string) "\n" t) >> :test 'equal))) >> (delete-region (point-min) (point-max)) >> (loop for l in lines do (insert (concat l "\n"))))))) > > The inconvenient with this version is that any overlays/markers will > be lost, and the buffer will be marked as modified even if there were no > duplicate lines. Ok, was just for info on a fast alternative without such enhancements. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997