GNU bug report logs -
#49341
28.0.50; bookmark--unfontify with nil filename throws wrong-type error
Previous Next
Reported by: Trey Peacock <gpg <at> treypeacock.com>
Date: Fri, 2 Jul 2021 21:09:02 UTC
Severity: normal
Tags: moreinfo
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 49341 <at> debbugs.gnu.org (full text, mbox):
"Lars Ingebrigtsen" <larsi <at> gnus.org> writes:
> Can you post the backtrace you get, too? (With `debug-on-error' set.)
```
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
bookmark--unfontify(("temp-book" (url
. "emacs+burly+windows:?%28%28%28min-height%20.%204%2...") (handler
. burly-bookmark-handler)))
bookmark-delete("temp-book")
load-with-code-conversion("/home/morpheus/.config/emacs/test-init.el" "/home/morpheus/.config/emacs/test-init.el" nil t)
command-line-1(("-l" "/home/morpheus/.config/emacs/test-init.el"))
command-line()
normal-top-level()
```
```
(defun bookmark--unfontify (bm)
"Remove a bookmark's colorized overlay.
BM is a bookmark as returned from function `bookmark-get-bookmark'.
See user option `bookmark-fontify'."
(let ((filename (assq 'filename bm))
(pos (assq 'position bm))
overlays found temp)
(when filename (setq filename (expand-file-name (cdr filename))))
(when pos (setq pos (cdr pos)))
(dolist (buf (buffer-list))
(with-current-buffer buf
(when (equal filename buffer-file-name)
(setq overlays (overlays-at pos))
(while (and (not found) (setq temp (pop overlays)))
(when (eq 'bookmark (overlay-get temp 'category))
(delete-overlay (setq found temp)))))))))
```
The bookmark has no 'filename' in its alist, so the value is nil. When
compared to any non file-backed buffer in the buffer-list that will
cause `(setq overlays (overlay-at pos))`. This results in the error with
`(overlays-at nil)`.
This bug report was last modified 4 years and 34 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.