I have scoured the source code of Wanderlust and Elmo, but have not found a mechanism to save/restore queued operations across Emacs sessions -- e.g., delete certain items from the Inbox, move certain items to Spam, etc. I'd like to do work offline and kill Emacs and then open Emacs at a later date and process the queued operations. How can this be achieved?
1 Answer
Wanderlust does what you want out of the box:
- operations performed when offline are stored in a queue;
- when starting Wanderlust online, queued operations are executed;
- you can manually switch between online and offline using
M-t
.
Messages to be sent are saved in your wl-queue-folder
, which must be local (+queue
is good, %Queue
isn't); queued actions are saved in the file .elmo/queue
. Automatic flushing is controlled by the variable wl-auto-flush-queue
.
The low-level code is in elmo-dop.el
, the high-level interface is spread across wl.el
, wl-folder.el
and wl-draft.el
.
-
As far as I am aware, operations such as flag setting, deleting, moving, etc, are not stored in a file -- so those operations are lost when closing Emacs. I haven't yet tracked down all the variables involved, but those variables would need to be saved to a file and restored upon a new session. Outgoing messages are stored in the queue, but I'm also after the other stuff.– lawlistCommented Apr 25, 2016 at 17:51
-
They are. Please set Wanderlust offline, delete a message, then quit Wanderlust. You will see a list of actions in your
.elmo/queue
.– jchCommented Apr 25, 2016 at 17:54 -
Perhaps something in my setup is misconfigured then -- I'll do some testing and report back -- thank you for putting me on the right track.– lawlistCommented Apr 25, 2016 at 17:56
-
Update: Given your hints, I believe I have tracked down my problem. The
kill-emacs-hook
only containswl-save-status
, notelmo-quit
-- the latter is what populates thequeue
file. Prior to your explanation, I had never issued the commandwl-exit
-- I had merely killed the buffers or killed Emacs, soelmo-quit
was never issued. I'm tempted to add something to thekill-emacs-hook
in lieu ofwl-save-status
that will also triggerelmo-quit
and whatever else may be needed. I'll leave that project, however, for a new day with a cup of coffee in hand -- i.e., it's bedtime . . .– lawlistCommented Apr 26, 2016 at 4:27 -
I've filed a ticket at github.com/wanderlust/wanderlust/issues/117– jchCommented Apr 28, 2016 at 0:34