<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Sorting Text by Line, Field and Regexp in Emacs</title>
	<atom:link href="http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/</link>
	<description>a blog about mastering the world&#039;s best text editor</description>
	<lastBuildDate>Fri, 17 May 2013 21:26:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: mickey</title>
		<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/#comment-19176</link>
		<dc:creator>mickey</dc:creator>
		<pubDate>Thu, 10 Jan 2013 09:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.masteringemacs.org/?p=409#comment-19176</guid>
		<description><![CDATA[Hello. Sorry for the late reply.

Given this:

&lt;pre&gt;
biz index: 5 foo
index: 4 foobar
barbaz index: 3
&lt;/pre&gt;

I can turn it into this:

&lt;pre&gt;
barbaz index: 3
index: 4 foobar
biz index: 5 foo
&lt;/pre&gt;

Using the following:

&lt;pre&gt;
M-x sort-regexp-fields RET
Regexp specifying records to sort: ^.+$
Regexp specifying key within record: index: [0-9]+
&lt;/pre&gt;

Enjoy :)]]></description>
		<content:encoded><![CDATA[<p>Hello. Sorry for the late reply.</p>
<p>Given this:</p>
<pre>
biz index: 5 foo
index: 4 foobar
barbaz index: 3
</pre>
<p>I can turn it into this:</p>
<pre>
barbaz index: 3
index: 4 foobar
biz index: 5 foo
</pre>
<p>Using the following:</p>
<pre>
M-x sort-regexp-fields RET
Regexp specifying records to sort: ^.+$
Regexp specifying key within record: index: [0-9]+
</pre>
<p>Enjoy <img src='http://www.masteringemacs.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Linhua Tan</title>
		<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/#comment-18214</link>
		<dc:creator>Linhua Tan</dc:creator>
		<pubDate>Wed, 19 Dec 2012 03:13:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.masteringemacs.org/?p=409#comment-18214</guid>
		<description><![CDATA[How could I use the sort-regexp-fields to emulate the sort-numeric-fields. I tried like this:
123
345
90
80
1999
sort-regexp-fields
Regexp specifying records to sort: \([0-9]+\)
Regexp specifying key within record: \, \#1
But it can&#039;t work. 
what I really want to sort is something like this:
foo    index: 123
index: 345  boo
...
the question is: I want to sort the lines by the number after the word &quot;index&quot;, but the number is not in the same field, they just have a word &quot;index&quot; before it. what should I do to complete this? can you help me?]]></description>
		<content:encoded><![CDATA[<p>How could I use the sort-regexp-fields to emulate the sort-numeric-fields. I tried like this:<br />
123<br />
345<br />
90<br />
80<br />
1999<br />
sort-regexp-fields<br />
Regexp specifying records to sort: \([0-9]+\)<br />
Regexp specifying key within record: \, \#1<br />
But it can&#8217;t work.<br />
what I really want to sort is something like this:<br />
foo    index: 123<br />
index: 345  boo<br />
&#8230;<br />
the question is: I want to sort the lines by the number after the word &#8220;index&#8221;, but the number is not in the same field, they just have a word &#8220;index&#8221; before it. what should I do to complete this? can you help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/#comment-6421</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Sun, 05 Feb 2012 04:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.masteringemacs.org/?p=409#comment-6421</guid>
		<description><![CDATA[Thanks for the article. The command which shows how to select the column on which to sort is particularly useful.

Raj]]></description>
		<content:encoded><![CDATA[<p>Thanks for the article. The command which shows how to select the column on which to sort is particularly useful.</p>
<p>Raj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mickey</title>
		<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/#comment-1385</link>
		<dc:creator>mickey</dc:creator>
		<pubDate>Wed, 03 Aug 2011 12:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.masteringemacs.org/?p=409#comment-1385</guid>
		<description><![CDATA[Mary,

Try &lt;code&gt;M-1 M-x sort-numeric-fields&lt;/code&gt; to sort by the first column.

Mickey.]]></description>
		<content:encoded><![CDATA[<p>Mary,</p>
<p>Try <code>M-1 M-x sort-numeric-fields</code> to sort by the first column.</p>
<p>Mickey.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mary Sims</title>
		<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/#comment-1382</link>
		<dc:creator>Mary Sims</dc:creator>
		<pubDate>Tue, 02 Aug 2011 18:53:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.masteringemacs.org/?p=409#comment-1382</guid>
		<description><![CDATA[I am not a brainiac but I&#039;m trying.  On the excel sheet the school bus numbers are in row a, the drivers last name is in row b.  The drivers first name is in row c.  The drivers  phone # is in row D.  Row E has a elementary school, row F has middle school and row G has high school.  This is an example:

1234  Doe    John    123-4567  washington   franklin   wilson.

These items are in individual rows.  I would like to sort by bus number with their information next to the number.  HELP.]]></description>
		<content:encoded><![CDATA[<p>I am not a brainiac but I&#8217;m trying.  On the excel sheet the school bus numbers are in row a, the drivers last name is in row b.  The drivers first name is in row c.  The drivers  phone # is in row D.  Row E has a elementary school, row F has middle school and row G has high school.  This is an example:</p>
<p>1234  Doe    John    123-4567  washington   franklin   wilson.</p>
<p>These items are in individual rows.  I would like to sort by bus number with their information next to the number.  HELP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/#comment-1278</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Tue, 05 Jul 2011 19:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.masteringemacs.org/?p=409#comment-1278</guid>
		<description><![CDATA[Try org-sort-entries!]]></description>
		<content:encoded><![CDATA[<p>Try org-sort-entries!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/#comment-1085</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Tue, 31 May 2011 20:13:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.masteringemacs.org/?p=409#comment-1085</guid>
		<description><![CDATA[So suppose I have an org-mode document that looks like:
* Title 1
** Section blah
stuff here
** Section blah-more
more stuff here
** Section argh
even more stuff

and I want to sort the sections (and their accompanying text) so that Section argh is first.

How would I do that?]]></description>
		<content:encoded><![CDATA[<p>So suppose I have an org-mode document that looks like:<br />
* Title 1<br />
** Section blah<br />
stuff here<br />
** Section blah-more<br />
more stuff here<br />
** Section argh<br />
even more stuff</p>
<p>and I want to sort the sections (and their accompanying text) so that Section argh is first.</p>
<p>How would I do that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Sosa</title>
		<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/#comment-1082</link>
		<dc:creator>Igor Sosa</dc:creator>
		<pubDate>Tue, 31 May 2011 13:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.masteringemacs.org/?p=409#comment-1082</guid>
		<description><![CDATA[many thanks for your articles! They are really interesting!]]></description>
		<content:encoded><![CDATA[<p>many thanks for your articles! They are really interesting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sorting With Emacs &#124; Irreal</title>
		<link>http://www.masteringemacs.org/articles/2011/05/29/sorting-text-line-field-regexp-emacs/#comment-1068</link>
		<dc:creator>Sorting With Emacs &#124; Irreal</dc:creator>
		<pubDate>Mon, 30 May 2011 11:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.masteringemacs.org/?p=409#comment-1068</guid>
		<description><![CDATA[[...] over at Mastering Emacs has a great post on sorting in Emacs. Did you know you can sort by regular expressions? I didn&#8217;t. Get over there and read the [...]]]></description>
		<content:encoded><![CDATA[<p>[...] over at Mastering Emacs has a great post on sorting in Emacs. Did you know you can sort by regular expressions? I didn&#8217;t. Get over there and read the [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
