<?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"
	>
<channel>
	<title>Comments on: Dos2unix in Emacs, Sometimes Macros Are Nice</title>
	<atom:link href="http://rubinium.org/blog/archives/2007/11/30/dos2unix-in-emacs-sometimes-macros-are-nice/feed/" rel="self" type="application/rss+xml" />
	<link>http://rubinium.org/blog/archives/2007/11/30/dos2unix-in-emacs-sometimes-macros-are-nice/</link>
	<description>The Element of Aron and Heather</description>
	<pubDate>Fri, 21 Nov 2008 17:29:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: A R Baboon</title>
		<link>http://rubinium.org/blog/archives/2007/11/30/dos2unix-in-emacs-sometimes-macros-are-nice/#comment-9009</link>
		<dc:creator>A R Baboon</dc:creator>
		<pubDate>Sun, 20 Jan 2008 17:21:59 +0000</pubDate>
		<guid isPermaLink="false">http://rubinium.org/blog/archives/2007/11/30/dos2unix-in-emacs-sometimes-macros-are-nice/#comment-9009</guid>
		<description>It would be good to save and restore the point for convenience. Also a unix2dos has now become useful for diff/cvs interactions.</description>
		<content:encoded><![CDATA[<p>It would be good to save and restore the point for convenience. Also a unix2dos has now become useful for diff/cvs interactions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A R Baboon</title>
		<link>http://rubinium.org/blog/archives/2007/11/30/dos2unix-in-emacs-sometimes-macros-are-nice/#comment-9008</link>
		<dc:creator>A R Baboon</dc:creator>
		<pubDate>Sun, 20 Jan 2008 17:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://rubinium.org/blog/archives/2007/11/30/dos2unix-in-emacs-sometimes-macros-are-nice/#comment-9008</guid>
		<description>The Microsoft line ending is prepends each line feed with a carriage return. All we want to do strip out any carriage returns. I would say that we should do a more sophisticated pattern match for line ending, etc., but I am not sure there should ever be carriage returns in a file.</description>
		<content:encoded><![CDATA[<p>The Microsoft line ending is prepends each line feed with a carriage return. All we want to do strip out any carriage returns. I would say that we should do a more sophisticated pattern match for line ending, etc., but I am not sure there should ever be carriage returns in a file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hagen</title>
		<link>http://rubinium.org/blog/archives/2007/11/30/dos2unix-in-emacs-sometimes-macros-are-nice/#comment-9007</link>
		<dc:creator>Hagen</dc:creator>
		<pubDate>Fri, 18 Jan 2008 14:34:51 +0000</pubDate>
		<guid isPermaLink="false">http://rubinium.org/blog/archives/2007/11/30/dos2unix-in-emacs-sometimes-macros-are-nice/#comment-9007</guid>
		<description>Not to be a smart ass, but the function doesn't do what it says in the description. It replaces the ^M with nothing, not with ^J. For most files this is fine, since the ^M appears at the end of the line. If the ^M is immersed in the lines you have to (replace-match (string ?\C-j) nil t) of course. In the file I needed this for (thank you for your function as my starting point), both cases appeared. So I solved it inelegant but pragmatic this way:

(defun dos2unix (buffer)
  (interactive "b buffer to convert" )
  (goto-char (point-min))
  (while (search-forward (string ?\C-m?\C-j) nil t)
    (replace-match (string ?\C-j) nil t))
  (goto-char (point-min))
  (while (search-forward (string ?\C-m) nil t)
    (replace-match (string ?\C-j) nil t)))</description>
		<content:encoded><![CDATA[<p>Not to be a smart ass, but the function doesn&#8217;t do what it says in the description. It replaces the ^M with nothing, not with ^J. For most files this is fine, since the ^M appears at the end of the line. If the ^M is immersed in the lines you have to (replace-match (string ?\C-j) nil t) of course. In the file I needed this for (thank you for your function as my starting point), both cases appeared. So I solved it inelegant but pragmatic this way:</p>
<p>(defun dos2unix (buffer)<br />
  (interactive &#8220;b buffer to convert&#8221; )<br />
  (goto-char (point-min))<br />
  (while (search-forward (string ?\C-m?\C-j) nil t)<br />
    (replace-match (string ?\C-j) nil t))<br />
  (goto-char (point-min))<br />
  (while (search-forward (string ?\C-m) nil t)<br />
    (replace-match (string ?\C-j) nil t)))</p>
]]></content:encoded>
	</item>
</channel>
</rss>
