* bug#27333: URL History can't handle records
@ 2017-06-11 20:01 Ian Dunn
2017-06-28 11:42 ` npostavs
0 siblings, 1 reply; 2+ messages in thread
From: Ian Dunn @ 2017-06-11 20:01 UTC (permalink / raw)
To: 27333
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 544 bytes --]
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")
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Ian Dunn
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-28 11:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-11 20:01 bug#27333: URL History can't handle records Ian Dunn
2017-06-28 11:42 ` npostavs
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).