Like it says in the title, I am confused about why Joplin keeps watching the file when the external editor is closed? It seems that it keeps watching as many files as the external editors have been spawned by Joplin. I am just trying to see why it does not detect the closing of the external editor given that Joplin spawns the process?
In general, there’s no simple way to know if the file has been closed in the editor or not, since many editors use multiple tabs. So when you start watching a file, it keeps doing until you click the Unwatch button. But in general, the feature is designed so that it doesn’t really matter if a file is being watched even if it’s not opened in any editor.
Ok that makes sense. It is just that it was increasing number of clicks and I felt like I needed to keep track of what I edited and what i did not, for instance the user might jump from note to note and edit them in the external editor without paying attention to what was opened in what order.
It seems like I do not need to worry about disabling watching.
I second @kartoo, it’s useful to know which notes are already opened in an external editor.
One use case for the external editor is to simultaneously edit multiple notes when the required information is spread out in the collection of notes. While navigating through the notes I can see which one is already opened and go to that editor window instead of opening it again so the “Waiting…” indicator needs to match the actual set of editors.
I use different instances of GVim as the external editor so there’s a new process that Joplin could wait on to automatically go out of the waiting state.
I understand it would not help people using the same editor process for all notes but I guess it would not affect them either. Or a checkbox could be added to the settings UI: “monitor editor process”.
I use a single Emacs instance for all editing. However, when initiating an edit from outside (e.g., from Joplin), a small client process (emacsclient) is invoked that passes the information to Emacs. This client has the option to wait until the file is closed in Emacs.
So a possibility for Joplin is to add a checkbox to the text editor command settings “stop watching when the process disappears” or something similar.