[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use nxml mode, but without the auto formatting
From: |
Harry Putnam |
Subject: |
Re: Use nxml mode, but without the auto formatting |
Date: |
Sat, 22 Mar 2014 22:40:54 -0400 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.0.92 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> How can I use emacs to edit nxml documents but not let it format
>> regions when I press bckspc at the end of a line.
>
> Can you show an example of reformatting (I don't use nxml mode myself)?
> Maybe this functionality should only be enabled depending on something
> like electric-indent-mode.
Sorry Stefan, you tried to help and I dropped the ball.
Here is the situation
This happens in Xming '*.launch' files on windows, for me.
These files are created if you use the xming gui to setup a launcher
for a remote program.
If I let emacs format the code then the code doesn't work to launch anything.
If I leave it in a
single line, it does.
Emacs goes into nXML-mode whenever I open an Xming.launch file.
If you use the Xming gui to create a launch file, the code appears as below.
A launcher for a remote xterm
,----
| <?xml version="1.0" encoding="utf-8"?>
| <XLaunch xmlns="http://www.straightrunning.com/XmingNotes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.straightrunning.com/XmingNotes XLaunch.xsd"
WindowMode="MultiWindow" ClientMode="StartProgram" Program="xterm -g 84x36 -fg
linen -bg DarkSlateGrey -cr Skyblue -fn
dec-terminal-medium-r-normal--14-140-75-75-c-80-iso8859-1" ClientStart="PuTTY"
RemoteHost="192.168.1.42" RemoteUser="reader" Clipboard="true"/>
`----
However, if you decide to hand edit that code... then hitting <enter>
at about any point will try to format whatever is behind or above the
cursor.
Here is what happens if I hit <enter> after the last '>'.
,----
| <?xml version="1.0" encoding="utf-8"?>
| <XLaunch xmlns="http://www.straightrunning.com/XmingNotes"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.straightrunning.com/XmingNotes
| XLaunch.xsd" WindowMode="MultiWindow"
| ClientMode="StartProgram" Program="xterm -g 84x36 -fg linen -bg
| DarkSlateGrey -cr Skyblue
| -fn
|
dec-terminal-medium-r-normal--14-140-75-75-c-80-iso8859-1"
| ClientStart="PuTTY" RemoteHost="192.168.1.42"
| RemoteUser="reader" Clipboard="true"/>
`----
To avoid this, I revert to fundamental-mode.. but, of course, then I
don't have the nifty and helpful syntax highlighting.
- Use nxml mode, but without the auto formatting, Harry Putnam, 2014/03/07
- Re: Use nxml mode, but without the auto formatting, Stefan Monnier, 2014/03/07
- Re: Use nxml mode, but without the auto formatting,
Harry Putnam <=
- Re: Use nxml mode, but without the auto formatting, Yuri Khan, 2014/03/23
- Re: Use nxml mode, but without the auto formatting, Harry Putnam, 2014/03/23
- Re: Use nxml mode, but without the auto formatting, Yuri Khan, 2014/03/23
- Re: Use nxml mode, but without the auto formatting, Harry Putnam, 2014/03/23
- Re: Use nxml mode, but without the auto formatting, Stefan, 2014/03/23
- Re: Use nxml mode, but without the auto formatting, Harry Putnam, 2014/03/23