[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
desktop.el fails to restore nov.el EPUB buffers
From: |
artur.brzozowski |
Subject: |
desktop.el fails to restore nov.el EPUB buffers |
Date: |
Fri, 22 Jul 2022 13:37:17 +0000 |
Hello.
It seems that desktop.el is unable to properly restore epub files in
nov-mode; reading an .emacs.desktop file saved with a buffer
displaying an epub file under nov does not restore the buffer.
This can be reproduced with
(require 'nov)
(require 'desktop)
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
;; the following is required to save the nov-mode buffer state and
;; use the default `desktop-restore-file-buffer'
(add-hook 'nov-mode-hook #'(lambda () (setq-local desktop-save-buffer t)))
and then visiting an epub file and saving the desktop. Reading the
saved desktop file with `desktop-read' fails to restore the nov/epub
buffer.
I thought that since nov-mode is hooked to epub files, the basic file
handler should work, but this suggests a dedicated handler set through
the `desktop-save-buffer'/`desktop-buffer-mode-handlers' tandem may be
required.
Is this a bug, or should I start thinking of writing a handler?
Perhaps someone has already implemented it?
With regards,
Artur
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- desktop.el fails to restore nov.el EPUB buffers,
artur.brzozowski <=