GNU bug report logs -
#27333
URL History can't handle records
Previous Next
Reported by: Ian Dunn <dunni <at> gnu.org>
Date: Sun, 11 Jun 2017 20:03:01 UTC
Severity: normal
Tags: fixed
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Since the change to records a few months ago, I've seen a bug with `url-history-save-history'. When I try to run it, I see:
Error running timer ‘url-history-save-history’: (wrong-type-argument stringp #s(url "https" nil nil "duckduckgo.com" nil "/html/?q=emacs" nil nil t nil t))
A backtrace puts it at the `string-match' call in `url-history-save-history'. I think the problem is that url-history is using a url struct instead of a string, which, according to `url-history-update-url', isn't supposed to be happening.
The following patch should fix this:
[Message part 2 (text/x-diff, inline)]
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index 1fa085400d..af52d5861e 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -106,7 +106,7 @@ to run the `url-history-setup-save-timer' function manually."
(defun url-history-update-url (url time)
(setq url-history-changed-since-last-save t)
- (puthash (if (vectorp url) (url-recreate-url url) url) time
+ (puthash (if (recordp url) (url-recreate-url url) url) time
url-history-hash-table))
(autoload 'url-make-private-file "url-util")
[Message part 3 (text/plain, inline)]
--
Ian Dunn
This bug report was last modified 8 years and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.