Spec URL: http://cyberelk.net/tim/data/nxml-mode/nxml-mode.spec SRPM URL: http://cyberelk.net/tim/data/nxml-mode/nxml-mode-0.20041004.1-0.1.src.rpm Description: This is an Emacs mode for editing XML with interactive validity and well-formedness checks. Given a DTD it will also complete tags and attributes, and '</' closes the current tag correctly.
The package should probably be called emacs-nxml-mode according to the package naming guidelines. http://fedoraproject.org/wiki/Packaging/NamingGuidelines#head-f3625ee8ad50323dbc0a2efff9344b1080f31113 The naming guidelines say emacs-common-<foo> but I suppose emacs-<foo> would be enough for this package because it doesn't work with XEmacs, and I'm not aware of anything that would change that in the foreseeable future.
http://cyberelk.net/tim/data/nxml-mode/emacs-nxml-mode.spec http://cyberelk.net/tim/data/nxml-mode/emacs-nxml-mode-0.20041004.1-1.src.rpm I also adjusted the BuildRoot tag and the Release tag.
- rpmlint: E: emacs-nxml-mode invalid-spec-name emacs-xml-mode.spec Should be renamed to emacs-nxml-mode.spec - rpmlint: W: emacs-nxml-mode prereq-use info PreReq: info should be replaced by "Requires(post): info" and "Requires(postun): info", or /sbin/install-info, see http://fedoraproject.org/wiki/Packaging/ScriptletSnippets#info - Dependency on emacs missing. Or should that be emacs-common? Possibly versioned so that a newer or equal version of Emacs which was used to build the package is needed? - Better URL: http://www.thaiopensource.com/nxml-mode/ - Origin of slides.rnc and slidesdb.rnc? I guess http://docbook.sourceforge.net/release/slides/ , there seems to be newer version(s) available in the 3.4.0/schema/relaxng/ dir -> maybe upgrade and use full URLs to sources? - Package rename needs to be reflected in install-info invocations, now fails on install: install-info: No such file or directory for /usr/share/info/emacs-nxml-mode.info ...and on removal: install-info: warning: no entries found for `/usr/share/info/emacs-nxml-mode.info'; nothing deleted - auto-mode-alist association in nxml-init.el fails to do its job, XML and XHTML files still open in xml-mode and html-mode here. My (unverified) guess is that it's because of magic-mode-alist. So perhaps either add the appropriate magic-mode-list associations to the init file too or remove the nonfunctional auto-mode-alist one?
Regarding the XML/HTML files opening in other modes: I think it depends what kind of file you choose. DocBook XML files open in nxml-mode for example. http://cyberelk.net/tim/data/nxml-mode/emacs-nxml-mode.spec http://cyberelk.net/tim/data/nxml-mode/emacs-nxml-mode-0.20041004.1-2.src.rpm
Tested with this docbook XML file, it doesn't open in nxml-mode here: http://docbook.cvs.sourceforge.net/*checkout*/docbook/slides/doc/slides.xml I think this issue is something that needs to be resolved for real so that it is clear under which situations nxml-mode vs xml/xhtml modes are used before the package can be published. If no better ways are found, removing nxml-mode's associations completely by default and providing commented out examples somewhere how to make it override xml/xhtml for all types nxml supports would be much better than the current uncertainty. .1%{?dist} needs to move from the version tag to release. If upgradeability from earlier versions of this package somewhere is a concern, plain 20041004 without the 0. prefix or 0.20041004.2 would provide that after the move. Could you comment on the dependency on emacs vs emacs-common? Currently, nxml-mode can't be installed with only emacs-nox available (no emacs), even though it'd probably work just fine. I'm leaning towards emacs-common being a better alternative, but won't treat this as a blocker.
Works here with slides.xml. I get '(nXML Valid)' in the mode bar, and 'Using schema /usr/share/emacs/site-lisp/nxml-mode/schema/docbook.rnc' in the minibuffer. Perhaps you have a .emacs file that is preventing things from working correctly? Do you have the psgml package installed, possibly overriding our own mode? FWIW, I get nxml-mode for .xml, .xsl, .rng and .xhtml, which is precisely the set of modes expected: (setq auto-mode-alist (cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode) auto-mode-alist)) SGML and HTML already have handlers (sgml-mode), and I'm not sure we want to override that (do we?). http://cyberelk.net/tim/data/nxml-mode/emacs-nxml-mode.spec http://cyberelk.net/tim/data/nxml-mode/emacs-nxml-mode-0.20041004.1-3.src.rpm
I had already tested with empty ~/.emacs and ~/.emacs.d too, and I don't think I've ever had psgml installed. Pretty much all *.xml, *.xsl, *.xhtml files open in XML/XHTML modes, not nxml here; I don't have an explanation to that, but it does happen. I do remember getting some XML files opened in nxml-mode in earlier tests, but can't find one at the moment. And you're right, SGML/HTML would probably be better off handled by SGML based modes, not nxml - I doubt it is even supposed to work with those. The confusion with getting files to consistently open with or without nxml-mode is the only remaining blocker here as far as I'm concerned - if you have ideas what to try, let me know. Everything *looks* correct as far as I can tell (eg. value of auto-mode-alist at runtime). BTW, the last trailing ".1" could be dropped from the Version tag, but no need to roll a new package for review just because of that.
Well, what provides XML/XHTML modes? I don't have any package installed that does. On removing emacs-nxml-mode, .xsl files open in fundamental mode here. I think if there are different packages each trying to modify auto-mode-alist, it just comes down to which order their init files are read.
Created attachment 147796 [details] auto-mode-alist, magic-mode-alist dumps C-h f xml-mode: xml-mode is an alias for `sgml-mode' in `textmodes/sgml-mode.el'. $ rpm -qf /usr/share/emacs/22.0.93/lisp/textmodes/sgml-mode.elc emacs-common-22.0.93-4.cmn6.i386 That's a Rawhide Emacs locally rebuilt for FC6. I've already tried changing the order of the nxml-mode and sgml-mode auto-mode-alist associations, to no avail, so it's not that. And nxml-mode is the only thing in my auto-mode-alist that is associated with *.xhtml files, yet they open in xml-mode (ie. "XHTML" in the modeline). That's why I suggested magic-mode-alist might be interfering in comment 3. See attached cleaned up typescript; the first part contains dumps of auto-mode-alist and magic-mode-alist with the as-is nxml-init.el, and the latter part the dump of auto-mode-alist after modifying nxml-init.el to append instead of prepending its auto-mode-alist modifications.
I've added something to nxml-init.el that I hope will resolve this. http://cyberelk.net/tim/data/nxml-mode/emacs-nxml-mode.spec http://cyberelk.net/tim/data/nxml-mode/emacs-nxml-mode-0.20041004.1-4.src.rpm
Ok, I think that's good enough, approved. Final non-blocker suggestions to consider before doing the first build: - Drop trailing ".1" from the Version tag. - Instead of defining magic-mode-alist to a dummy value in nxml-init.el on earlier Emacsen (which may have side effects if other modes test for its existence and make decisions based on that), do something like this instead: (if (boundp 'magic-mode-alist) ;; then do the setq (which could be replaced by add-to-list, BTW...)
emacs-nxml-mode-0.20041004-5.fc7 built. Thanks!
My pleasure. Maybe this bug was meant to be closed now?
http://fedoraproject.org/wiki/Extras/NewPackageProcess
Why is fedora-cvs set to ? Your request is unclear.
I would like an FC-6 branch to be added for emacs-nxml-mode please. Thanks.
Please could I have an EPEL branch for emacs-nxml-mode? Thanks.
For EL-4? EL-5? or both? Please use the template at http://fedoraproject.org/wiki/PackageMaintainers/CVSAdminProcedure Please reset the fedora-cvs flag when you answer...
Package Change Request ====================== Package Name: emacs-nxml-mode New Branches: EL-4 EL-5
cvs done.