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

C-c C--

Expand Messages
  • Dave Pawson
    In xml-mode C-c C-- used to remove markup. Has anyone got that working with nxml-mode please? TIA -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ.
    Message 1 of 5 , Apr 8 6:48 AM
    • 0 Attachment
      In xml-mode C-c C-- used to remove markup.

      Has anyone got that working with nxml-mode please?


      TIA

      --
      Dave Pawson
      XSLT XSL-FO FAQ.
      Docbook FAQ.
      http://www.dpawson.co.uk
    • gavenkoa
      ... Do you meen: C-c C-d Delete the tag at or after point, and delete the matching tag too (sgml-delete-tag). If the tag at or after point is an opening tag,
      Message 2 of 5 , Apr 8 2:22 PM
      • 0 Attachment
        Dave Pawson <dave.pawson@...> wrote:
        > In xml-mode C-c C-- used to remove markup.
        >
        > Has anyone got that working with nxml-mode please?
        >
        Do you meen:

        C-c C-d
        Delete the tag at or after point, and delete the matching tag too (sgml-delete-tag). If the tag at or after point is an opening tag, delete the closing tag too; if it is a closing tag, delete the opening tag too.

        I not found C-c C-- in xml-mode, but I use C-c C-d (sgml-delete-tag) from 'sgml-mode.el'.

        I miss this func in nxml mode. I try this and it does not properly work in nxml:

        (eval-after-load 'nxml-mode
        (progn
        (require 'sgml-mode)
        (define-key nxml-mode-map (kbd "C-c C-y") 'sgml-delete-tag)
        ))
      • Dave Pawson
        ... I have C-c C-- linked to sgml-untag-element. I changed mode to sgml-mode and used that. Many defuns involved in bringing it into nxml-mode though. Very
        Message 3 of 5 , Apr 8 10:02 PM
        • 0 Attachment
          On 8 April 2011 22:22, gavenkoa <gavenkoa@...> wrote:
          > Dave Pawson <dave.pawson@...> wrote:
          >> In xml-mode C-c C-- used to remove markup.
          >>
          >> Has anyone got that working with nxml-mode please?
          >>
          > Do you meen:
          >
          > C-c C-d
          >    Delete the tag at or after point, and delete the matching tag too (sgml-delete-tag). If the tag at or after point is an opening tag, delete the closing tag too; if it is a closing tag, delete the opening tag too.
          >
          > I not found C-c C-- in xml-mode, but I use C-c C-d (sgml-delete-tag) from 'sgml-mode.el'.
          >
          > I miss this func in nxml mode. I try this and it does not properly work in nxml:
          >
          > (eval-after-load 'nxml-mode
          >  (progn
          >    (require 'sgml-mode)
          >    (define-key nxml-mode-map (kbd "C-c C-y") 'sgml-delete-tag)
          >    ))

          I have C-c C-- linked to sgml-untag-element.

          I changed mode to sgml-mode and used that.

          Many defuns involved in bringing it into nxml-mode though.

          Very useful function.


          regards


          --
          Dave Pawson
          XSLT XSL-FO FAQ.
          Docbook FAQ.
          http://www.dpawson.co.uk
        • gavenkoa
          ... Oh! I search sgml-untag-element in Emacs lisp dir and not found. Google search take me psgml-mode, which provide this func:
          Message 4 of 5 , Apr 9 2:26 AM
          • 0 Attachment
            Dave Pawson <dave.pawson@...> wrote:
            > I have C-c C-- linked to sgml-untag-element.
            Oh! I search 'sgml-untag-element' in Emacs 'lisp' dir and not found. Google search take me psgml-mode, which provide this func:

            http://sourceforge.net/projects/psgml/develop

            This func make same as 'sgml-delete-tag' from 'sgml-mode.el' which comes with Emacs but it works more ugly - do not removes empty lines.

            If you applay 'sgml-untag-element' on 'member' in:

            <tag>
            <member>
            text
            </member>
            </tag>

            you get:

            <tag>
            <-- spaces
            text
            <-- spaces
            </tag>

            With 'sgml-delete-tag' you get:

            <tag>
            text
            </tag>

            May be create request to emacs-bugs for implementation of 'sgml-delete-tag'/'sgml-untag-element'?
          • Dave Pawson
            ... I m not sure anyone is maintaining this package in gnus? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk
            Message 5 of 5 , Apr 9 2:43 AM
            • 0 Attachment
              On 9 April 2011 10:26, gavenkoa <gavenkoa@...> wrote:

              > May be create request to emacs-bugs for implementation of 'sgml-delete-tag'/'sgml-untag-element'?
              >

              I'm not sure anyone is maintaining this package in gnus?

              regards



              --
              Dave Pawson
              XSLT XSL-FO FAQ.
              Docbook FAQ.
              http://www.dpawson.co.uk
            Your message has been successfully submitted and would be delivered to recipients shortly.