anchor.diff:    ;; TODO: Should we?
     (and (string= (id e1) (id e2))
          (quri:uri= (url e1) (url e2))))
  +
  +(defmethod url ((he history-entry))
  +  "This accessor ensures we always return a `quri:uri'.
  +This is useful in cases the URL is originally stored as a string (for instance
  +when deserializing a `history-entry').
  +
  +We can't use `initialize-instance :after' to convert the URL because
  +`s-serialization:deserialize-sexp' sets the slots manually after making the
  +class."
  +  (unless (quri:uri-p (slot-value he 'url))
  +    (setf (slot-value he 'url) (ensure-url (slot-value he 'url))))
  +  (slot-value he 'url))
  +
  +(defmethod last-access ((he history-entry))
  +  "This accessor ensures we always return a `local-time:timestamp'.
  +This is useful in cases the timestamp is originally stored as a
  +string (for instance when deserializing a `history-entry').
  +
  +We can't use `initialize-instance :after' to convert the timestamp
  +because `s-serialization:deserialize-sexp' sets the slots manually
  +after making the class."
  +  (unless (typep (slot-value he 'last-access) 'local-time:timestamp)
  +    (setf (slot-value he 'last-access)
  +          (local-time:parse-timestring (slot-value he 'last-access))))
  +  (slot-value he 'last-access))
  +
  +(defmethod s-serialization::serialize-sexp-internal ((he history-entry)
  +                                                     stream
  +                                                     serialization-state)
  +  "Serialize `buffer-description' by turning the URL into a string."
  +  (let ((new-he (make-instance 'history-entry
  +                               :title (title he)
  +                               :id (id he)
  +                               :explicit-visits (explicit-visits he)
  +                               :implicit-visits (implicit-visits he))))
  +    (setf (url new-he) (object-string (url he))
  +          (last-access new-he) (local-time:format-timestring nil (last-access he)))
  +    (call-next-method new-he stream serialization-state)))
   
   (declaim (ftype (function (quri:uri &key (:title string) (:explicit t)) t) history-add))
   (export-always 'history-add)
  
positive.code:               (echo "Loading history of ~a URLs from ~s."
                      (htree:size history)
                      (expand-path path))
                (when restore-session-p
                  (sera:and-let* ((buffer-histories (buffer-local-histories-table history)))
                    ;; Make the new buffers.
  
negative.code:                   ;; Switch to the last active buffer.
                    (when (htree:current history)
                      (switch-buffer
                       :id (id (htree:data (htree:current history))))))))
               (hash-table
                (echo "Importing deprecated global history of ~a URLs from ~s."
                      (hash-table-count history)
  