anchor.diff:      (otherwise
        (log:config :info))))
   
  -(defun derive-session (name)
  +(defun derive-session (name) ; TODO: Remove *session* and use same technique as `init-file-path'?
     "Derive session file from NAME.
   If NAME has a slash, use the file it refers to.
   Without slash, NAME (with .lisp appended if not already there), store in
  
positive.code:                              :local-filename (socket-path *browser*))
      (loop as connection = (iolib:accept-connection s)
            while connection
            do (progn (match (str:split (string #\newline)
                                        (alex:read-stream-content-into-string connection)
                                        :omit-nulls t)
                        ((guard urls urls)
                         (log:info "External process requested URL(s): ~{~a~^, ~}" urls)
                         (ffi-within-renderer-thread
                          *browser*
                          (lambda () (open-urls urls))))
                        (_
                         (log:info "External process pinged Next.")))
                      ;; If we get pinged too early, we not have a current-window yet.
                      (when (current-window)
                       (ffi-window-to-foreground (current-window))))))
    (log:info "Listening on socket ~s" (socket-path *browser*)))
  
  (defun bind-socket-or-quit (urls)
    "If another Next is listening on the socket, tell it to open URLS.
  Otherwise bind socket."
    (if (ignore-errors
         (iolib:with-open-socket (s :address-family :local
                                    :remote-filename (socket-path *browser*))
           (iolib:socket-connected-p s)))
        (progn
          (if urls
              (log:info "Next already started, requesting to open URL(s): ~{~a~^, ~}" urls)
              (log:info "Next already started." urls))
          (iolib:with-open-socket (s :address-family :local
                                     :remote-filename (socket-path *browser*))
            (format s "~{~a~%~}" urls))
          (uiop:quit))
        (progn
          (uiop:delete-file-if-exists (socket-path *browser*))
          (setf (socket-thread *browser*) (bt:make-thread #'listen-socket)))))
  
  (serapeum:export-always 'start)
  (defun start (&key urls (init-file (init-file-path)))
  
negative.code:     (:name :no-init
             :short #\Q
             :long "no-init"
             :description "Do not load the user init file.")
      (:name :eval
             :short #\e
             :long "eval"
             :arg-parser #'identity
             :description "Eval the Lisp expressions.")
      (:name :load
             :short #\l
             :long "load"
             :arg-parser #'identity
             :description "Load the Lisp file.")
      (:name :remote
             :short #\r
             :long "remote"
             :description "Send the --eval and --load arguments to the running instance of Next.")
      (:name :session
             :short #\s
             :long "session"
  