From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jens.Schmidt27@epost.de (Jens Schmidt) Newsgroups: gmane.emacs.help Subject: Re: How to implement line sorting, uniquifying and counting function in emacs? Date: 30 Sep 2002 01:12:56 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-admin@gnu.org Message-ID: <958686cf.0209300012.8810a00@posting.google.com> References: NNTP-Posting-Host: localhost.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1033374376 12985 127.0.0.1 (30 Sep 2002 08:26:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 30 Sep 2002 08:26:16 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17vvsc-0003Mf-00 for ; Mon, 30 Sep 2002 10:26:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17vvsp-0002Fd-00; Mon, 30 Sep 2002 04:26:27 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-NNTP-Posting-Host: 217.163.5.253 Original-X-Trace: posting.google.com 1033373577 11752 127.0.0.1 (30 Sep 2002 08:12:57 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 30 Sep 2002 08:12:57 GMT Original-Xref: nntp.stanford.edu gnu.emacs.help:105529 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2073 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2073 Sorting: M-x apropos sort-.* RET Counting: M-x apropos count.*lines RET The only non-trivial part is uniquifying of buffer lines: M-x query-replace-regexp ^\(.*^Q^J\)\1+ \1 RET where you need to type ^Q^J as C-q C-j, of course. A non-interactive variant should be as easy as the interactive.