<?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: Faster mercurial patch queue merging with emacs</title>
	<atom:link href="http://www.joshmatthews.net/blog/2010/03/faster-mercurial-patch-queue-merging-with-emacs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joshmatthews.net/blog/2010/03/faster-mercurial-patch-queue-merging-with-emacs/</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>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>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>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>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>By: *</title>
		<link>http://www.joshmatthews.net/blog/2010/03/faster-mercurial-patch-queue-merging-with-emacs/comment-page-1/#comment-14244</link>
		<dc:creator>*</dc:creator>
		<pubDate>Tue, 06 Dec 2011 17:42:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=52#comment-14244</guid>
		<description>I used to be therefore frustrated beacuse That i couldn`t fix this problem. Browsing found your web site in the search engines in addition to issue is sorted. Appreciate it!</description>
		<content:encoded><![CDATA[<p>I used to be therefore frustrated beacuse That i couldn`t fix this problem. Browsing found your web site in the search engines in addition to issue is sorted. Appreciate it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anne Kramer</title>
		<link>http://www.joshmatthews.net/blog/2010/03/faster-mercurial-patch-queue-merging-with-emacs/comment-page-1/#comment-8920</link>
		<dc:creator>Anne Kramer</dc:creator>
		<pubDate>Fri, 08 Jul 2011 04:59:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=52#comment-8920</guid>
		<description>this looks complicated for me though. I have been following your last post about this and looks forward to this post thinking that this wont be a complicated thing for me. Looking at those codes makes my head ache. I think I would need some help understanding these so that I can use the solution that you have shared.

Anne Kramer
Author of http://www.amazon.com/Learn-How-Blow-Glass-Instructions/dp/0986642606/ book</description>
		<content:encoded><![CDATA[<p>this looks complicated for me though. I have been following your last post about this and looks forward to this post thinking that this wont be a complicated thing for me. Looking at those codes makes my head ache. I think I would need some help understanding these so that I can use the solution that you have shared.</p>
<p>Anne Kramer<br />
Author of <a href="http://www.amazon.com/Learn-How-Blow-Glass-Instructions/dp/0986642606/" rel="nofollow">http://www.amazon.com/Learn-How-Blow-Glass-Instructions/dp/0986642606/</a> book</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Electronics Reviews</title>
		<link>http://www.joshmatthews.net/blog/2010/03/faster-mercurial-patch-queue-merging-with-emacs/comment-page-1/#comment-7389</link>
		<dc:creator>Electronics Reviews</dc:creator>
		<pubDate>Mon, 23 May 2011 03:25:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=52#comment-7389</guid>
		<description>I see   something  genuinely interesting about your  web site so I  saved to fav.</description>
		<content:encoded><![CDATA[<p>I see   something  genuinely interesting about your  web site so I  saved to fav.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

