summaryrefslogtreecommitdiff
path: root/devdocs/elisp/format-conversion-overview.html
blob: c7685d8f4afbed69acb2dd26d682fb8a15dd9408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 <h4 class="subsection">Overview</h4> <p>The function <code>insert-file-contents</code>: </p> <ul> <li> initially, inserts bytes from the file into the buffer; </li>
<li> decodes bytes to characters as appropriate; </li>
<li> processes formats as defined by entries in <code>format-alist</code>; and </li>
<li> calls functions in <code>after-insert-file-functions</code>. </li>
</ul> <p>The function <code>write-region</code>: </p> <ul> <li> initially, calls functions in <code>write-region-annotate-functions</code>; </li>
<li> processes formats as defined by entries in <code>format-alist</code>; </li>
<li> encodes characters to bytes as appropriate; and </li>
<li> modifies the file with the bytes. </li>
</ul> <p>This shows the symmetry of the lowest-level operations; reading and writing handle things in opposite order. The rest of this section describes the two facilities surrounding the three variables named above, as well as some related functions. <a href="coding-systems">Coding Systems</a>, for details on character encoding and decoding. </p><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
    <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Format-Conversion-Overview.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Format-Conversion-Overview.html</a>
  </p>
</div>