reddit / emacs

Help with nov.el

slaurel492 · 2022-10-05 14:02
I have the following in my \~/.emacs.d/init.el: (setq nov-unzip-program (executable-find "/usr/local/bin/bsdtar") nov-unzip-args '("-xC" directory "-f" filename)) (add-to-list 'auto-mode-alist '("\\\\.epub\\\\'" . nov-mode)) If I use C-X C-f to open an epub file I am faced with a blank screen with an error message at the bottom: "wrong type argument: stringp, nil". I then have to do C-x b and select the buffer with the epub file. I am using emacs-28.2 on OpenBSD and should point out that I do not know lisp ( altho I have purchased a copy of Robert Chassell's book and intend to learn). Any assistance is appreciated. Thanks
franburstall · 2022-10-05 15:49
What do you get if you evaluate `(executable-find "/usr/local/bin/bsdtar")` in the scratch buffer?
slaurel492 · 2022-10-05 16:40
>(executable-find "/usr/local/bin/bsdtar") It comes back with "/usr/local/bin/bsdtar"
slaurel492 · 2022-10-05 16:59
Not knowing lisp, I can't explain what happened. What i do know is removing Prot's denote package (which I installed last night) and suddenly nov.el works as it should.
[deleted] · 2022-10-06 00:11
[deleted]
whudwl · 2022-10-06 00:14
Could always be malformed epub file
wasamasa · 2022-10-06 21:09
No, this is incorrect. To quote the docstring: "This variable expects a list of strings, except for 'directory' and 'filename' symbols, which will be replaced accordingly when opening an EPUB file."
slaurel492 · 2022-10-07 12:57
No, it's not a malformed epub file as it happens on every epub file I try. Right now the only line I have in \~/.emacs.d/init.el is: (add-to-list 'auto-mode-alist '("\\\\.epub\\\\'" . nov-mode)) What I don't understand is why opening an epub file would cause denote (which hasn't been opened) to put out an error message. I emailed Prot just to make him aware of this. And my thanks to everyone who responded. According to Prot this problem was solved with a patch back in denote-0.6.1. However subsequent changes made that patch inoperative. He gave me a bit of code to include in my config file which works and which should be included in the next denote update.