How do not open databases that were open last time

I can’t seem to find this in this preferences anywhere: But how do I stop DEVONthink from opening all the databases it had open the last time I was using it? Some of those databases are quite slow, so that opening my tiny notes database ends up taking an extremely long time because three other databases want to load at the same time.

Thanks, John

Close them all before quitting the app. DEVONthink only opens databases that were open when last quit.

I understand that I can do that, I would rather disable this behavior altogether.

This preference does not exist.

If you want to take occasional notes without opening DEVONthink, you could include the inbox or other group(s) from your notes database in Sorter.

I would enjoy it if such a preference could be added. Many similar app have such a setting, for just this reason.

That’s useful info – which ones?

I was just using ChronoSync last night, which has a preference option called:

'Resume' document windows

Other apps call it “Restore layout on launch” or something similar. I don’t have a list in mind, but if it’s important I could return here as I notice them.

Ever since Lion – or whichever version of OS X instituted the behavior of re-opening windows after a restart – I’ve seen this preference cropping up. Safari has it, Chrome has it, etc.

John

I expected that you had a list of information management database apps similar to DEVONthink, such as Evernote, EagleFiler, etc., that do this.

I don’t use many other such apps. I was more talking about a usability trend I’ve noticed in general among OS X apps. Those that offer to re-open “windows that were open on quit” usually also provide a preference to disable this (even OS X itself lets you uncheck this when shutting down the machine).

John, you’re right that DEVONthink does not respect the OS X preference in System Preferences > Personal

When checked, this preference has no effect on either DEVONthink databases, or on document windows (Data > Open) – say, for a PDF in a window. Should it have an effect? I don’t know – that’s a question for Criss.

I’m using 2.8.2 Pro Office on 10.10.1.

DT used to have this preference item, but it was removed to align with the rest of the OS.

For my personal use, I mapped Cmd-Q to a Keyboard Maestro action:

Close and quit all
Triggered by any of the following:
Trigger icon: The Hot Key ⌘Q is pressed
Will execute the following actions:
Action: Execute AppleScript
  tell application "DEVONthink Pro"
    set myDatabases to every database
    repeat with i from 1 to number of items in myDatabases
      set this_item to item i of myDatabases
      close this_item
    end repeat
  end tell

Action:Quit DEVONthink Pro Office

I just wanted to reiterate how aggravating this situation can be. This is not how DEVONthink used to behave in the past. Unless I remember to close all the large databases I recently opened, they all reopen the next time I want to access some quick, small database. This forces me to wait for up to a minute to access a small piece of information. As a result, I no longer keep that kind of information in DEVONthink, because I frequently forget to close large databases when I am done with them.

I just want to open what I need to open, and quit when I need to quit. The fact that I have to be careful about which databases I leave open – in order for DEVONthink to open with acceptable speed the next time – seems out of keeping with how the application is meant to be used.

People have been talking about how this behavior is in line with “the rest of the OS”, but I do not see this behavior in a lot of the other applications I use, nor would I want it there either. Safari doesn’t open my previously visited tabs unless I ask it to; the Terminal does not open at the last directory I was visiting; the System Preferences does not automatically select the last pane I was using, etc.

In the end I may have to go the key-binding route and assign a private meaning to Cmd-Q, but I"m surprised that this does not annoy other users. Perhaps using multiple, large databases is not very common?

All of this can be fixed with a simple checkbox: [ ] Open database that were last open on quit.

Now that time has passed, let me again say how incredibly annoying and aggravating it is that I cannot stop DEVONthink from opening previously opened databases each time.

I constantly forget to close databases during a previous session – often I just hit Cmd-Q to quit several apps before closing up my laptop and then running to my next appointment.

Then, when I need to jump into a database to make a brief query, I’m forced sometimes to wait minutes before I can even begin to start the query, because DT is opening gigantic database after gigantic database that have NOTHING to do with what I want to use DEVONthink for.

Who took away the old behavior? Why is this default not bothering other people? Do others have just one database and so they don’t care?

Please fix this. It is the worst part of using DT now. I even have to search through paper documents when on the phone sometimes, because DT doesn’t finish opening unwanted databases before the person on the phone runs out of patience.

John

Please note that this is a choice of UI, so there is nothing to “fix”, as in it being a bug.

I have a few DBs, total maybe a few GB (can’t recall number of unique words right now), but they open in essentially no time, so it does not bother me.

I would further like to note that you seem to ignore the solution given by alanshutko, where he maps the Cmd-Q key to a script that closes DBs and then shuts down DT. This would do the trick, right?

Correct. This is not a bug and was put in per the more common request for the current behavior.

I also have many gigabytes of databases that open, but the DBs are not overly large as to affect performance. Also, I routinely close unused databases when I am reasonably sure I won’t need them soon. This not only keeps them from reopening unnecessarily, but also frees up machine resources.

It also sounds like either (1) your databases are overly large and need to be pruned or split, or (2) you lack machine resources to deal with the databases you are opening.

This a horrible answer to my question. “Sorry, doesn’t affect me, your problem”.

I do not want to spend the days of effort it would take to prune these gigantic and now very old databases. They are quite useful just as they are. What I want is a CHECKBOX to say, “Don’t open databases that were last open on quit.” Why is the present behavior so valuable that you are denying the opportunity to optionally disable it? You are, in effect, forcing me to endure a behavior that is needlessly sub-optimal to my workflow.

I can partly hack this with QuicKeys so that Cmd-Q first does a “Close all”, but this still doesn’t help if I use Cmd-Q from the application switcher. I have a feeling that the checkbox I want would take the developers a total of 15 minutes to add, too.

John

Like the other 25,873 checkboxes and options that have been proposed as no-brainers in this forum. DT has already quite extensive preferences, they can’t get much longer. So they have to walk a fine line between adding more and more options and keeping things somewhat streamlined.

To be clear, I would welcome this ability myself (even though I don’t rely on it). Over the years, I encountered numerous things that I would change right away, if I had the chance and insights. Many of them I was able to fix by using scripts and workarounds. Are they optimal? No. Can I live with it? Yes.

At some point, you also have to accept that the devs are in charge of their product, and in the market, this is to a good extent a “take it or leave it” proposition. I am surprised to see how aggressive many posters get in this forum when things are not exactly the way they want it.

Back to the issue at hand: There are two different ways of implementing this. (1) A checkbox that permanently turns off loading previous DBs. (2) An option such as holding down “option” or “Cmd” while starting DT to override the automatic loading of DBs. The latter could be quite useful, if for example, a corrupt database crashes DT at startup.

Finally, a (probably silly) workaround: Start DT using a shell script. The script will first temporarily rename your fixed set of big DBs (e.g. bigDB1 -> bigDB1_a etc), then it starts DT which will not find the DBs under their original name and skip loading them. With a few second delay (such that DT is launched for sure), the script will reverse the renaming of the DBs (note that there is no rush to rename them, because, by definition, the renamed DBs are the ones that you don’t wish to load right away). Next time you need them, you can call them up from the “recent DB” section in the side panel.
UPDATE: I actually tried this. Seems to work with the exception that you don’t re-open the big DB’s by clicking on their “recent” entry in the sidebar, but by using the menu item “Open Recent”.

Thank you so much for sharing this simple KM macro! Crossed one more item off my “Bugs Me” list.

Command-Option-Control-Shift-W will close all databases.

Yes, but I think the complaint is that the OP forgets to do this and simply uses “quit”. I guess that’s the purpose of this remapping of Cmd-Q. But then that’s still not safe enough, because of some other mechanism that can be used to leave the program.

That’s why I tried to find a method that helps all the people who have no discipline at “quit time”. Starting DT using a shell script as described above would do the trick to bypass a bunch of select DBs. In some sense that’s even better than the checkbox in the prefs, as you can exclude select, slow DBs, and have all the nimble ones re-open automatically.