The internal format is not something you would want to edit by hand, and it doesn’t necessarily even contain all information sufficient to completely reproduce the appearance. For example, here is the internal representation of my *scratch*
buffer, with just the default text in it:
#(";; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
"
0 2 (face font-lock-comment-delimiter-face fontified t)
2 3 (face whitespace-space fontified t)
3 7 (face font-lock-comment-face fontified t)
7 8 (face whitespace-space fontified t)
8 14 (face font-lock-comment-face fontified t)
14 15 (face whitespace-space fontified t)
15 17 (face font-lock-comment-face fontified t)
17 18 (face whitespace-space fontified t)
18 21 (face font-lock-comment-face fontified t)
21 22 (face whitespace-space fontified t)
22 26 (face font-lock-comment-face fontified t)
26 27 (face whitespace-space fontified t)
27 31 (face font-lock-comment-face fontified t)
31 32 (face whitespace-space fontified t)
32 34 (face font-lock-comment-face fontified t)
34 35 (face whitespace-space fontified t)
35 38 (face font-lock-comment-face fontified t)
38 39 (face whitespace-space fontified t)
39 45 (face font-lock-comment-face fontified t)
45 46 (face whitespace-space fontified t)
46 49 (face font-lock-comment-face fontified t)
49 50 (face whitespace-space fontified t)
50 53 (face font-lock-comment-face fontified t)
53 54 (face whitespace-space fontified t)
54 58 (face font-lock-comment-face fontified t)
58 59 (face whitespace-space fontified t)
59 71 (face font-lock-comment-face fontified t)
71 73 (face font-lock-comment-delimiter-face fontified t)
73 74 (face whitespace-space fontified t)
74 76 (face font-lock-comment-face fontified t)
76 77 (face whitespace-space fontified t)
77 83 (face font-lock-comment-face fontified t)
83 84 (face whitespace-space fontified t)
84 85 (face font-lock-comment-face fontified t)
85 86 (face whitespace-space fontified t)
86 91 (face font-lock-comment-face fontified t)
91 92 (face whitespace-space fontified t)
92 97 (face font-lock-comment-face fontified t)
97 98 (face whitespace-space fontified t)
98 100 (face font-lock-comment-face fontified t)
100 101 (face whitespace-space fontified t)
101 105 (face font-lock-comment-face fontified t)
105 106 (face whitespace-space fontified t)
106 109 (face font-lock-comment-face fontified t font-lock-face help-key-binding)
109 110 (face whitespace-space fontified t font-lock-face help-key-binding)
110 113 (face font-lock-comment-face fontified t font-lock-face help-key-binding)
113 114 (face whitespace-space fontified t)
114 117 (face font-lock-comment-face fontified t)
117 118 (face whitespace-space fontified t)
118 123 (face font-lock-comment-face fontified t)
123 124 (face whitespace-space fontified t)
124 128 (face font-lock-comment-face fontified t)
128 129 (face whitespace-space fontified t)
129 131 (face font-lock-comment-face fontified t)
131 132 (face whitespace-space fontified t)
132 135 (face font-lock-comment-face fontified t)
135 136 (face whitespace-space fontified t)
136 144 (face font-lock-comment-face fontified t))
Notice that I have carefully wrapped it to show the “structure” of it more clearly; it will normally be given to you on a single line.
I got this by evaluating (buffer-substring (point-min) (point-max))
using M-:
, but there are several other ways to do it all with advantages and disadvantages of their own.
Nobody ever writes or edits this crap by hand, ever. It’s purely an internal implementation detail of Emacs and is subject to changes from version to version. As you can see, while it specifies that some of the text is styled with font-lock-comment-face
and other parts with whitespace-face
, it doesn’t tell you what those faces look like. Those will look different for you than for me, because we have different config files, we use different themes, etc.
What you should do instead is edit some other type of file and rely on Emacs to render it the same way each time. You could write an org-mode
file, for example, or enriched-mode
, or html-mode
or any other that is useful to you. Each of these has documentation that comes with Emacs. Org mode comes with it’s own entire manual, while the others just get a chapter in the Emacs manual. There are of course thousands of modes, and any one of them might suit you better than the ones I’ve mentioned.