diff options
author | Jörg Thalheim <joerg@higgsboson.tk> | 2016-10-09 13:39:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-09 13:39:08 +0200 |
commit | da5c0220aa42e8bde1664463d8b1d2bebc861714 (patch) | |
tree | c0eaa6f787133e7aebad2cde8918e09e6a17044a /nixos/modules/services/editors/emacs.xml | |
parent | a3ec0f1593b508e259bb20b3fe185f0f397e41c0 (diff) | |
parent | 4908d7bf205e2687eb53fc5de4bef0b7c3f8282e (diff) | |
download | nixpkgs-da5c0220aa42e8bde1664463d8b1d2bebc861714.tar nixpkgs-da5c0220aa42e8bde1664463d8b1d2bebc861714.tar.gz nixpkgs-da5c0220aa42e8bde1664463d8b1d2bebc861714.tar.bz2 nixpkgs-da5c0220aa42e8bde1664463d8b1d2bebc861714.tar.lz nixpkgs-da5c0220aa42e8bde1664463d8b1d2bebc861714.tar.xz nixpkgs-da5c0220aa42e8bde1664463d8b1d2bebc861714.tar.zst nixpkgs-da5c0220aa42e8bde1664463d8b1d2bebc861714.zip |
Merge pull request #17622 from rvl/nixos-manual-writing-documentation
Add documentation about writing NixOS documentation
Diffstat (limited to 'nixos/modules/services/editors/emacs.xml')
-rw-r--r-- | nixos/modules/services/editors/emacs.xml | 56 |
1 files changed, 53 insertions, 3 deletions
diff --git a/nixos/modules/services/editors/emacs.xml b/nixos/modules/services/editors/emacs.xml index 544e4a1076f..bcaa8b8df3d 100644 --- a/nixos/modules/services/editors/emacs.xml +++ b/nixos/modules/services/editors/emacs.xml @@ -43,9 +43,10 @@ <title>Installing <application>Emacs</application></title> <para> - Emacs can installed in the normal way for Nix (see <xref - linkend="sec-package-management" />). In addition, a NixOS - <emphasis>service</emphasis> can be enabled. + Emacs can be installed in the normal way for Nix (see + <xref linkend="sec-package-management" />). + In addition, a NixOS <emphasis>service</emphasis> + can be enabled. </para> <section> @@ -564,6 +565,55 @@ services.emacs.install = true; <RET> nixos-rebuild <RET>.</literal> </para> </section> + + <section xml:id="sec-emacs-docbook-xml"> + <title>Editing DocBook 5 XML Documents</title> + <para> + Emacs includes <link + xlink:href="https://www.gnu.org/software/emacs/manual/html_node/nxml-mode/Introduction.html">nXML</link>, + a major-mode for validating and editing XML documents. + When editing DocBook 5.0 documents, such as + <link linkend="book-nixos-manual">this one</link>, + nXML needs to be configured with the relevant schema, which is + not included. + </para> + + <para> + To install the DocBook 5.0 schemas, either add + <varname>pkgs.docbook5</varname> to + <varname>environment.systemPackages</varname> (<link + linkend="sec-declarative-package-mgmt">NixOS</link>), or run + <literal>nix-env -i pkgs.docbook5</literal> + (<link linkend="sec-ad-hoc-packages">Nix</link>). + </para> + + <para> + 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> + <programlisting language="xml"><![CDATA[ +<?xml version="1.0"?> +<!-- + To let emacs find this file, evaluate: + (add-to-list 'rng-schema-locating-files "~/.emacs.d/schemas.xml") +--> +<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> + <!-- + Use this variation if pkgs.docbook5 is added to environment.systemPackages + --> + <namespace ns="http://docbook.org/ns/docbook" + uri="/run/current-system/sw/share/xml/docbook-5.0/rng/docbookxi.rnc"/> + <!-- + Use this variation if installing schema with "nix-env -iA pkgs.docbook5". + <namespace ns="http://docbook.org/ns/docbook" + uri="../.nix-profile/share/xml/docbook-5.0/rng/docbookxi.rnc"/> + --> +</locatingRules> +]]></programlisting> + </example> + </para> + + </section> </section> </chapter> |