From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: delete double lines Date: Fri, 11 Aug 2006 12:41:17 +0200 Message-ID: <9773EFADA4FF6C43A49824D50B1539A701628962@exbe04.intra.dlr.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0864823224==" X-Trace: sea.gmane.org 1155292928 10140 80.91.229.2 (11 Aug 2006 10:42:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2006 10:42:08 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 11 12:42:07 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GBUSk-0002VH-VN for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 12:41:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBUSk-00075S-Fn for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 06:41:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GBUSX-000745-83 for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 06:41:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GBUSV-00071q-3s for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 06:41:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBUSU-00071R-77 for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 06:41:42 -0400 Original-Received: from [195.37.61.185] (helo=smtp-1.dlr.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GBUXb-0000fs-9D for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 06:46:59 -0400 Original-Received: from exbe04.intra.dlr.de ([192.168.35.37]) by smtp-1.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Fri, 11 Aug 2006 12:41:39 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.7232.53 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: delete double lines Thread-Index: Aca9Mq0zKQSuKmZCTyKM54EVlU0UTw== Original-To: X-OriginalArrivalTime: 11 Aug 2006 10:41:39.0447 (UTC) FILETIME=[BA132870:01C6BD32] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36594 Archived-At: This is a multi-part message in MIME format. --===============0864823224== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6BD32.AD886F2A" This is a multi-part message in MIME format. ------_=_NextPart_001_01C6BD32.AD886F2A Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable hello all, =20 is there any solution for delete double lines with emacs commands (or macros)? =20 f.g. =20 line1 line1 line2 line1 line2 =20 shall be processed to =20 line1 line2 =20 =20 thanks and greetings from munich christian ------_=_NextPart_001_01C6BD32.AD886F2A Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
hello=20 all,
 
is = there any=20 solution for delete double lines with emacs commands (or=20 macros)?
 
f.g.
 
line1
line1
line2
line1
line2
 
shall = be processed=20 to
 
line1
line2
 
 
thanks = and greetings=20 from munich
christian
------_=_NextPart_001_01C6BD32.AD886F2A-- --===============0864823224== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0864823224==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: delete double lines Date: Fri, 11 Aug 2006 12:56:55 +0200 Message-ID: References: <9773EFADA4FF6C43A49824D50B1539A701628962@exbe04.intra.dlr.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1155293844 12792 80.91.229.2 (11 Aug 2006 10:57:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2006 10:57:24 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 11 12:57:22 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GBUhb-0005Ft-ID for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 12:57:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBUhb-0000jC-5H for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 06:57:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GBUhQ-0000ix-4B for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 06:57:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GBUhN-0000ic-E4 for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 06:57:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBUhN-0000iZ-81 for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 06:57:05 -0400 Original-Received: from [217.72.192.227] (helo=fmmailgate02.web.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GBUmU-0001zq-EN for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 07:02:22 -0400 Original-Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate02.web.de (Postfix) with ESMTP id C19651069F9E; Fri, 11 Aug 2006 12:56:57 +0200 (CEST) Original-Received: from [84.245.187.132] (helo=[192.168.1.2]) by smtp08.web.de with asmtp (TLSv1:RC4-SHA:128) (WEB.DE 4.107 #114) id 1GBUhF-0006gX-00; Fri, 11 Aug 2006 12:56:57 +0200 In-Reply-To: <9773EFADA4FF6C43A49824D50B1539A701628962@exbe04.intra.dlr.de> X-Image-Url: http://homepage.mac.com/sparifankal/.cv/thumbs/me.thumbnail Original-To: X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36595 Archived-At: Am 11.08.2006 um 12:41 schrieb : > is there any solution for delete double lines with emacs commands =20 > (or macros)? > What about shell-command-on-region? And the shell command is 'sort -u'. -- Mit friedvollen Gr=FC=DFen Pete =93Computers are good at following instructions, but not at reading =20 your mind.=94 - D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9 From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: AW: delete double lines Date: Fri, 11 Aug 2006 13:04:08 +0200 Message-ID: <9773EFADA4FF6C43A49824D50B1539A701628976@exbe04.intra.dlr.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1155294325 14295 80.91.229.2 (11 Aug 2006 11:05:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2006 11:05:25 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 11 13:05:23 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GBUpE-0006Xr-4k for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 13:05:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBUpD-0005IB-OM for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 07:05:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GBUop-0005B7-QO for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 07:04:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GBUom-00057w-AA for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 07:04:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBUol-00057Y-70 for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 07:04:43 -0400 Original-Received: from [195.37.61.187] (helo=smtp-2.dlr.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GBUts-0002px-1V for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 07:10:00 -0400 Original-Received: from exbe04.intra.dlr.de ([192.168.35.37]) by smtp-2.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Fri, 11 Aug 2006 13:04:41 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.7232.53 Content-class: urn:content-classes:message In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: delete double lines Thread-Index: Aca9NN23ZD/BK0kBQtm8xjCeUE0koQAAJUAQ Original-To: X-OriginalArrivalTime: 11 Aug 2006 11:04:41.0537 (UTC) FILETIME=[F1DD5B10:01C6BD35] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36596 Archived-At: i am working in an windows environment. i think the windows sort command = has no comparable option to suppress double lines. =20 -----Urspr=FCngliche Nachricht----- Von: Peter_Dyballa@Web.DE [mailto:Peter_Dyballa@Web.DE]=20 Gesendet: Freitag, 11. August 2006 12:57 An: Strobl, Christian Cc: help-gnu-emacs@gnu.org Betreff: Re: delete double lines Am 11.08.2006 um 12:41 schrieb : > is there any solution for delete double lines with emacs commands (or=20 > macros)? > What about shell-command-on-region? And the shell command is 'sort -u'. -- Mit friedvollen Gr=FC=DFen Pete "Computers are good at following instructions, but not at reading =20 your mind." - D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9 From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: AW: delete double lines Date: Fri, 11 Aug 2006 15:59:53 +0300 Message-ID: References: <9773EFADA4FF6C43A49824D50B1539A701628976@exbe04.intra.dlr.de> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1155301220 3785 80.91.229.2 (11 Aug 2006 13:00:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2006 13:00:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 11 15:00:17 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GBWcR-0000bo-OM for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 15:00:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBWcQ-0004Eg-Rc for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 09:00:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GBWcE-0004D1-Hh for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 08:59:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GBWcC-000477-Pg for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 08:59:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBWcC-00046w-LP for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 08:59:52 -0400 Original-Received: from [192.114.186.73] (helo=heller.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GBWhK-0004c1-Ud for help-gnu-emacs@gnu.org; Fri, 11 Aug 2006 09:05:11 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-228-236-45.inter.net.il [84.228.236.45]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id AEY23883 (AUTH halo1); Fri, 11 Aug 2006 15:59:50 +0300 (IDT) Original-To: help-gnu-emacs@gnu.org In-reply-to: <9773EFADA4FF6C43A49824D50B1539A701628976@exbe04.intra.dlr.de> (C.Strobl@dlr.de) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36598 Archived-At: > Date: Fri, 11 Aug 2006 13:04:08 +0200 > From: > Cc: help-gnu-emacs@gnu.org > > i am working in an windows environment. i think the windows sort command has no comparable option to suppress double lines. You can find a port of GNU sort on the GnuWin32 site. From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris McMahan Newsgroups: gmane.emacs.help Subject: Re: delete double lines Date: Fri, 11 Aug 2006 09:30:42 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: References: <9773EFADA4FF6C43A49824D50B1539A701628962@exbe04.intra.dlr.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1155303727 12525 80.91.229.2 (11 Aug 2006 13:42:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2006 13:42:07 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 11 15:42:05 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GBXGm-0008FF-5d for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 15:41:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBXGl-0003z1-Cs for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 09:41:47 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: panix5.panix.com Original-X-Trace: reader2.panix.com 1155303084 28428 166.84.1.5 (11 Aug 2006 13:31:24 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Fri, 11 Aug 2006 13:31:24 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:rSbljzII8JW7WWeyM99Nh/YygX0= Original-Xref: shelby.stanford.edu gnu.emacs.help:140974 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36599 Archived-At: M-x sort-lines to get the same results. If you only want to sort part of the buffer, just highlight the region you want sorted and execute the same function. I use this quite frequently! - Chris Peter Dyballa writes: > Am 11.08.2006 um 12:41 schrieb : > >> is there any solution for delete double lines with emacs commands >> (or macros)? >> > > What about shell-command-on-region? And the shell command is 'sort -u'. > > -- > Mit friedvollen Grüßen > > Pete > > “Computers are good at following instructions, but not at reading > your mind.” > - D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9 -- (. .) =ooO=(_)=Ooo===================================== Chris McMahan | first_initiallastname@one.dot.net ================================================= From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris McMahan Newsgroups: gmane.emacs.help Subject: Re: delete double lines Date: Fri, 11 Aug 2006 09:34:25 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: References: <9773EFADA4FF6C43A49824D50B1539A701628962@exbe04.intra.dlr.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1155303750 12597 80.91.229.2 (11 Aug 2006 13:42:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2006 13:42:30 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 11 15:42:30 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GBXHC-0008Li-MC for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 15:42:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBXHC-0004Pi-1I for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 09:42:14 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: panix5.panix.com Original-X-Trace: reader2.panix.com 1155303308 28428 166.84.1.5 (11 Aug 2006 13:35:08 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Fri, 11 Aug 2006 13:35:08 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:CPQASXZHm42uOC2nqhCgq6GekZQ= Original-Xref: shelby.stanford.edu gnu.emacs.help:140975 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36600 Archived-At: Oops! sort-lines doesn't uniquify... Cygwin has a sort function that handles the -u switch, but it means installing the entire cygwin environment. - Chris Chris McMahan writes: > M-x sort-lines to get the same results. > > If you only want to sort part of the buffer, just highlight the region > you want sorted and execute the same function. > > I use this quite frequently! > > - Chris > > Peter Dyballa writes: > >> Am 11.08.2006 um 12:41 schrieb : >> >>> is there any solution for delete double lines with emacs commands >>> (or macros)? >>> >> >> What about shell-command-on-region? And the shell command is 'sort -u'. >> >> -- >> Mit friedvollen Grüßen >> >> Pete >> >> “Computers are good at following instructions, but not at reading >> your mind.” >> - D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9 -- (. .) =ooO=(_)=Ooo===================================== Chris McMahan | first_initiallastname@one.dot.net ================================================= From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: delete double lines Date: Fri, 11 Aug 2006 17:05:04 +0200 Organization: Informatimago Message-ID: <87bqqr5n4v.fsf@thalassa.informatimago.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1155310882 6192 80.91.229.2 (11 Aug 2006 15:41:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2006 15:41:22 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 11 17:41:20 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GBZ8E-0007aG-Rq for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 17:41:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBZ84-0006F2-Ok for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2006 11:40:56 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 71 Original-X-Trace: individual.net KKYnTqaufCd5tm1Kncrt4AfdDHUxGTsHdhIbJNNRhslJD69cyA Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:1ta+BC0T89yfb71lT7tw9/gQ7LU= Original-Xref: shelby.stanford.edu gnu.emacs.help:140978 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36603 Archived-At: writes: > hello all, > > > > is there any solution for delete double lines with emacs commands (or macros)? > > > > f.g. > > > > line1 > > line1 > > line2 > > line1 > > line2 > > > > shall be processed to > > > > line1 > > line2 > > > > > > thanks and greetings from munich >>From emacs, I would select the range of lines, then type: C-u M-| sort -u | sed -n -e p -e 's/.*//p' RET If you want a pure emacs solution: (require 'cl) (defun sort-unique-lines-with-double-spacing (start end) (interactive "r") (save-excursion (goto-char start) (let ((lines '())) (while (and (< (point) end) (re-search-forward "^\\(.*\\)$" end t)) (push (buffer-substring (match-beginning 0) (match-end 0)) lines)) (message "%S" lines) (delete-region start end) (dolist (line (sort (delete-duplicates lines :test (function string=)) (function string-lessp))) (insert (format "%s\n\n" line)))))) Then you can select the range of lines, and type M-x sort-unique-lines-with-double-spacing RET -- __Pascal Bourguignon__ http://www.informatimago.com/ HEALTH WARNING: Care should be taken when lifting this product, since its mass, and thus its weight, is dependent on its velocity relative to the user.