Discussion:
[Skim-app-users] How to get my opened files back
Piet van Oostrum
2015-07-02 14:15:10 UTC
Permalink
I lost my open files collection in Skim (meaning now it opens without any files open).
How can I get my files back?
I tried to restore the preference files from my Time machine but it doesn't help. I also checked Reopen last open files at startup, but to no avail. Is there some hidden information that I missed? I checked the preference files, and the list of files is in net.sourceforge.skim-app.skim.plist, item SKLastOpenFileNames, but apparently it is ignored. So what am I missing?

Also the 'Restore Previous Session' menu item in the Bookmarks menu is missing.
I wished Skim had the concept of sessions that you can save and restore.

With kind regards,
--
Piet van Oostrum <***@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
Christiaan Hofman
2015-07-02 14:56:09 UTC
Permalink
Post by Piet van Oostrum
I lost my open files collection in Skim (meaning now it opens without any files open).
How can I get my files back?
I tried to restore the preference files from my Time machine but it doesn't help. I also checked Reopen last open files at startup, but to no avail. Is there some hidden information that I missed? I checked the preference files, and the list of files is in net.sourceforge.skim-app.skim.plist, item SKLastOpenFileNames, but apparently it is ignored. So what am I missing?
Also the 'Restore Previous Session' menu item in the Bookmarks menu is missing.
I wished Skim had the concept of sessions that you can save and restore.
With kind regards,
--
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
All of what you say is there and should work to get your last open files back. You remember last open files by checking it in the General preferences, and then they should reopen on the next launch. Though not when you launch Skim by opening a file. Also, the last open files item in the Bookmarks menu should always be there if there were open files when Skim quitted.

But I don't know what goes wrong for you, it should work. How do you launch Skim? Are these files on the same disk?

BTW, you can save sessions as a Session Bookmark.

Christiaan
Piet van Oostrum
2015-07-02 15:58:51 UTC
Permalink
Post by Piet van Oostrum
I lost my open files collection in Skim (meaning now it opens without any files open).
How can I get my files back?
I tried to restore the preference files from my Time machine but it doesn't help. I also
checked Reopen last open files at startup, but to no avail. Is there some hidden information
that I missed? I checked the preference files, and the list of files is in
net.sourceforge.skim-app.skim.plist, item SKLastOpenFileNames, but apparently it is ignored.
So what am I missing?
Also the 'Restore Previous Session' menu item in the Bookmarks menu is missing.
I wished Skim had the concept of sessions that you can save and restore.
All of what you say is there and should work to get your last open files back. You remember last
open files by checking it in the General preferences, and then they should reopen on the next
launch. Though not when you launch Skim by opening a file. Also, the last open files item in the
Bookmarks menu should always be there if there were open files when Skim quitted.
But I don't know what goes wrong for you, it should work. How do
you launch Skim? Are these files on the same disk?
I open Skim by clicking on the icon in the Dock. Or double-clicking in /Applications, but that doesn't make a difference.

Now the strange thing:

I opened a file in Skim and then closed Skim with the file still open. Next time I open Skim, it opens that file.

I see that in Library/Preferences these two files were changed:
net.sourceforge.skim-app.skim.bookmarks.plist
net.sourceforge.skim-app.skim.plist

There is also net.sourceforge.skim-app.skim.LSSharedFileList.plist but it has an older timestamp.

Now I copy these files from a backup earlier today. And when I reopen Skim, it still comes open with that new file, not with the files that it had open early in the morning. The new file didn't even exist when the backup was made, so there's no way it could be in those preference files. So where is that new file name stored if not in the files mentioned above?

I have read that on Yosemite (that I am using) also info is stored in Library/Saved Application State/net.sourceforge.skim-app.skim.savedState but I cleared that directory, so that it would not interfere. So there must be some other secret place.
Post by Piet van Oostrum
BTW, you can save sessions as a Session Bookmark.
Thanks, I did not know that. When I get my session back I will use that. In the past I have had the same problem and I could my session back with trial and error, but I can't remember exactly how.

With kind regards,
--
Piet van Oostrum <***@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
Piet van Oostrum <***@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
Christiaan Hofman
2015-07-02 20:28:44 UTC
Permalink
Post by Piet van Oostrum
Post by Piet van Oostrum
I lost my open files collection in Skim (meaning now it opens without any files open).
How can I get my files back?
I tried to restore the preference files from my Time machine but it doesn't help. I also
checked Reopen last open files at startup, but to no avail. Is there some hidden information
that I missed? I checked the preference files, and the list of files is in
net.sourceforge.skim-app.skim.plist, item SKLastOpenFileNames, but apparently it is ignored.
So what am I missing?
Also the 'Restore Previous Session' menu item in the Bookmarks menu is missing.
I wished Skim had the concept of sessions that you can save and restore.
All of what you say is there and should work to get your last open files back. You remember last
open files by checking it in the General preferences, and then they should reopen on the next
launch. Though not when you launch Skim by opening a file. Also, the last open files item in the
Bookmarks menu should always be there if there were open files when Skim quitted.
But I don't know what goes wrong for you, it should work. How do
you launch Skim? Are these files on the same disk?
I open Skim by clicking on the icon in the Dock. Or double-clicking in /Applications, but that doesn't make a difference.
I opened a file in Skim and then closed Skim with the file still open. Next time I open Skim, it opens that file.
net.sourceforge.skim-app.skim.bookmarks.plist
net.sourceforge.skim-app.skim.plist
There is also net.sourceforge.skim-app.skim.LSSharedFileList.plist but it has an older timestamp.
Now I copy these files from a backup earlier today. And when I reopen Skim, it still comes open with that new file, not with the files that it had open early in the morning. The new file didn't even exist when the backup was made, so there's no way it could be in those preference files. So where is that new file name stored if not in the files mentioned above?
I have read that on Yosemite (that I am using) also info is stored in Library/Saved Application State/net.sourceforge.skim-app.skim.savedState but I cleared that directory, so that it would not interfere. So there must be some other secret place.
Post by Piet van Oostrum
BTW, you can save sessions as a Session Bookmark.
Thanks, I did not know that. When I get my session back I will use that. In the past I have had the same problem and I could my session back with trial and error, but I can't remember exactly how.
With kind regards,
--
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
Since 10.9 preferences are saved a cache on the system. (During a run this will be in memory, not in a file, so it is much faster to access.) The files in Library/Preferences are really only a backup, so changing them usually makes no difference. This may also explain why you did not see any information in them about this. (If you want to force a reset of the (cached) prefs from the files, you should run "defaults read -app Skim" from the Terminal after changing the plist file.)

The LSSharedFileList is just for the system to track files apps open, rather than for the app itself. Think of the Recent Documents in the Apple menu, I guess.

Christiaan
Piet van Oostrum
2015-07-02 21:11:17 UTC
Permalink
Post by Christiaan Hofman
Since 10.9 preferences are saved a cache on the system. (During a run this will be in memory, not
in a file, so it is much faster to access.) The files in Library/Preferences are really only a
backup, so changing them usually makes no difference. This may also explain why you did not see
any information in them about this. (If you want to force a reset of the (cached) prefs from the
files, you should run "defaults read -app Skim" from the Terminal after changing the plist file.)
The LSSharedFileList is just for the system to track files apps open, rather than for the app
itself. Think of the Recent Documents in the Apple menu, I guess.
Just before receiving your message :) I found this thread on the mailing list: http://comments.gmane.org/gmane.comp.macosx.skim.user/3943 that explained the cache.
So I did a
defaults delete net.sourceforge.skim-app.skim.bookmarks
and then copied the preferences backups over, and lo and behold, I got my files back. The first thing I did was making a session backup.

Anyway, thanks for the help.
--
Piet van Oostrum <***@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
Christiaan Hofman
2015-07-02 21:28:52 UTC
Permalink
Post by Piet van Oostrum
Post by Christiaan Hofman
Since 10.9 preferences are saved a cache on the system. (During a run this will be in memory, not
in a file, so it is much faster to access.) The files in Library/Preferences are really only a
backup, so changing them usually makes no difference. This may also explain why you did not see
any information in them about this. (If you want to force a reset of the (cached) prefs from the
files, you should run "defaults read -app Skim" from the Terminal after changing the plist file.)
The LSSharedFileList is just for the system to track files apps open, rather than for the app
itself. Think of the Recent Documents in the Apple menu, I guess.
Just before receiving your message :) I found this thread on the mailing list: http://comments.gmane.org/gmane.comp.macosx.skim.user/3943 that explained the cache.
So I did a
defaults delete net.sourceforge.skim-app.skim.bookmarks
and then copied the preferences backups over, and lo and behold, I got my files back. The first thing I did was making a session backup.
Anyway, thanks for the help.
--
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
The .bookmarks.plist file does not contain any of this info. That only contains the actual bookmarks, not the previous session.

Christiaan
Piet van Oostrum
2015-07-02 22:10:40 UTC
Permalink
Post by Christiaan Hofman
The .bookmarks.plist file does not contain any of this info. That only contains the actual
bookmarks, not the previous session.
You are right. It should have been net.sourceforge.skim-app.skim.plist, but I could not do a delete on that:

$ defaults delete net.sourceforge.skim-app.skim
2015-07-02 23:03:49.972 defaults[6811:204709]
Domain (net.sourceforge.skim-app.skim) not found.
Defaults have not been changed.

So why deleting the .bookmarks.plist domain still worked might just be one of those other mysteries. Anyway I am happy now. :)
--
Piet van Oostrum <***@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
Loading...