-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
locatingRules for DocBook on emacs #68236
Comments
Here are the related enacs docs: https://www.gnu.org/software/emacs/manual/html_node/nxml-mode/Locating-a-schema.html#Locating-a-schema The default schemas (including the old docbook 4) are in |
I verified that the following works. let
pkgs = import <nixpkgs> {};
inherit (pkgs) emacsPackages docbook5 writeText;
schemas = writeText "schemas.xml" ''
<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
<namespace ns="http://docbook.org/ns/docbook" uri="${docbook5}/share/xml/docbook-5.0/rng/docbookxi.rnc"/>
</locatingRules>
'';
in emacsPackages.emacsWithPackages (epkgs: [
(emacsPackages.trivialBuild {
pname = "nix-docbook-mode";
version = "1970-01-01";
src = writeText "default.el" ''
(eval-after-load 'rng-loc
'(add-to-list 'rng-schema-locating-files "${schemas}"))
(global-set-key (kbd "<C-return>") 'nxml-complete)
'';
})
]) |
Thank you for your contributions.
|
Needs to be fixed. |
I marked this as stale due to inactivity. → More info |
The emacs DocBook config from Nix Pills, which was copied to the wiki match the schema based on elements, not the namespace. That is suspicious, given that we use DocBook 5 which is namespace aware. Should not we use something like this instead:
cc @grahamc
Edit: We even have this https://nixos.org/nixos/manual/index.html#sec-emacs-docbook-xml in the manual, which looks more correct. Though, it relies on profile paths, which is not a good idea: #24959
The text was updated successfully, but these errors were encountered: