{"id":1464,"date":"2011-08-10T11:41:00","date_gmt":"2011-08-10T11:41:00","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/Hayek\/Jochen\/wp\/blog-en\/2011\/08\/10\/nxml-mode-use-describe-mode-within-emacs\/"},"modified":"2011-08-10T11:41:00","modified_gmt":"2011-08-10T11:41:00","slug":"nxml-mode-use-describe-mode-within-emacs","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2011\/08\/10\/nxml-mode-use-describe-mode-within-emacs\/","title":{"rendered":"nXML mode : use describe-mode within emacs"},"content":{"rendered":"<p>\t\t\t\tThat&#8217;s the nicest and briefest description, that I know.<br \/>\nWhat a pity, that I haven&#8217;t been able to find it online so far.<\/p>\n<p>But here it is:<\/p>\n<p>\nnXML mode:<br \/>\nMajor mode for editing XML.<\/p>\n<p>Syntax highlighting is performed unless the variable\u00a0`<span>nxml-syntax-highlight-flag<\/span>&#8216; is nil.<\/p>\n<p><span>C-c C-f<\/span> finishes the current element by inserting an end-tag.<br \/><span>C-c C-i<\/span> closes a start-tag with `&gt;&#8217; and then inserts a balancing end-tag\u00a0leaving point between the start-tag and end-tag.<br \/><span>C-c C-b<\/span> is similar but for block rather than inline elements:\u00a0the start-tag, point, and end-tag are all left on separate lines.<br \/>\nIf `<span>nxml-slash-auto-complete-flag<\/span>&#8216; is non-nil, then inserting a `&lt;!&#8211;&#039;\u00a0automatically inserts the rest of the end-tag.<\/p>\n<p>&lt;<span>C-return<\/span>&gt; performs completion on the symbol preceding point.<\/p>\n<p>C-c C-d uses the contents of the current buffer\u00a0to choose a tag to put around the word preceding point.<\/p>\n<p>Sections of the document can be displayed in outline form. \u00a0The\u00a0variable `<span>nxml-section-element-name-regexp<\/span>&#8216; controls when an element\u00a0is recognized as a section. \u00a0The same key sequences that change\u00a0visibility in outline mode are used except that they start with C-c C-o\u00a0instead of C-c.<\/p>\n<p>Validation is provided by the related minor-mode `<span>rng-validate-mode<\/span>&#8216;.\u00a0This also makes completion schema- and context- sensitive. \u00a0Element\u00a0names, attribute names, attribute values and namespace URIs can all be<br \/>\ncompleted. By default, `<span>rng-validate-mode<\/span>&#8216; is automatically enabled by\u00a0`<span>rng-nxml-mode-init<\/span>&#8216; which is normally added to `<span>nxml-mode-hook<\/span>&#8216;. You\u00a0can toggle it using C-c C-v.<\/p>\n<p>TAB indents the current line appropriately.\u00a0This can be customized using the variable `<span>nxml-child-indent<\/span>&#8216;\u00a0and the variable `<span>nxml-attribute-indent<\/span>&#8216;.<\/p>\n<p>C-c C-u inserts a character reference using\u00a0the character&#8217;s name (by default, the Unicode name). C-u C-c C-u\u00a0inserts the character directly.<\/p>\n<p>The Emacs commands that normally operate on balanced expressions will\u00a0operate on XML markup items. \u00a0Thus C-M-f will move forward\u00a0across one markup item; C-M-b will move backward across\u00a0one markup item; C-M-k will kill the following markup item;\u00a0C-M-@ will mark the following markup item. \u00a0By default, each\u00a0tag each treated as a single markup item; to make the complete element\u00a0be treated as a single markup item, set the variable\u00a0`<span>nxml-sexp-element-flag<\/span>&#8216; to t. \u00a0For more details, see the function\u00a0`<span>nxml-forward-balanced-item<\/span>&#8216;.<\/p>\n<p><span>C-M-u<\/span> and <span>C-M-d<\/span> move up and down the element structure.<\/p>\n<p>Many aspects this mode can be customized using\u00a0<span>M-x customize-group nxml RET<\/span>.<\/p>\n<div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>That&#8217;s the nicest and briefest description, that I know. What a pity, that I haven&#8217;t been able to find it online so far. But here it is: nXML mode: Major mode for editing XML. Syntax highlighting is performed unless the variable\u00a0`nxml-syntax-highlight-flag&#8216; is nil. C-c C-f finishes the current element by inserting an end-tag.C-c C-i closes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[666],"tags":[],"class_list":["post-1464","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-nC","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/1464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=1464"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/1464\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=1464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=1464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=1464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}