Here are some further thoughts, but not a comprehensive design.
I instrumented conkeror to notify when quit() is called and when the observers quit-application and xpcom-shutdown are called. Here are the results for four methods of exiting conkeror. % conkeror -q -batch xpcom-shutdown called % conkeror -q [ C-x C-c ] quit called quit-application called xpcom-shutdown called % conkeror -q [ Use window manager quit function] quit-application called xpcom-shutdown called % conkeror -q [ kill-current-buffer ] quit-application called xpcom-shutdown called With enterLastWindowClosingSurvivalArea neither of the observer functions are called with any method of exiting. Nor does conkeror exit. This holds even for "conkeror -q -batch" when no window is opened. I think the best solution is to retain quit_hook with its current functionality (maybe renamed to something like quit_requested_hook) and add a new hook, exiting_hook, which is called when conkeror is definitely exiting and which can be used for cleanup operations. This new hook would be suitable for the session auto save and, perhaps, for the walnut summary. It would be called from an xpcom-shutdown observer. An alternative would be to retain only quit_hook, but deviously arrange that it will be called either from quit() or from the observer; it would only be called from the observer if it had not been called from quit(). This isn't as conceptually clear as the above solution. regards, David _______________________________________________ Conkeror mailing list [email protected] https://www.mozdev.org/mailman/listinfo/conkeror
