<?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 for Dysfunctional Programming</title>
	<atom:link href="http://www.joshmatthews.net/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joshmatthews.net/blog</link>
	<description>/* You are not expected to understand this */</description>
	<lastBuildDate>Sat, 04 Feb 2012 03:50:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on About by Udit</title>
		<link>http://www.joshmatthews.net/blog/about/comment-page-1/#comment-16764</link>
		<dc:creator>Udit</dc:creator>
		<pubDate>Sat, 04 Feb 2012 03:50:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-16764</guid>
		<description>Hey Josh..

I am too a Computer Science student and currently working with Infosys. I appreciate your effort in open source and hope you will keep that up..</description>
		<content:encoded><![CDATA[<p>Hey Josh..</p>
<p>I am too a Computer Science student and currently working with Infosys. I appreciate your effort in open source and hope you will keep that up..</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on smartmake redux: harder, better, faster, stronger by Josh Matthews</title>
		<link>http://www.joshmatthews.net/blog/2012/01/smartmake-redux-harder-better-faster-stronger/comment-page-1/#comment-16718</link>
		<dc:creator>Josh Matthews</dc:creator>
		<pubDate>Thu, 02 Feb 2012 03:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=150#comment-16718</guid>
		<description>It&#039;s not documented, but smartmake.py first checks MOZ_OBJDIR before looking at the config file.</description>
		<content:encoded><![CDATA[<p>It&#8217;s not documented, but smartmake.py first checks MOZ_OBJDIR before looking at the config file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on smartmake redux: harder, better, faster, stronger by njn</title>
		<link>http://www.joshmatthews.net/blog/2012/01/smartmake-redux-harder-better-faster-stronger/comment-page-1/#comment-16716</link>
		<dc:creator>njn</dc:creator>
		<pubDate>Thu, 02 Feb 2012 01:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=150#comment-16716</guid>
		<description>The usage message says:

Usage: smartmake.py [-f] [&#039;find&#039; parseable timestamp (optional)]
  Must have a .smartmake config file present in .hg/ containing
    [smartmake]
    objdir: your-objdir/
    cmd: make -C (or equivalent make command)

Does this mean it&#039;s difficult to use if you have more than one objdir?</description>
		<content:encoded><![CDATA[<p>The usage message says:</p>
<p>Usage: smartmake.py [-f] ['find' parseable timestamp (optional)]<br />
  Must have a .smartmake config file present in .hg/ containing<br />
    [smartmake]<br />
    objdir: your-objdir/<br />
    cmd: make -C (or equivalent make command)</p>
<p>Does this mean it&#8217;s difficult to use if you have more than one objdir?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Faster mercurial patch queue merging with emacs by Jim Blandy</title>
		<link>http://www.joshmatthews.net/blog/2010/03/faster-mercurial-patch-queue-merging-with-emacs/comment-page-1/#comment-16707</link>
		<dc:creator>Jim Blandy</dc:creator>
		<pubDate>Wed, 01 Feb 2012 17:58:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=52#comment-16707</guid>
		<description>Apparently, I hadn&#039;t actually re-loaded my new definition before I pasted it above. Here&#039;s a version that works. [blush] I&#039;ve made some changes:

- C-x r is a prefix command for register and bookmark commands, , so I don&#039;t want to override it for kill-hg-reject. Instead, giving C-c r a prefix argument invokes kill-hg-reject.

- kill-hg-reject not only kills the buffer visiting the .rej file, but also closes windows displaying that buffer. If C-c r popped up a window to show the reject file, then C-u C-c r will restore the frame to showing only the patched file.


(defun switch-hg-reject (kill-reject)
  &quot;Switch between a .rej file and the file it applies to.
With a prefix argument, kill the buffer visiting the reject file.&quot;
  (interactive &quot;P&quot;)
  (unless (buffer-file-name)
    (error &quot;Buffer is not visiting any file&quot;))
  (if kill-reject
      (kill-hg-reject)
    (let ((other-file
           (if (string-match &quot;\\.rej$&quot; (buffer-file-name))
               (substring (buffer-file-name) 0 (match-beginning 0))
             (concat (buffer-file-name) &quot;.rej&quot;))))
      (unless (file-exists-p other-file)
        (error &quot;Reject/original file not found: %s&quot; other-file))
      (save-selected-window
        (find-file-other-window other-file)))))

(defun kill-hg-reject ()
  (interactive)
  (let* ((reject-file
         (if (string-match &quot;\\.rej$&quot; (buffer-file-name))
             (buffer-file-name)
           (concat (buffer-file-name) &quot;.rej&quot;)))
         (buf (find-buffer-visiting reject-file)))
    (unless buf
      (error &quot;Not visiting reject file: %s&quot; reject-file))
    (delete-windows-on buf)
    (kill-buffer buf)))

(global-set-key (kbd &quot;C-c r&quot;) &#039;switch-hg-reject)
</description>
		<content:encoded><![CDATA[<p>Apparently, I hadn&#8217;t actually re-loaded my new definition before I pasted it above. Here&#8217;s a version that works. [blush] I&#8217;ve made some changes:</p>
<p>- C-x r is a prefix command for register and bookmark commands, , so I don&#8217;t want to override it for kill-hg-reject. Instead, giving C-c r a prefix argument invokes kill-hg-reject.</p>
<p>- kill-hg-reject not only kills the buffer visiting the .rej file, but also closes windows displaying that buffer. If C-c r popped up a window to show the reject file, then C-u C-c r will restore the frame to showing only the patched file.</p>
<p>(defun switch-hg-reject (kill-reject)<br />
  &#8220;Switch between a .rej file and the file it applies to.<br />
With a prefix argument, kill the buffer visiting the reject file.&#8221;<br />
  (interactive &#8220;P&#8221;)<br />
  (unless (buffer-file-name)<br />
    (error &#8220;Buffer is not visiting any file&#8221;))<br />
  (if kill-reject<br />
      (kill-hg-reject)<br />
    (let ((other-file<br />
           (if (string-match &#8220;\\.rej$&#8221; (buffer-file-name))<br />
               (substring (buffer-file-name) 0 (match-beginning 0))<br />
             (concat (buffer-file-name) &#8220;.rej&#8221;))))<br />
      (unless (file-exists-p other-file)<br />
        (error &#8220;Reject/original file not found: %s&#8221; other-file))<br />
      (save-selected-window<br />
        (find-file-other-window other-file)))))</p>
<p>(defun kill-hg-reject ()<br />
  (interactive)<br />
  (let* ((reject-file<br />
         (if (string-match &#8220;\\.rej$&#8221; (buffer-file-name))<br />
             (buffer-file-name)<br />
           (concat (buffer-file-name) &#8220;.rej&#8221;)))<br />
         (buf (find-buffer-visiting reject-file)))<br />
    (unless buf<br />
      (error &#8220;Not visiting reject file: %s&#8221; reject-file))<br />
    (delete-windows-on buf)<br />
    (kill-buffer buf)))</p>
<p>(global-set-key (kbd &#8220;C-c r&#8221;) &#8216;switch-hg-reject)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Faster mercurial patch queue merging with emacs by Jim Blandy</title>
		<link>http://www.joshmatthews.net/blog/2010/03/faster-mercurial-patch-queue-merging-with-emacs/comment-page-1/#comment-16657</link>
		<dc:creator>Jim Blandy</dc:creator>
		<pubDate>Tue, 31 Jan 2012 14:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=52#comment-16657</guid>
		<description>Emacs should bring up .rej files in diff-mode, so C-c C-c anywhere in a diff should just jump to the spot in the file to which the hunk applies.</description>
		<content:encoded><![CDATA[<p>Emacs should bring up .rej files in diff-mode, so C-c C-c anywhere in a diff should just jump to the spot in the file to which the hunk applies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Faster mercurial patch queue merging with emacs by Steve Fink</title>
		<link>http://www.joshmatthews.net/blog/2010/03/faster-mercurial-patch-queue-merging-with-emacs/comment-page-1/#comment-16496</link>
		<dc:creator>Steve Fink</dc:creator>
		<pubDate>Fri, 27 Jan 2012 18:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=52#comment-16496</guid>
		<description>Hm. I use a silly perl script I call &#039;em&#039; that you cut &amp; paste the .rej filenames from the badnasty hg qpush message. It reparents them to $(hg root), scans them for the starting line of the first chunk, and then opens each .rej file along with original starting at the appropriate line number. So when running from /myhome/js/src, em js/src/file1.h.rej js/src/file2.cpp.rej will end up invoking something like emacs /myhome/js/src/file1.h.rej +228 /myhome/js/src/file1.h ...(similar for file2)...

That way, I get the reject and the original open in separate buffers, and don&#039;t have to worry about the current working directory.

I&#039;ll have to try yours/jimb&#039;s. They seem like they may be more betterer, at least if you added in the &quot;jump to site of first conflict&quot; thing.</description>
		<content:encoded><![CDATA[<p>Hm. I use a silly perl script I call &#8216;em&#8217; that you cut &amp; paste the .rej filenames from the badnasty hg qpush message. It reparents them to $(hg root), scans them for the starting line of the first chunk, and then opens each .rej file along with original starting at the appropriate line number. So when running from /myhome/js/src, em js/src/file1.h.rej js/src/file2.cpp.rej will end up invoking something like emacs /myhome/js/src/file1.h.rej +228 /myhome/js/src/file1.h &#8230;(similar for file2)&#8230;</p>
<p>That way, I get the reject and the original open in separate buffers, and don&#8217;t have to worry about the current working directory.</p>
<p>I&#8217;ll have to try yours/jimb&#8217;s. They seem like they may be more betterer, at least if you added in the &#8220;jump to site of first conflict&#8221; thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Faster mercurial patch queue merging with emacs by Jim Blandy</title>
		<link>http://www.joshmatthews.net/blog/2010/03/faster-mercurial-patch-queue-merging-with-emacs/comment-page-1/#comment-16494</link>
		<dc:creator>Jim Blandy</dc:creator>
		<pubDate>Fri, 27 Jan 2012 18:35:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=52#comment-16494</guid>
		<description>Even better! Here’s my rev:

&lt;pre lang=&quot;lisp&quot;&gt;
(defun switch-hg-reject ()
  (interactive)
  (unless (buffer-file-name)
    (error &quot;Buffer is not visiting any file&quot;))
  (let ((other-file
         (if (string-match &quot;\\.rej$&quot; (buffer-file-name))
             (substring (buffer-file-name) 0 (match-beginning 0))
           (concat (buffer-file-name) &quot;.rej&quot;))))
    (unless (file-exists-p other-file)
      (error &quot;Reject/original file not found: %s&quot; other-file))
    (save-selected-window
      (find-file-other-window other-file))))

(defun kill-hg-reject ()
  (interactive)
  (let ((reject-file (concat (buffer-file-name) &quot;.rej&quot;)))
    (let ((buf (find-buffer-visiting reject-file)))
      (if buf (kill-buffer buf)
        (message &quot;Not visiting reject file: %s&quot; reject-file)))))

(global-set-key (kbd &quot;C-c r&quot;) &#039;switch-hg-reject)
(global-set-key (kbd &quot;C-x r&quot;) &#039;kill-hg-reject)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Even better! Here’s my rev:</p>
<pre lang="lisp">
(defun switch-hg-reject ()
  (interactive)
  (unless (buffer-file-name)
    (error "Buffer is not visiting any file"))
  (let ((other-file
         (if (string-match "\\.rej$" (buffer-file-name))
             (substring (buffer-file-name) 0 (match-beginning 0))
           (concat (buffer-file-name) ".rej"))))
    (unless (file-exists-p other-file)
      (error "Reject/original file not found: %s" other-file))
    (save-selected-window
      (find-file-other-window other-file))))

(defun kill-hg-reject ()
  (interactive)
  (let ((reject-file (concat (buffer-file-name) ".rej")))
    (let ((buf (find-buffer-visiting reject-file)))
      (if buf (kill-buffer buf)
        (message "Not visiting reject file: %s" reject-file)))))

(global-set-key (kbd "C-c r") 'switch-hg-reject)
(global-set-key (kbd "C-x r") 'kill-hg-reject)
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dealing with mercurial patch queue rejects in emacs by Jim Blandy</title>
		<link>http://www.joshmatthews.net/blog/2010/01/dealing-with-mercurial-patch-queue-rejects-in-emacs/comment-page-1/#comment-16489</link>
		<dc:creator>Jim Blandy</dc:creator>
		<pubDate>Fri, 27 Jan 2012 17:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/2010/01/dealing-with-mercurial-patch-queue-rejects-in-emacs/#comment-16489</guid>
		<description>This behaved surprisingly for me when I switched to a file I was sure I was visiting with C-x b, and then hit C-c r: I wasn&#039;t actually visiting the file, and switch-hg-reject wasn&#039;t prepared for a buffer in which buffer-file-name returns nil.

Also, if you run this in a buffer whose filename is less than four characters long, I think there might be problems.

If the file being switched to doesn&#039;t exist, then that should be an error, not just  a message; errors abort keyboard macros and have other useful behaviors.

Finally, I think it&#039;s nice to check for errors with &#039;unless&#039;, so that the post-error-check code isn&#039;t indented.

Here&#039;s my current version:

(defun switch-hg-reject ()
  (interactive)
  (unless (buffer-file-name)
    (error &quot;Buffer is not visiting any file&quot;))
  (let ((other-file
         (if (string-match &quot;\\.rej$&quot; (buffer-file-name))
             (substring (buffer-file-name) 0 (match-beginning 0))
           (concat (buffer-file-name) &quot;.rej&quot;))))    
    (unless (file-exists-p other-file)
      (error &quot;Reject/original file not found: %s&quot; other-file))
    (find-file other-file)))</description>
		<content:encoded><![CDATA[<p>This behaved surprisingly for me when I switched to a file I was sure I was visiting with C-x b, and then hit C-c r: I wasn&#8217;t actually visiting the file, and switch-hg-reject wasn&#8217;t prepared for a buffer in which buffer-file-name returns nil.</p>
<p>Also, if you run this in a buffer whose filename is less than four characters long, I think there might be problems.</p>
<p>If the file being switched to doesn&#8217;t exist, then that should be an error, not just  a message; errors abort keyboard macros and have other useful behaviors.</p>
<p>Finally, I think it&#8217;s nice to check for errors with &#8216;unless&#8217;, so that the post-error-check code isn&#8217;t indented.</p>
<p>Here&#8217;s my current version:</p>
<p>(defun switch-hg-reject ()<br />
  (interactive)<br />
  (unless (buffer-file-name)<br />
    (error &#8220;Buffer is not visiting any file&#8221;))<br />
  (let ((other-file<br />
         (if (string-match &#8220;\\.rej$&#8221; (buffer-file-name))<br />
             (substring (buffer-file-name) 0 (match-beginning 0))<br />
           (concat (buffer-file-name) &#8220;.rej&#8221;))))<br />
    (unless (file-exists-p other-file)<br />
      (error &#8220;Reject/original file not found: %s&#8221; other-file))<br />
    (find-file other-file)))</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Build smarter, not harder by OSD700 Release post 1 &#171; Chris De Cairos</title>
		<link>http://www.joshmatthews.net/blog/2011/05/build-smarter-not-harder/comment-page-1/#comment-16446</link>
		<dc:creator>OSD700 Release post 1 &#171; Chris De Cairos</dc:creator>
		<pubDate>Thu, 26 Jan 2012 17:55:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=107#comment-16446</guid>
		<description>[...] day tracing this thing down, and I was quite fatigued. I made the addition and using a tool called &quot;smartmake&quot; suggested to me by a Mozillian in #introduction on Moznet, began an incremental build. I was 100% [...]</description>
		<content:encoded><![CDATA[<p>[...] day tracing this thing down, and I was quite fatigued. I made the addition and using a tool called &quot;smartmake&quot; suggested to me by a Mozillian in #introduction on Moznet, began an incremental build. I was 100% [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dealing with mercurial patch queue rejects in emacs by Jim Blandy</title>
		<link>http://www.joshmatthews.net/blog/2010/01/dealing-with-mercurial-patch-queue-rejects-in-emacs/comment-page-1/#comment-16398</link>
		<dc:creator>Jim Blandy</dc:creator>
		<pubDate>Wed, 25 Jan 2012 17:07:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/2010/01/dealing-with-mercurial-patch-queue-rejects-in-emacs/#comment-16398</guid>
		<description>Wonderful! It seems like mercurial queues should treat patch rejects like merge conflicts, but short of that, this seems quite helpful.</description>
		<content:encoded><![CDATA[<p>Wonderful! It seems like mercurial queues should treat patch rejects like merge conflicts, but short of that, this seems quite helpful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

