From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.help Subject: Re: how to sort words in a line Date: Tue, 17 Jul 2007 22:12:07 +0200 Organization: Norwegian university of science and technology Message-ID: References: <87r6n7l41m.fsf@thalassa.lan.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184704863 995 80.91.229.12 (17 Jul 2007 20:41:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2007 20:41:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 17 22:41:00 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IAtqt-0005CL-FY for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Jul 2007 22:40:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAtqt-0007Dd-1I for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Jul 2007 16:40:59 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!ntnu.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: fiinbeck.math.ntnu.no Original-X-Trace: orkan.itea.ntnu.no 1184703127 23365 129.241.15.140 (17 Jul 2007 20:12:07 GMT) Original-X-Complaints-To: usenet@itea.ntnu.no Original-NNTP-Posting-Date: Tue, 17 Jul 2007 20:12:07 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix) Cancel-Lock: sha1:vUewUuirvwDlTV0V5KLDCKxq1gQ= Original-Xref: shelby.stanford.edu gnu.emacs.help:150181 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:45766 Archived-At: + Rainer Stengele : | Harald Hanche-Olsen schrieb: |> You could also pipe the line through the command |> |> tr ' ' \n | sort | tr \n ' ' | | calling external processes to sort a line seems to me quite a little | overhead. It all depends. For example, it depends on how often you need to do this thing. If you do it only very rarely, I would assume that the savings of your time (seconds? minutes?) is more valuable than the wasted milliseconds of CPU time. But, your milage may vary, as they say. Perhaps your time is worthless, and CPU cycles are really valuable. Lots of people behave like this is so. I fall into the trap myself from time to time. -- * Harald Hanche-Olsen - It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. -- Bertrand Russell