Loading ...
Sorry, an error occurred while loading the content.

Re: [emacs-nxml-mode] nxml and outlining/editing

Expand Messages
  • Michael Smith
    ... I think this should work: 1. Put the following in your .emacs - (global-set-key [double-mouse-2] mark-sexp) 2. Set the value of the Nxml Sexp Element
    Message 1 of 2 , May 31, 2004
    • 0 Attachment
      Bruce D'Arcus <bdarcus@...> writes:

      > I'm not exactly sure how to ask this question, but I guess it's
      > something like:
      >
      > Does anyone have any ideas of how to improve nXML for structured
      > document writing/editing?
      >
      > I'm looking for stuff like:
      >
      > double-click on an element tag and have the entire element selected
      > for moving integration with outlining support (not sure how)

      I think this should work:

      1. Put the following in your .emacs -

      (global-set-key [double-mouse-2] 'mark-sexp)

      2. Set the value of the "Nxml Sexp Element Flag" option
      (nxml-sexp-element-flag) to "t" (non-nil)

      That'll allow you to select an element and all its child content by
      placing your cursor before the opening angle bracket for the element and
      then either right-double-clicking or typing C-M-@.

      > I know there are a few other features that people mentioned that'd be
      > useful from PSGML, but am not recalling what they are at the moment.

      I think the main thing that's need is support of true "folded editing"
      similar to what PSGML provides. But as a workaround, I think you can get
      Emacs "outline" minor mode to work with nXML. Derek Lane posted some
      setup instructions last year.

      http://groups.yahoo.com/group/emacs-nxml-mode/message/334

      1. Select entire contents of the file you're working with.

      2. Type M-x indent-region

      3. Type M-x outline-minor-mode

      4. Type M-x set-variable outline-regexp

      5. Type " *\<"

      6. Type M-x untabify (or regexp yields counter-intuitive results about
      levels)

      After completing those steps, you should have "Headings", "Show", and
      "Hide" menus that let you collapse/expand parts of your document and
      quickly navigate through the structure.
    Your message has been successfully submitted and would be delivered to recipients shortly.