In post “Batch open Pdfs in a region: an initial idea”, the user needs to switch to a new frame to process pdfs. Here is an working example to this function:

1
2
3
4
5
6
7
(defun wr/create-new-frame ()
  "Prompt the user for a name and create a new frame with that name."
  (interactive)
  (let ((frame-name (read-string "Enter name for new frame: ")))
    (make-frame (list (cons `name frame-name)
                      (cons `title frame-name))))
  (call-interactively #'toggle-frame-fullscreen))