GNU bug report logs - #27333
URL History can't handle records

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27333 in the body.
You can then email your comments to 27333 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#27333; Package emacs. (Sun, 11 Jun 2017 20:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Dunn <dunni <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 11 Jun 2017 20:03:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ian Dunn <dunni <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: URL History can't handle records
Date: Sun, 11 Jun 2017 16:01:18 -0400
[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

Added indication that bug 27333 blocks24655 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 12 Jun 2017 00:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27333; Package emacs. (Wed, 28 Jun 2017 11:41:02 GMT) Full text and rfc822 format available.

Message #10 received at 27333 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Ian Dunn <dunni <at> gnu.org>
Cc: 27333 <at> debbugs.gnu.org
Subject: Re: bug#27333: URL History can't handle records
Date: Wed, 28 Jun 2017 07:42:02 -0400
tags 27333 fixed
close 27333
quit

Ian Dunn <dunni <at> gnu.org> writes:

> 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))

Fixed in [1: d3a208ea8e], I decided to be a bit more specific and use `url-p' instead of `recordp'.

[1: d3a208ea8e]: 2017-06-28 07:39:05 -0400
  Don't assume url structs are vectors (Bug#27333)
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d3a208ea8e2e3a28fb7d0e30248c7d46e13fc160>




Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 28 Jun 2017 11:41:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 27333 <at> debbugs.gnu.org and Ian Dunn <dunni <at> gnu.org> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 28 Jun 2017 11:41:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Jul 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.