Dave Pawson | 8 Apr 2011 15:48
Picon
Gravatar

C-c C--

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

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
    emacs-nxml-mode-digest <at> yahoogroups.com 
    emacs-nxml-mode-fullfeatured <at> yahoogroups.com

(Continue reading)

gavenkoa | 8 Apr 2011 23:22
Picon
Gravatar

Re: C-c C--

Dave Pawson <dave.pawson <at> ...> 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)
    ))

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional
(Continue reading)

Dave Pawson | 9 Apr 2011 07:02
Picon
Gravatar

Re: Re: C-c C--

On 8 April 2011 22:22, gavenkoa <gavenkoa <at> gmail.com> wrote:
> Dave Pawson <dave.pawson <at> ...> 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.

(Continue reading)

gavenkoa | 9 Apr 2011 11:26
Picon
Gravatar

Re: C-c C--

Dave Pawson <dave.pawson <at> ...> 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
(Continue reading)

Dave Pawson | 9 Apr 2011 11:43
Picon
Gravatar

Re: Re: C-c C--

On 9 April 2011 10:26, gavenkoa <gavenkoa <at> gmail.com> 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

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
(Continue reading)


Gmane