Questions tagged [print]
52 questions
27
votes
3 answers
How can I print an Emacs frame?
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.

The Dude
- 463
- 3
- 6
16
votes
2 answers
How to specify a printer?
The Emacs manual says:
M-x print-buffer
Print hardcopy of current buffer with page headings containing the file name and page number.
M-x lpr-buffer
Print hardcopy of current buffer without page headings.
M-x print-region
Like print-buffer but…

Tim
- 4,987
- 7
- 31
- 60
9
votes
2 answers
How to print a PDF, displayed with pdf-tools, from Emacs?
I'm using PDF-Tools (https://github.com/politza/pdf-tools) to display PDFs inside Emacs. But how to print them? C-c C-p raises the question »Print with:« and I have no idea how to answer it.
I'm looking for a solution to print the pdf, not the…

Keks Dose
- 508
- 4
- 19
9
votes
4 answers
Print message in echo area with no "quotes"?
Q: how do I print a message in the echo area without surrounding quotes?
Here's a simple command:
(defun test-fn ()
(interactive)
(message "Test message"))
When I call it as an interactive command via M-x test-fn, it prints Test message in the…

Dan
- 32,584
- 6
- 98
- 168
6
votes
1 answer
Can I tell prin1-to-string to use reader-macros?
I'm writing a lispy documentation engine with elisp and to make things easier, I'm trying to modify the following behavior
(prin1-to-string '(cons 'a 'b))
;; => "(cons (quote a) (quote b))"
to be
(prin1-to-string '(cons 'a 'b))
;; => "(cons 'a…

Sean Allred
- 6,861
- 16
- 85
6
votes
2 answers
print unquoted output to stdout from emacsclient
I want to use emacsclient to let my running instance of emacs evaluate a function and print the result to a terminal.
That is, I want to do something like this:
$ emacsclient --eval "(frame-parameter (car (frame-list)) 'name)"
*info*
However,…

Colin Fraizer
- 740
- 4
- 12
5
votes
2 answers
elisp - print result not found after eval-buffer
Create a test.el file as below:
(print "hello world!")
Then run M-x eval-buffer. No output can be seen even in *Messages* buffer. where is the print output for this case?

lucky1928
- 1,622
- 8
- 28
5
votes
1 answer
What is the meaning of the ellipsis at the end of some output?
When I do a C-j ie eval-print-last-sexp on an expression such as (copy-tree package-activated-list)
the output as an ellipsis at the end as shown below
(ac-ispell auto-complete popup ace-jump-helm-line helm helm-core async popup async avy ace-link…

vfclists
- 1,347
- 1
- 11
- 28
5
votes
0 answers
ps-print-buffer-with-faces with color-theme'ed dark background
Similar to Change syntax highlighting when doing ps-print-buffer-with-faces
I typically use emacs with a dark background, but I'd like to print my buffer onto a white background (i.e. white paper). I use a color-theme, usually wombat, via M-x…

bernie
- 569
- 3
- 11
4
votes
3 answers
the Term “Hash Notation“ in the Elisp Manual
I'm reading GNU Emacs Lisp Reference Manual, and I see the phrase "hash notation".
Two places in the document seem to have different interpretations, so I have 2 questions.
2.1 Printed Representation and Read Syntax:
...... some types have no…

shynur
- 4,065
- 1
- 3
- 23
4
votes
4 answers
Write `var0, var1, var2, ..., var10` in a buffer
Most of the times there is no need to write manually many variables with the same name and a different index, like
var0, var1, var2, var3, ..., var9
because one can use arrays, vectors or whatever the language offers.
Anyway, I just needed to…

Nisba
- 895
- 8
- 19
4
votes
3 answers
Get a better printed representation of a hash-table
I work with ELisp hash-table and I would like to have a better printed representation of it. I'm on Emacs version 24.5.1. When I create a hash-table
(setq table (make-hash-table))
(puthash :name "john" table)
(puthash :age 31 table)
I get something…

dag
- 141
- 2
3
votes
1 answer
command print no results with (interactive "r")
Consider this test function (tested in emacs -q):
(defun foo (start end)
"for testing purposes"
(interactive "r")
(when (region-active-p)
(cons start end)))
Calling M-x foo gives no results printed in the minibuffer, even when a…

gigiair
- 2,124
- 1
- 8
- 14
3
votes
1 answer
Can I print output to stderr in batch mode WITHOUT a trailing newline?
In emacs --batch (also, emacs --script),
(message "My Message")
will print "My Message" to standard error (file descriptor 2) along with a trailing newline.
What if I don't want the newline? I see that theoretically,
(princ "My Message"…

Joel M Ward
- 33
- 6
3
votes
1 answer
Functions print outputs twice the expected output
Running a function, for example:
(print '"Hello World")
"Hello World"
"Hello World"
... outputs twice the expected result.
I suppose one is the real printing, and the second is the value returned. However, I still want an alternative to this.
What…

Julie Dupondt
- 31
- 1
- 2