-
Notifications
You must be signed in to change notification settings - Fork 43
How to restore a specific type of buffer
The problem is following:
-
my-beautiful-buffer-mode
hasn't been restored
You can help to solve it. What information is helpful:
- Extension name that you use (and others are likely using it) +
major-mode
variable - Local buffer variables (that may help restoring it)
- Specific functions to run (to restore a buffer)
It's better to exclude any interaction with user on restoring (and do everything automatically)
So if you run a command that asks to enter something - it's likely saved as a local buffer variable that we can use to restore it automatically.
Well, actually when there is no support at all - even a command that requires user interaction can be used (but will annoy you each time buffers are restored)
So when you got all needed info - it's time to write some code...
You need to:
-
write 2 functions (
serialize
-deserialize
) inworkgroups-specialbufs.el
(see this file for examples) -
Add
serialize
function to a special variablewg-special-buffer-serdes-functions
inworkgroups-variables.el
(defcustom wg-special-buffer-serdes-functions '(wg-serialize-Info-buffer wg-serialize-org-agenda-buffer wg-serialize-help-buffer wg-serialize-ielm-buffer wg-serialize-shell-buffer wg-serialize-eshell-buffer wg-serialize-term-buffer)