17 Sep 2003 04:10
Re: Editing basics: splitting elements
James Clark <jjc <at> jclark.com>
2003-09-17 02:10:13 GMT
2003-09-17 02:10:13 GMT
DuCharme, Bob (LNG-CHO) wrote: > To extrapolate this to a design principle, I find it very productive to > have the cursor end up where I can type away with PCDATA. > > In general, Emacs is a content creation tool for me Creating new marked-up content is one very important kind of usage. But I don't think it's the only one. Another kind is adding markup to unmarked-up content. nxml-mode as a whole needs to work well for both, without any customization. One XML editor I've used makes > electric and automatically insert the closing tag. That's handy for the former kind of usage but super-annoying for the latter. Similarly C-RET needs to work well for both kinds of users. On the other hand, when adding a new command, we can target that new command exclusively at one kind of usage. For example, when can add a C-c C-e command for creating a new element that inserts the end-tag and leaves point between tags; this would be good only for the former kind of usage. Or we can add a C-c C-r command for tagging a region, that's good only the latter. Another point to bear in mind is that nxml-mode isn't just for creating document-based XML (i.e. XML intended to create human-readble documents). It's also for more data-oriented XML: this sort of XML may not have any PCDATA. I want to be able to use nxml-mode to edit not just DocBook but also my XSLT stylesheets. There's a danger that by excessive tuning for one kind of editing task or one kind of XML, we make it unsuitable for other kinds of task or(Continue reading)
RSS Feed