all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Harry Putnam <reader@newsguy.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Use nxml mode, but without the auto formatting
Date: Sat, 22 Mar 2014 22:40:54 -0400	[thread overview]
Message-ID: <87y501hc21.fsf@newsguy.com> (raw)
In-Reply-To: jwvlhwleo8l.fsf-monnier+gmane.emacs.help@gnu.org

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.




  reply	other threads:[~2014-03-23  2:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 17:40 Use nxml mode, but without the auto formatting Harry Putnam
2014-03-07 20:41 ` Stefan Monnier
2014-03-23  2:40   ` Harry Putnam [this message]
2014-03-23  4:14     ` Yuri Khan
2014-03-23 13:35       ` Harry Putnam
2014-03-23 14:24         ` Yuri Khan
2014-03-23 20:09           ` Harry Putnam
2014-03-23 22:19     ` Stefan
2014-03-24  2:35       ` Harry Putnam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y501hc21.fsf@newsguy.com \
    --to=reader@newsguy.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.