<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Atomized &#187; dirtrack</title>
	<atom:link href="http://atomized.org/tag/dirtrack/feed/" rel="self" type="application/rss+xml" />
	<link>http://atomized.org</link>
	<description>Fragmenting reality.</description>
	<lastBuildDate>Tue, 31 Aug 2010 18:00:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Shell dirtracking again</title>
		<link>http://atomized.org/2008/08/shell-dirtracking-again/</link>
		<comments>http://atomized.org/2008/08/shell-dirtracking-again/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 21:48:43 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[dirtrack]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[response]]></category>

		<guid isPermaLink="false">http://atomized.org/?p=312</guid>
		<description><![CDATA[Trey Jackson posted this code to handle directory tracking in a shell. Trey, I don’t know if you know, but you’ve basically reinvented dirtrack.el. It should be included with your Emacs distribution. See my recent posts on the topic.]]></description>
			<content:encoded><![CDATA[<p><a href="http://trey-jackson.blogspot.com/">Trey Jackson</a> posted <a href="http://trey-jackson.blogspot.com/2008/08/emacs-tip-25-shell-dirtrack-by-prompt.html">this code</a> to handle directory tracking in a shell.</p>
<p>Trey, I don’t know if you know, but you’ve basically reinvented <a href="http://www.opensource.apple.com/darwinsource/10.1/emacs-41/emacs/lisp/dirtrack.el"><code>dirtrack.el</code></a>. It should be included with your Emacs distribution. See <a href="http://atomized.org/2008/08/fixing-dirtrack/">my</a> <a href="http://atomized.org/2008/08/a-problem-with-my-dirtrack-regex/">recent</a> <a href="http://atomized.org/2008/08/last-dirtrack-issue-solved/">posts</a> on the topic.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomized.org/2008/08/shell-dirtracking-again/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Support for `user@host&#8217; in ssh-mode</title>
		<link>http://atomized.org/2008/08/support-for-userhost-in-ssh-mode/</link>
		<comments>http://atomized.org/2008/08/support-for-userhost-in-ssh-mode/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 20:30:56 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[dirtrack]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[track]]></category>
		<category><![CDATA[tramp]]></category>

		<guid isPermaLink="false">http://atomized.org/?p=302</guid>
		<description><![CDATA[One of my long-time pet peeves with ssh-mode is that it doesn’t understand user@host syntax. If you want to log in to a remote host as a different user, you must use the more verbose host -l user syntax. If you don’t, and you use the `ftp&#8217; ssh-directory-tracking-mode, tramp gets confused and tries to connect [...]]]></description>
			<content:encoded><![CDATA[<p>One of my long-time pet peeves with ssh-mode is that it doesn’t understand <code>user@host</code> syntax. If you want to log in to a remote host as a different user, you must use the more verbose <code>host -l user</code> syntax. If you don’t, and you use the `ftp&#8217; <code>ssh-directory-tracking-mode</code>, tramp gets confused and tries to connect to <code>local-user@remote-user@host</code>, which doesn’t work.</p>
<p>The problem is that ssh-mode treats <code>user@host</code> as the host name, rather than the user+host. This patch addresses that flaw, by detecting and handling <code>user@host</code> syntax.</p>
<pre>
--- ssh.el.orig	2008-08-13 12:55:21.000000000 -0700
+++ ssh.el	2008-08-13 13:19:17.000000000 -0700
@@ -184,13 +184,15 @@

   (let* ((process-connection-type ssh-process-connection-type)
          (args (ssh-parse-words input-args))
-	 (host (car args))
-	 (user (or (car (cdr (member "-l" args)))
+         (host-parts (split-string (car args) "@"))
+         (host (car (last host-parts)))
+         (user (or (cadr (member "-l" args))
+                   (if (= 2 (length host-parts)) (car host-parts))
                    (user-login-name)))
          (buffer-name (if (string= user (user-login-name))
                           (format "*ssh-%s*" host)
                         (format "*ssh-%s@%s*" user host)))
-	 proc)
+         proc)

     (and ssh-explicit-args
          (setq args (append ssh-explicit-args args)))
</pre>
]]></content:encoded>
			<wfw:commentRss>http://atomized.org/2008/08/support-for-userhost-in-ssh-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Last dirtrack issue solved</title>
		<link>http://atomized.org/2008/08/last-dirtrack-issue-solved/</link>
		<comments>http://atomized.org/2008/08/last-dirtrack-issue-solved/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 18:03:03 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[dirtrack]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell-dirtrack]]></category>
		<category><![CDATA[shell-mode]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh-mode]]></category>

		<guid isPermaLink="false">http://atomized.org/?p=296</guid>
		<description><![CDATA[Turns out the problem I ran into was a clash between dirtrack-mode and shell-dirtrack-mode. I had no idea there were two competing packages; the problem was that dirtrack picked up the new path, then shell-dirtrack noticed the “cd ..”. Solved: (add-hook 'shell-mode-hook (lambda () (setq shell-dirtrackp nil) (add-hook 'comint-preoutput-filter-functions 'dirtrack nil t))) This caused some [...]]]></description>
			<content:encoded><![CDATA[<p>Turns out the <a href="http://atomized.org/2008/08/a-problem-with-my-dirtrack-regex/">problem</a> I ran into was a clash between <code>dirtrack-mode</code> and <code>shell-dirtrack-mode. I had no idea there were two competing packages; the problem was that <code>dirtrack</code> picked up the new path, then <code>shell-dirtrack</code> noticed the “cd ..”.</code></p>
<p>Solved:</p>
<pre>
(add-hook 'shell-mode-hook
          (lambda ()
            (setq shell-dirtrackp nil)
            (add-hook 'comint-preoutput-filter-functions 'dirtrack nil t)))
</pre>
<p>This caused some trouble with <code>ssh-mode</code>. Solved thusly:</p>
<pre>
(add-hook 'ssh-mode-hook (lambda () (setq dirtrackp nil)))
</pre>
]]></content:encoded>
			<wfw:commentRss>http://atomized.org/2008/08/last-dirtrack-issue-solved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A problem with my dirtrack regex</title>
		<link>http://atomized.org/2008/08/a-problem-with-my-dirtrack-regex/</link>
		<comments>http://atomized.org/2008/08/a-problem-with-my-dirtrack-regex/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 21:49:47 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[dirtrack]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell-mode]]></category>

		<guid isPermaLink="false">http://atomized.org/?p=294</guid>
		<description><![CDATA[I’ve been happily using my dirtrack regex for a while now, but I just discovered that it breaks when you run cd ... It seems that my regex picks up the correct (new) directory, then shell-mode notices the cd and list-buffers-directory goes up one more level. I’m not sure how to fix this – is [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been happily using <a href="/2008/08/fixing-dirtrack/">my dirtrack regex</a> for a while now, but I just discovered that it breaks when you run <code>cd ..</code>. It seems that my regex picks up the correct (new) directory, then shell-mode notices the cd and <code>list-buffers-directory</code> goes up one more level.</p>
<p>I’m not sure how to fix this – is there some way to disable the intercept of “cd?” &lt;/p?</p>
]]></content:encoded>
			<wfw:commentRss>http://atomized.org/2008/08/a-problem-with-my-dirtrack-regex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing dirtrack</title>
		<link>http://atomized.org/2008/08/fixing-dirtrack/</link>
		<comments>http://atomized.org/2008/08/fixing-dirtrack/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 18:00:21 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[aquamacs]]></category>
		<category><![CDATA[dirtrack]]></category>
		<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://atomized.org/?p=291</guid>
		<description><![CDATA[One of the problems I’ve had with various emacsen is the shell dirtrack support. This keeps the shell-mode’s idea of what directory you’re in in sync with which one you’re actually in. At least in Aquamacs, this support is not very good, and it will break if you use bash features like CDPATH or “cd [...]]]></description>
			<content:encoded><![CDATA[<p>One of the problems I’ve had with various emacsen is the shell dirtrack support. This keeps the shell-mode’s idea of what directory you’re in in sync with which one you’re actually in. At least in Aquamacs, this support is not very good, and it will break if you use bash features like CDPATH or “cd -”.</p>
<p>My PS1 is:</p>
<pre>
'\u!\h:\w\$ '
</pre>
<p>So I wrote this regexp to match it. It should work on a normal Debian install, too.</p>
<pre>
(":\\(.*\\)[$#] " 1)
</pre>
<p>Hit <code>M-x customize-variable RET dirtrack-list RET</code> and paste that in.</p>
<p><ins datetime="2008-08-08T18:03:16+00:00">There is <a href="http://atomized.org/2008/08/a-problem-with-my-dirtrack-regex/">a problem</a> with this, which <a href="http://atomized.org/2008/08/last-dirtrack-issue-solved/">I solved</a>.</ins></p>
]]></content:encoded>
			<wfw:commentRss>http://atomized.org/2008/08/fixing-dirtrack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
