Questions tagged [pretty-print]

is the application of styles to source code and markup text content for printing purposes. Styles may be as simple as line wrapping to complex layouts, indentations, coloring, fonts, and syntax highlighting.

Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

How to print a Elisp form with a specific prefix string on each line?

I'd like to pretty-print an Elisp form with some arbitrary prefix string inserted at the beginning of each output line. For example, given the following variable: (setq var '((abc . 11) (...
2
votes
0answers
22 views

Is there an Emacs-specific solution to printing Emails?

I'm using notmuch for reading and writing emails. This works fine, but sometimes I still do need to print emails. Here the available tools don't shine. Out of the box, using #, printing results in an ...
1
vote
1answer
81 views

Format alist into bullet points

I have this couple of alists: ((melpa . 49) (gnu . 14) (nongnu . 1)) ((nongnu (nongnu . markdown-mode)) (gnu (gnu . adaptive-wrap) (gnu . auctex) (gnu . company) (gnu . consult) (gnu . csv-mode) (gnu ...
1
vote
0answers
58 views

How to pretty print Scheme code in Emacs?

I would like to format Scheme code inside Emacs, I'm developing Scheme interpreter and my formatter don't work quite right, so while I'm working on syntax-rules macro I would like to pretty print the ...
1
vote
1answer
314 views

Working with printed macro expansions

I am trying to write a macro. I have read the manual and learned about macroexpand. However, when I use it, I find the expansion difficult to read and work with. How can I expand a macro in a ...
9
votes
2answers
258 views

Can emacs show formatted backtraces?

When getting an Elisp error and trying to debug the problem, the backtrace buffer is quite hard to read with its long lines. Is there a way to get a pretty-printed backtrace buffer?
0
votes
1answer
464 views

Emacs, pretty print but showing spaces and \n

I'm making diagrams with plantuml and org mode, when preparing the JSONs, in order to plot well the diagram I need this representation of JSON: (with-temp-buffer (insert (json-encode '((calimero . ...
2
votes
1answer
269 views

yaml-mode empties whitespace lines

Our project has a large yaml file edited by multiple developers in multiple environments. When I edit the file in emacs, yaml-mode (I assume?) will trim any whitespace lines: Value: ...
2
votes
3answers
951 views

How pretty format XML in Windows?

Windows 10, Emacs 25.1 Is it possible to pretty format XML file? E.g. here not formatted xml: <?xml version="1.0" encoding="UTF-8"?><items xmlns:xsd="http://www.w3.org/2001/XMLSchema" ...
1
vote
0answers
48 views

How to set ps-end-cut-regexp

I often use ps-print-buffer to print out files, but I don't want the first few lines of the buffer to be printed. Here's the beginning of the buffer: # -*- mode: org; -*- # Last updated: <2017/12/...
3
votes
0answers
272 views

Like JavaScript prettier but for Elisp

(N00b question.) Is there command/package/snippet to format elisp code (like in my init file) in a standard(-ish) way, like what Prettier does for JavaScript? I'm not only concerned about ...
2
votes
0answers
118 views

To `pp` or not to `pp`?

The pp package is great for pretty-printing Emacs Lisp forms, but can be excruciatingly slow for "large" forms. Is there a general rule-of-thumb for determining whether we should pp a form or not? E....