anchor.diff:                        :activate t
                         :buffer (make-internal-buffer :title "*OS packages*")))))
       (flet ((format-inputs (inputs)
  -             (alex:mappend
  -              (lambda (input)
  -                `((:a :href (lisp-url
  -                             '(%describe-os-package
  -                               (ospm:find-os-packages ,input)))
  -                      ,input)
  -                  " "))
  -              inputs))
  +             (spinneret:with-html
  +               (dolist (input inputs)
  +                 (:a :href (lisp-url
  +                            '(%describe-os-package
  +                              (ospm:find-os-packages input)))
  +                     input))))
              (format-outputs (outputs)
  -             `(:div
  -               (:table
  -                ,@(alex:mappend
  -                   (lambda (output)
  -                     `((:tr
  -                        (:td ,(ospm:name output))
  -                        ,@(when (ospm:expanded-output-p output)
  -                            `((:td
  -                               ,(sera:format-file-size-human-readable
  -                                 nil
  -                                 (ospm:size output)))
  -                              (:td ,(ospm:path output)))))))
  -                   outputs))
  -               ,@(when (and (<= 2 (length outputs))
  +             (spinneret:with-html
  +               (:div
  +                 (:table
  +                  (dolist (output outputs)
  +                    (:tr
  +                     (:td (ospm:name output))
  +                     (when (ospm:expanded-output-p output)
  +                       (:td
  +                        (sera:format-file-size-human-readable
  +                         nil
  +                         (ospm:size output)))
  +                       (:td (ospm:path output))))))
  +                 (when (and (<= 2 (length outputs))
                               (ospm:expanded-output-p (first outputs)))
  -                   `((:li "Total size: " ,(sera:format-file-size-human-readable
  -                                           nil
  -                                           (reduce #'+ (mapcar #'ospm:size outputs)))))))))
  +                   (:li "Total size: " (sera:format-file-size-human-readable
  +                                        nil
  +                                        (reduce #'+ (mapcar #'ospm:size outputs)))))))))
         (nyxt::html-set
  -       (markup:markup
  -        (:style (style buffer))
  -        (:h1 "Packages")
  -        (:ul
  -         (loop for package in packages
  -               collect (markup:markup*
  -                        `(:li ,(ospm:name package) " " ,(ospm:version package)
  -                              (:ul
  -                               ,@(when (typep package 'ospm:guix-package)
  -                                   `((:li "Outputs: "
  -                                          ,@(unless (ospm:expanded-outputs-p package)
  -                                              `((:a :class "button"
  -                                                    :href ,(lisp-url '(echo "Computing path & size...")
  -                                                                     `(ospm:expand-outputs (first (ospm:find-os-packages
  -                                                                                                   ,(ospm:name package)
  -                                                                                                   :version ,(ospm:version package))))
  -                                                                     `(%describe-os-package
  -                                                                       (ospm:find-os-packages ,(ospm:name package)
  -                                                                                              :version ,(ospm:version package))))
  -                                                    "Compute path & size")))
  -                                          ,(format-outputs (ospm:outputs package)))
  -                                     (:li "Supported systems: " ,(str:join " " (ospm:supported-systems package)))
  -                                     (:li "Inputs: " ,@(format-inputs (ospm:inputs package)))
  -                                     (:li "Propagated inputs: " ,@(format-inputs (ospm:propagated-inputs package)))
  -                                     (:li "Native inputs: " ,@(format-inputs (ospm:native-inputs package)))
  -                                     (:li "Location: " ,(ospm:location package))))
  -                               (:li "Home-page: " (:a :href ,(ospm:home-page package)
  -                                                      ,(ospm:home-page package)))
  -                               (:li "Licenses: " ,(str:join ", " (ospm:licenses package)))
  -                               (:li "Synopsis: " ,(ospm:synopsis package))
  -                               ,(when (typep package 'ospm:guix-package)
  -                                  `(:li "Description: " ,(ospm:description package)))))))))
  +       (spinneret:with-html-string
  +         (:style (style buffer))
  +         (:h1 "Packages")
  +         (:ul (dolist (package packages)
  +                (:li (ospm:name package) " " (ospm:version package)
  +                     (:ul
  +                      (when (typep package 'ospm:guix-package)
  +                        (:li "Outputs: "
  +                             (unless (ospm:expanded-outputs-p package)
  +                               (:a :class "button"
  +                                   :href (lisp-url '(echo "Computing path & size...")
  +                                                   `(ospm:expand-outputs (first (ospm:find-os-packages
  +                                                                                 ,(ospm:name package)
  +                                                                                 :version ,(ospm:version package))))
  +                                                   `(%describe-os-package
  +                                                     (ospm:find-os-packages ,(ospm:name package)
  +                                                                            :version ,(ospm:version package))))
  +                                   "Compute path & size"))
  +                             (format-outputs (ospm:outputs package)))
  +                        (:li "Supported systems: " (str:join " " (ospm:supported-systems package)))
  +                        (:li "Inputs: " (format-inputs (ospm:inputs package)))
  +                        (:li "Propagated inputs: " (format-inputs (ospm:propagated-inputs package)))
  +                        (:li "Native inputs: " (format-inputs (ospm:native-inputs package)))
  +                        (:li "Location: " (ospm:location package)))
  +                      (:li "Home-page: " (:a :href (ospm:home-page package)
  +                                             (ospm:home-page package)))
  +                      (:li "Licenses: " (str:join ", " (ospm:licenses package)))
  +                      (:li "Synopsis: " (ospm:synopsis package))
  +                      (when (typep package 'ospm:guix-package)
  +                        (:li "Description: " (ospm:description package))))))))
          buffer))
       (set-current-buffer buffer)
       buffer))
  
positive.code:                  ;; TODO: Make shell formating function and add support for
                   ;; special characters, e.g. progress bars.
                   (nyxt::html-write
                    (markup:markup
                     (:code (str:replace-all " " " " s))
                     (:br))
                    buffer)))
                (nyxt::html-write
                 (markup:markup (:p "Done."))
                 buffer)))
            (set-current-buffer buffer)
            buffer))))
  
negative.code:               (setf (nyxt/os-package-manager-mode:current-process-info mode) process-info)
                (nyxt::html-set "" buffer) ; Reset content between operations.
                (nyxt::html-write
                 (spinneret:with-html-string
                   (:style (style buffer))
                   (:h1 title)
                   (:p
                    (:a :class "button"
                        :href (lisp-url '(nyxt/os-package-manager-mode:cancel-package-operation))
                        "Cancel")))
                 buffer)
                (format-command-stream
                 process-info
  