summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2023-01-03 02:39:29 +0100
committerpennae <github@quasiparticle.net>2023-01-10 10:31:53 +0100
commit90b4cb8ed2240b62d56e866816bf439e943a1e3e (patch)
treeaf755e8399862d3194bfa9c206744d45d974b680 /nixos
parent25ec23b9aa34a7f387a7bc0ff7c9a87e9742f606 (diff)
downloadnixpkgs-90b4cb8ed2240b62d56e866816bf439e943a1e3e.tar
nixpkgs-90b4cb8ed2240b62d56e866816bf439e943a1e3e.tar.gz
nixpkgs-90b4cb8ed2240b62d56e866816bf439e943a1e3e.tar.bz2
nixpkgs-90b4cb8ed2240b62d56e866816bf439e943a1e3e.tar.lz
nixpkgs-90b4cb8ed2240b62d56e866816bf439e943a1e3e.tar.xz
nixpkgs-90b4cb8ed2240b62d56e866816bf439e943a1e3e.tar.zst
nixpkgs-90b4cb8ed2240b62d56e866816bf439e943a1e3e.zip
nixos/manual: replace most examples with anchors
markdown doesn't really have examples as a first-class construct. we'll
keep all examples that are referenced around for now, but all
unreferenced examples turn into invisible anchors. (turning them into
fourth-level headings in their files, as would be necessary for emacs,
removes them from the TOC anyway.)
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/editors/emacs.xml24
1 files changed, 6 insertions, 18 deletions
diff --git a/nixos/modules/services/editors/emacs.xml b/nixos/modules/services/editors/emacs.xml
index 7f2ad3eb447..d0e781e6786 100644
--- a/nixos/modules/services/editors/emacs.xml
+++ b/nixos/modules/services/editors/emacs.xml
@@ -251,15 +251,13 @@ in
    <para>
     The list of available packages in the various ELPA repositories can be seen
     with the following commands:
-    <example xml:id="module-services-emacs-querying-packages">
-     <title>Querying Emacs packages</title>
+    <anchor xml:id="module-services-emacs-querying-packages" />
 <programlisting><![CDATA[
 nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.elpaPackages
 nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.melpaPackages
 nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.melpaStablePackages
 nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.orgPackages
 ]]></programlisting>
-    </example>
    </para>
 
    <para>
@@ -267,8 +265,7 @@ nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.orgPackages
     adding it to the list of system packages (see
     <xref linkend="sec-declarative-package-mgmt" />). Simply modify your file
     <filename>configuration.nix</filename> to make it contain:
-    <example xml:id="module-services-emacs-configuration-nix">
-     <title>Custom Emacs in <filename>configuration.nix</filename></title>
+    <anchor xml:id="module-services-emacs-configuration-nix" />
 <programlisting><![CDATA[
 {
  environment.systemPackages = [
@@ -277,7 +274,6 @@ nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.orgPackages
   ];
 }
 ]]></programlisting>
-    </example>
    </para>
 
    <para>
@@ -296,8 +292,7 @@ https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides
     <filename>~/.config/nixpkgs/config.nix</filename> (see
     <link xlink:href="https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides">Nixpkgs
     manual</link>):
-    <example xml:id="module-services-emacs-config-nix">
-     <title>Custom Emacs in <filename>~/.config/nixpkgs/config.nix</filename></title>
+    <anchor xml:id="module-services-emacs-config-nix" />
 <programlisting><![CDATA[
 {
   packageOverrides = super: let self = super.pkgs; in {
@@ -305,7 +300,6 @@ https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides
   };
 }
 ]]></programlisting>
-    </example>
    </para>
 
    <para>
@@ -327,8 +321,7 @@ https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides
     <filename>emacs.nix</filename> in this way:
    </para>
 
-   <example xml:id="ex-emacsGtk3Nix">
-    <title>Custom Emacs build</title>
+   <anchor xml:id="ex-emacsGtk3Nix" />
 <programlisting><![CDATA[
 { pkgs ? import <nixpkgs> {} }:
 let
@@ -345,7 +338,6 @@ let
   });
 in [...]
 ]]></programlisting>
-   </example>
 
    <para>
     After building this file as shown in <xref linkend="ex-emacsNix" />, you
@@ -483,8 +475,7 @@ systemctl --user enable emacs
   <para>
    The Emacs init file should be changed to load the extension packages at
    startup:
-   <example xml:id="module-services-emacs-package-initialisation">
-    <title>Package initialization in <filename>.emacs</filename></title>
+   <anchor xml:id="module-services-emacs-package-initialisation" />
 <programlisting><![CDATA[
 (require 'package)
 
@@ -494,7 +485,6 @@ systemctl --user enable emacs
 (setq package-enable-at-startup nil)
 (package-initialize)
 ]]></programlisting>
-   </example>
   </para>
 
   <para>
@@ -556,8 +546,7 @@ systemctl --user enable emacs
     Then customize the variable <varname>rng-schema-locating-files</varname> to
     include <filename>~/.emacs.d/schemas.xml</filename> and put the following
     text into that file:
-    <example xml:id="ex-emacs-docbook-xml">
-     <title>nXML Schema Configuration (<filename>~/.emacs.d/schemas.xml</filename>)</title>
+    <anchor xml:id="ex-emacs-docbook-xml" />
 <programlisting language="xml"><![CDATA[
 <?xml version="1.0"?>
 <!--
@@ -577,7 +566,6 @@ systemctl --user enable emacs
   -->
 </locatingRules>
 ]]></programlisting>
-    </example>
    </para>
   </section>
  </section>