Closed arsaber101 closed 7 months ago
Hello @arsaber101!
I just pushed a change. Can you evaluate the following and then try to open an epub file?
(defun denote-rename-buffer (&optional buffer)
"Rename current buffer or optional BUFFER with `denote-rename-buffer-format'.
The symbol of this function is the default value of the user
option `denote-rename-buffer-function' and is thus used by the
`denote-rename-buffer-mode'."
(when-let ((file (buffer-file-name buffer))
((denote-file-has-identifier-p file))
(new-name (denote-rename-buffer--format (or buffer (current-buffer))))
((not (string-blank-p new-name))))
(rename-buffer new-name :unique)))
It works. Perfect. Thanks again.
You are welcome! Closing now.
Hi Prot,
First, thanks for your packages, and most of all thanks for your wonderful documentation, a life saving for illiterates in programming languages like me.
I stumble upon something that might be a bug with
denote-rename-buffer-mode
when i am visiting.epub
files in emacs with thenov.el
library.My setup :
All my
epub
files are stored outside mydenote-directory
and none of them have adenote-filename
.When I use
find-file
(or all the functions that callfind-file
such asconsult-locate
,dired-find-file
, etc.) to open anepub
file, the file is visited but instead of being displayed the buffer is buried, with a message in the echo area :Wrong type argument: stringp, nil
. The Messages buffer shows this :After
Here the backtrace :
Indeed, if I set
The issue disappears.
So my question is, far out my comfort zone : might it be possible for the user to disable the hook to
denote-rename-buffer
functions for some file-types ?Thanks again, Bernard