diff options
author | Rodney Lorrimar <dev@rodney.id.au> | 2016-08-09 21:23:59 +0100 |
---|---|---|
committer | Rodney Lorrimar <dev@rodney.id.au> | 2016-09-11 12:07:36 +0100 |
commit | 3de354c73dcf5174493ea17b2b51d22cbf618de9 (patch) | |
tree | 97c58f3669cb731fc0e342783422d281f6a6aa12 /nixos | |
parent | aeb00f16816190a8edcea426baa5d535724a3b8c (diff) | |
download | nixpkgs-3de354c73dcf5174493ea17b2b51d22cbf618de9.tar nixpkgs-3de354c73dcf5174493ea17b2b51d22cbf618de9.tar.gz nixpkgs-3de354c73dcf5174493ea17b2b51d22cbf618de9.tar.bz2 nixpkgs-3de354c73dcf5174493ea17b2b51d22cbf618de9.tar.lz nixpkgs-3de354c73dcf5174493ea17b2b51d22cbf618de9.tar.xz nixpkgs-3de354c73dcf5174493ea17b2b51d22cbf618de9.tar.zst nixpkgs-3de354c73dcf5174493ea17b2b51d22cbf618de9.zip |
nixos-manual(emacs): Add a section about configuring DocBook 5 schemas
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/editors/emacs.xml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/nixos/modules/services/editors/emacs.xml b/nixos/modules/services/editors/emacs.xml index 28cdd60fce2..e0dec52fb4d 100644 --- a/nixos/modules/services/editors/emacs.xml +++ b/nixos/modules/services/editors/emacs.xml @@ -574,6 +574,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> |