GNU bug report logs -
#41385
[PATCH] Show eww bookmarks buffer only if it's not empty
Previous Next
Reported by: Stefan Kangas <stefan <at> marxist.se>
Date: Tue, 19 May 2020 00:52:02 UTC
Severity: minor
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Stefan Kangas <stefan <at> marxist.se> writes:
> Please see the attached patch which fixes a minor annoyance with
> eww-list-bookmarks.
[...]
> - (pop-to-buffer "*eww bookmarks*")
> - (eww-bookmark-prepare))
> + (let ((buf (get-buffer-create "*eww bookmarks*")) no-error)
> + (unwind-protect
> + (progn
> + (pop-to-buffer buf)
> + (eww-bookmark-prepare)
> + (setq no-error t))
> + (when (not no-error) (kill-buffer buf)))))
I don't think this is an ideal way to fix this command -- using error
handling to do control flow is usually the wrong thing to do, and it
makes debugging difficult. What if there's a real bug in
eww-bookmark-prepare?
Instead eww-list-bookmarks should just do the
(eww-read-bookmarks)
(unless eww-bookmarks
(user-error "No bookmarks are defined"))
bit, I think. It might mean rearranging some stuff in eww-next-bookmark
etc, though.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 295 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.