GNU bug report logs - #13032
24.3.50; Request: Provide a `delete-duplicate-lines' command

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Thu, 29 Nov 2012 19:26:01 UTC

Severity: wishlist

Found in version 24.3.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 13032 <at> debbugs.gnu.org
Subject: bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command
Date: Tue, 04 Dec 2012 09:46:33 -0500
>       (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.


        Stefan




This bug report was last modified 12 years and 172 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.