eww bookmark display fixup

Fixes: debbugs:16398

* net/eww.el (eww-bookmark-prepare): Display URLs in first by
displaying shortened titles first.
parent 17ee1836
2014-12-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/eww.el (eww-bookmark-prepare): Display URLs in first by
displaying shortened titles first (bug#16398).
2014-12-07 Tom Willemse <tom@ryuslash.org> (tiny change)
* progmodes/python.el: Recognize docstrings.
......
......@@ -1440,19 +1440,18 @@ Differences in #targets are ignored."
(user-error "No bookmarks are defined"))
(set-buffer (get-buffer-create "*eww bookmarks*"))
(eww-bookmark-mode)
(let ((format "%-40s %s")
(inhibit-read-only t)
start url)
(let* ((width (/ (window-width) 2))
(format (format "%%-%ds %%s" width))
(inhibit-read-only t)
start title)
(erase-buffer)
(setq header-line-format (concat " " (format format "URL" "Title")))
(setq header-line-format (concat " " (format format "Title" "URL")))
(dolist (bookmark eww-bookmarks)
(setq start (point))
(setq url (plist-get bookmark :url))
(when (> (length url) 40)
(setq url (substring url 0 40)))
(insert (format format url
(plist-get bookmark :title))
"\n")
(setq start (point)
title (plist-get bookmark :title))
(when (> (length title) width)
(setq title (substring title 0 width)))
(insert (format format title (plist-get bookmark :url)) "\n")
(put-text-property start (1+ start) 'eww-bookmark bookmark))
(goto-char (point-min))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment