The function ps-print-buffer-with-faces prints an Emacs buffer. Is there a way to print a frame with more than one buffer in it? I would like to print an Emacs calc frame both with the RPN stack and the trail buffer.

  • 7
    Why not just take a screenshot and print that if the entirety of what you want to print is visible on the screen? Commented May 14, 2015 at 18:23
  • If you print it to file (PostScript), you could later use some program (for example Inkscape) to place the contents of both files next to each other. But this won't print the fringe / the rest of the chrome of the program.
    – wvxvw
    Commented May 14, 2015 at 21:37
  • 2
    @kaushalmodi Because a printed screenshot with text has terrible resolution. Commented May 27, 2015 at 12:34
  • 1
    @Gilles Saving screencaps as .png instead of .jpg (very lossy) gives a good enough quality image for me ( example: i.imgur.com/NHcDP5h.png ). Commented May 27, 2015 at 12:47
  • 2
    There is a package in Ubuntu/Debian called gtk-vector-screenshot. It produces PS/PDF/SVG screenshots for GTK3 applications. The Github repo is here: github.com/nomeata/gtk-vector-screenshot. An overview is here: joachim-breitner.de/blog/494-Better_PDF_screenshots_with_gtk_3. You would have to configure Emacs via ./configure --with-x-toolkit=gtk3. Caveat: I'm sorry to tell you that I could not get it working! Since it's packaged in Ubuntu, it was clearly working for someone at some point in time. If someone gets it working, please expand this comment as an answer. Commented May 31, 2015 at 10:20

3 Answers 3


What about frameshot by tarsius? I haven't tried it myself, but it seems to do what you want. According to its release history on GitHub, the package was born into this world on February 26, 2018 — later than the most recent update to this post.


Give it a shot! ;)


Instead of trying to print a frame, you should create a new buffer whose contents are created from copies of what's in the two calc buffers.

  • Is the asker's Emacs running in an xterm or similar? If so, could we create an Emacs Lisp function to do the job. That should result in an acceptable answer. Commented Dec 28, 2015 at 2:21

You can use hfyview from https://github.com/jwiegley/nxhtml/blob/master/util/hfyview.el. It constructs a html facsimile of the Emacs frame that you can print from your web browser.

  • On Emacs 25.1 hfyview-frame (the function needed here) fails with "Wrong type argument"). hfyview-buffer still works though.
    – halloleo
    Commented Jun 29, 2018 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.