<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Executing the Same Command on Multiple Shell Buffers</title>
	<atom:link href="http://curiousprogrammer.wordpress.com/2009/03/30/shell-buffers-multi-commands/feed/" rel="self" type="application/rss+xml" />
	<link>http://curiousprogrammer.wordpress.com/2009/03/30/shell-buffers-multi-commands/</link>
	<description>Leveraging Perl and Emacs</description>
	<lastBuildDate>Tue, 07 May 2013 11:25:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Jared</title>
		<link>http://curiousprogrammer.wordpress.com/2009/03/30/shell-buffers-multi-commands/#comment-7844</link>
		<dc:creator><![CDATA[Jared]]></dc:creator>
		<pubDate>Fri, 19 Mar 2010 07:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=431#comment-7844</guid>
		<description><![CDATA[Hi Gaz, thanks for the follow-up.

I think that if you want to select arbitrary buffers (that don&#039;t map easily to a regex) to send commands to, maybe ibuffer, as foo mentions above, is a better choice than ido to hook into.]]></description>
		<content:encoded><![CDATA[<p>Hi Gaz, thanks for the follow-up.</p>
<p>I think that if you want to select arbitrary buffers (that don&#8217;t map easily to a regex) to send commands to, maybe ibuffer, as foo mentions above, is a better choice than ido to hook into.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaz</title>
		<link>http://curiousprogrammer.wordpress.com/2009/03/30/shell-buffers-multi-commands/#comment-7831</link>
		<dc:creator><![CDATA[Gaz]]></dc:creator>
		<pubDate>Sat, 16 Jan 2010 15:07:19 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=431#comment-7831</guid>
		<description><![CDATA[For posterity, here is the startup code I added to my .emacs today to call your shell-wrapper functions:

(define sw-hosts (list &quot;hostname1&quot; &quot;hostname2&quot; ... &quot;hostname30&quot;))

(defmacro until (test &amp;rest body)
  `(while (not ,test) ,@body))

(defun sw-next-terminal ()
  (interactive)
  (let ((buffer-name (buffer-name))
	(hosts sw-hosts))
    (until (string-match (concat &quot;*&quot; (car hosts) &quot;*&quot;) buffer-name)
      (setq hosts (cdr hosts)))
    (switch-to-buffer (concat &quot;*&quot; (or (cadr hosts) (car sw-hosts)) &quot;*&quot;))))

(defun sw-prior-terminal ()
  (interactive)
  (let ((buffer-name (buffer-name))
	(hosts sw-hosts)
	prior)
    (until (string-match (concat &quot;*&quot; (car hosts) &quot;*&quot;) buffer-name)
      (setq prior (car hosts)
	    hosts (cdr hosts)))
    (switch-to-buffer (concat &quot;*&quot; (or prior (car (last sw-hosts))) &quot;*&quot;))))


;;;; otherwise a single accidental C-C quits my execed ssh
(define-key term-raw-map (kbd &quot;C-c&quot;) term-send-raw)

(define-key term-raw-map [(control next)] &#039;sw-next-terminal)
(define-key term-raw-map [(control prior)] &#039;sw-prior-terminal)
(define-key term-raw-map [(control end)] &#039;sw-multi-cmd)

(dolist (host sw-hosts)
  (sw-open-remote-shell host &quot;gaz@gateway.example.com&quot;)
  ;; otherwise only the first 10 or so succeed:
  (sleep-for 0.6))

Thanks again!]]></description>
		<content:encoded><![CDATA[<p>For posterity, here is the startup code I added to my .emacs today to call your shell-wrapper functions:</p>
<p>(define sw-hosts (list &#8220;hostname1&#8243; &#8220;hostname2&#8243; &#8230; &#8220;hostname30&#8243;))</p>
<p>(defmacro until (test &amp;rest body)<br />
  `(while (not ,test) ,@body))</p>
<p>(defun sw-next-terminal ()<br />
  (interactive)<br />
  (let ((buffer-name (buffer-name))<br />
	(hosts sw-hosts))<br />
    (until (string-match (concat &#8220;*&#8221; (car hosts) &#8220;*&#8221;) buffer-name)<br />
      (setq hosts (cdr hosts)))<br />
    (switch-to-buffer (concat &#8220;*&#8221; (or (cadr hosts) (car sw-hosts)) &#8220;*&#8221;))))</p>
<p>(defun sw-prior-terminal ()<br />
  (interactive)<br />
  (let ((buffer-name (buffer-name))<br />
	(hosts sw-hosts)<br />
	prior)<br />
    (until (string-match (concat &#8220;*&#8221; (car hosts) &#8220;*&#8221;) buffer-name)<br />
      (setq prior (car hosts)<br />
	    hosts (cdr hosts)))<br />
    (switch-to-buffer (concat &#8220;*&#8221; (or prior (car (last sw-hosts))) &#8220;*&#8221;))))</p>
<p>;;;; otherwise a single accidental C-C quits my execed ssh<br />
(define-key term-raw-map (kbd &#8220;C-c&#8221;) term-send-raw)</p>
<p>(define-key term-raw-map [(control next)] &#8216;sw-next-terminal)<br />
(define-key term-raw-map [(control prior)] &#8216;sw-prior-terminal)<br />
(define-key term-raw-map [(control end)] &#8216;sw-multi-cmd)</p>
<p>(dolist (host sw-hosts)<br />
  (sw-open-remote-shell host &#8220;gaz@gateway.example.com&#8221;)<br />
  ;; otherwise only the first 10 or so succeed:<br />
  (sleep-for 0.6))</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaz</title>
		<link>http://curiousprogrammer.wordpress.com/2009/03/30/shell-buffers-multi-commands/#comment-7830</link>
		<dc:creator><![CDATA[Gaz]]></dc:creator>
		<pubDate>Sat, 16 Jan 2010 09:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=431#comment-7830</guid>
		<description><![CDATA[Hi Jared,

I&#039;ve been using your sw-multi-cmd code for a couple of hours now, and it works better than screen for sending a command to all the open sw-buffers.

However, I&#039;m not sure that ido is the right tool for narrowing the buffer list interactively.  It makes it difficult to choose &#039;these 20 machines from my list of 30&#039;, or &#039;all machines except this one, this one and this one&#039;.  Actually, as long as I&#039;ve memorized the names and architectures of all 30 of the machines I&#039;m working with, I can use the regex matching mode... but is there a nicer way to do it?

Gaz

I remembered to tick &#039;Notify me of follow-ups by email&#039; this time, so it won&#039;t take me 8 months to find my way back this time :)]]></description>
		<content:encoded><![CDATA[<p>Hi Jared,</p>
<p>I&#8217;ve been using your sw-multi-cmd code for a couple of hours now, and it works better than screen for sending a command to all the open sw-buffers.</p>
<p>However, I&#8217;m not sure that ido is the right tool for narrowing the buffer list interactively.  It makes it difficult to choose &#8216;these 20 machines from my list of 30&#8242;, or &#8216;all machines except this one, this one and this one&#8217;.  Actually, as long as I&#8217;ve memorized the names and architectures of all 30 of the machines I&#8217;m working with, I can use the regex matching mode&#8230; but is there a nicer way to do it?</p>
<p>Gaz</p>
<p>I remembered to tick &#8216;Notify me of follow-ups by email&#8217; this time, so it won&#8217;t take me 8 months to find my way back this time <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared</title>
		<link>http://curiousprogrammer.wordpress.com/2009/03/30/shell-buffers-multi-commands/#comment-7417</link>
		<dc:creator><![CDATA[Jared]]></dc:creator>
		<pubDate>Wed, 01 Apr 2009 06:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=431#comment-7417</guid>
		<description><![CDATA[Hi foo,

ibuffer is nice with the wide range of filters and arbitrary marking but

a) I really like ido :) and
b) I already have the list of buffers that contain shells]]></description>
		<content:encoded><![CDATA[<p>Hi foo,</p>
<p>ibuffer is nice with the wide range of filters and arbitrary marking but</p>
<p>a) I really like ido <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and<br />
b) I already have the list of buffers that contain shells</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: foo</title>
		<link>http://curiousprogrammer.wordpress.com/2009/03/30/shell-buffers-multi-commands/#comment-7415</link>
		<dc:creator><![CDATA[foo]]></dc:creator>
		<pubDate>Tue, 31 Mar 2009 23:26:22 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=431#comment-7415</guid>
		<description><![CDATA[Why not ibuffer and ibuffer-do-eval?]]></description>
		<content:encoded><![CDATA[<p>Why not ibuffer and ibuffer-do-eval?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
