<?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: Save Visited Files, V1.1</title>
	<atom:link href="http://nflath.com/2009/10/save-visited-files-v11/feed/" rel="self" type="application/rss+xml" />
	<link>http://nflath.com/2009/10/save-visited-files-v11/</link>
	<description>Technology-related ideas, mainly involving Emacs</description>
	<pubDate>Sat, 19 May 2012 07:36:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jpkotta</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-734</link>
		<dc:creator>jpkotta</dc:creator>
		<pubDate>Sun, 06 Dec 2009 05:20:46 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-734</guid>
		<description>BTW, the line that was giving me trouble is
(kill-buffer (get-buffer "*Save Visited*"))

Anyway, it seems to be working as advertised; nice package.</description>
		<content:encoded><![CDATA[<p>BTW, the line that was giving me trouble is<br />
(kill-buffer (get-buffer &#8220;*Save Visited*&#8221;))</p>
<p>Anyway, it seems to be working as advertised; nice package.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpkotta</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-733</link>
		<dc:creator>jpkotta</dc:creator>
		<pubDate>Sun, 06 Dec 2009 05:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-733</guid>
		<description>I installed this and set it up, and then I got these dialog boxes asking me if I wanted to kill the "*Saved Visited*" buffer.  It turned out that it was erroring when the directory ~/.emacs/persistent/ didn't exist.  You should make sure you can write to the file before you do (file-writable-p).  You can try to create the directory with something like this:

(let ((dir (directory-file-name
            (file-name-directory
             (expand-file-name
              (directory-file-name save-visited-files-location))))))
  (if (not (file-exists-p dir))
      (make-directory dir)))

No, I don't know why directory-file-name should be there twice.  I stole that from uniquify.el.</description>
		<content:encoded><![CDATA[<p>I installed this and set it up, and then I got these dialog boxes asking me if I wanted to kill the &#8220;*Saved Visited*&#8221; buffer.  It turned out that it was erroring when the directory ~/.emacs/persistent/ didn&#8217;t exist.  You should make sure you can write to the file before you do (file-writable-p).  You can try to create the directory with something like this:</p>
<p>(let ((dir (directory-file-name<br />
            (file-name-directory<br />
             (expand-file-name<br />
              (directory-file-name save-visited-files-location))))))<br />
  (if (not (file-exists-p dir))<br />
      (make-directory dir)))</p>
<p>No, I don&#8217;t know why directory-file-name should be there twice.  I stole that from uniquify.el.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nflath</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-459</link>
		<dc:creator>nflath</dc:creator>
		<pubDate>Mon, 26 Oct 2009 03:52:38 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-459</guid>
		<description>TheGZeus:Hmm, that's odd...It's been mostly working for me so far.  I do sometimes have the replication problem, which is caused when you attempt to C-g out of a save-visited-files-save - It will open a new buffer emacs-opened-files buffer and then keep going.  I'm not sure why it doesn't work at all for you - are you using the new loading sequence?</description>
		<content:encoded><![CDATA[<p>TheGZeus:Hmm, that&#8217;s odd&#8230;It&#8217;s been mostly working for me so far.  I do sometimes have the replication problem, which is caused when you attempt to C-g out of a save-visited-files-save - It will open a new buffer emacs-opened-files buffer and then keep going.  I&#8217;m not sure why it doesn&#8217;t work at all for you - are you using the new loading sequence?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TheGZeus</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-458</link>
		<dc:creator>TheGZeus</dc:creator>
		<pubDate>Mon, 26 Oct 2009 03:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-458</guid>
		<description>Ok, I can confirm that even with that directory in existence that this no longer works for me.</description>
		<content:encoded><![CDATA[<p>Ok, I can confirm that even with that directory in existence that this no longer works for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TheGZeus</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-454</link>
		<dc:creator>TheGZeus</dc:creator>
		<pubDate>Sat, 24 Oct 2009 07:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-454</guid>
		<description>ah, mkdir .emacs/persistence</description>
		<content:encoded><![CDATA[<p>ah, mkdir .emacs/persistence</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TheGZeus</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-453</link>
		<dc:creator>TheGZeus</dc:creator>
		<pubDate>Sat, 24 Oct 2009 07:44:33 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-453</guid>
		<description>there should be a number in greater-than/less-than signs after that last emacs-opened-files.</description>
		<content:encoded><![CDATA[<p>there should be a number in greater-than/less-than signs after that last emacs-opened-files.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TheGZeus</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-452</link>
		<dc:creator>TheGZeus</dc:creator>
		<pubDate>Sat, 24 Oct 2009 07:43:43 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-452</guid>
		<description>hmm.
This doesn't seem to work for me any more.
it doesn't restore my visited files, and keeps randomly asking me if I want to kill emacs-opened-files, sometimes emacs-opened-files buffers keep propagating.
emacs-opened-files etc.

I'm on a weekly snapshot of CVS emacs, and I use a number of other packages, too. Might be an interaction of those things, but the old version, while wonky at times, worked.</description>
		<content:encoded><![CDATA[<p>hmm.<br />
This doesn&#8217;t seem to work for me any more.<br />
it doesn&#8217;t restore my visited files, and keeps randomly asking me if I want to kill emacs-opened-files, sometimes emacs-opened-files buffers keep propagating.<br />
emacs-opened-files etc.</p>
<p>I&#8217;m on a weekly snapshot of CVS emacs, and I use a number of other packages, too. Might be an interaction of those things, but the old version, while wonky at times, worked.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-451</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sat, 24 Oct 2009 06:18:38 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-451</guid>
		<description>save-visited-files doesn't do the same thing as recentf. Recentf lets you re-open files that you had open recently. Save-visited-files mode makes emacs automatically, at start-up, re-open every file that was open last time emacs exited (or died, or you rebooted, or whatever). It's the simplest possible implementation of a "workspace"-type feature for emacs. There's a single workspace, and every file is in it.

So, to summarize, it's a continuity feature, to make it so that when you close and re-open emacs, you can more quickly get back to where you left off.

By the way, I found a useful improvement: file-precious-flag, which makes emacs take extra steps not to leave you with a half-modified file when saving. To enable it for save-visited-files, insert it into the save function like this:

(defun save-visited-files-save (&amp;optional location)
  "Save the list of currently visited files"
  ;(interactive)
  (save-window-excursion
    (setq location (or location save-visited-files-location))
    (switch-to-buffer "*Save Visited*")
    (ignore-errors
      (erase-buffer)
      (mapcar '(lambda (x) (insert x "\n"))
              (remove-if '(lambda (x)
                            (or (string-equal location x)
                                (eq nil x))) (mapcar 'buffer-file-name (buffer-list))))
      (let ((file-precious-flag t))
        (write-file location nil))
    (kill-buffer (get-buffer "*Save Visited*"))))</description>
		<content:encoded><![CDATA[<p>save-visited-files doesn&#8217;t do the same thing as recentf. Recentf lets you re-open files that you had open recently. Save-visited-files mode makes emacs automatically, at start-up, re-open every file that was open last time emacs exited (or died, or you rebooted, or whatever). It&#8217;s the simplest possible implementation of a &#8220;workspace&#8221;-type feature for emacs. There&#8217;s a single workspace, and every file is in it.</p>
<p>So, to summarize, it&#8217;s a continuity feature, to make it so that when you close and re-open emacs, you can more quickly get back to where you left off.</p>
<p>By the way, I found a useful improvement: file-precious-flag, which makes emacs take extra steps not to leave you with a half-modified file when saving. To enable it for save-visited-files, insert it into the save function like this:</p>
<p>(defun save-visited-files-save (&amp;optional location)<br />
  &#8220;Save the list of currently visited files&#8221;<br />
  ;(interactive)<br />
  (save-window-excursion<br />
    (setq location (or location save-visited-files-location))<br />
    (switch-to-buffer &#8220;*Save Visited*&#8221;)<br />
    (ignore-errors<br />
      (erase-buffer)<br />
      (mapcar &#8216;(lambda (x) (insert x &#8220;\n&#8221;))<br />
              (remove-if &#8216;(lambda (x)<br />
                            (or (string-equal location x)<br />
                                (eq nil x))) (mapcar &#8216;buffer-file-name (buffer-list))))<br />
      (let ((file-precious-flag t))<br />
        (write-file location nil))<br />
    (kill-buffer (get-buffer &#8220;*Save Visited*&#8221;))))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TheGZeus</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-449</link>
		<dc:creator>TheGZeus</dc:creator>
		<pubDate>Fri, 23 Oct 2009 02:36:14 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-449</guid>
		<description>I keep getting asked if I want to kill emacs-opened-files, at seemingly random intervals.
...</description>
		<content:encoded><![CDATA[<p>I keep getting asked if I want to kill emacs-opened-files, at seemingly random intervals.<br />
&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yuan</title>
		<link>http://nflath.com/2009/10/save-visited-files-v11/comment-page-1/#comment-447</link>
		<dc:creator>yuan</dc:creator>
		<pubDate>Thu, 22 Oct 2009 23:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://nflath.com/?p=442#comment-447</guid>
		<description>What does it offer over recentf-mode ?</description>
		<content:encoded><![CDATA[<p>What does it offer over recentf-mode ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

