* Re: Problem with UNIX/DOS issue on Emacs for Windows
[not found] <mailman.2002.1122584487.20277.help-gnu-emacs@gnu.org>
@ 2005-07-28 21:38 ` Jason Rumney
2005-07-29 10:06 ` B.T. Raven
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jason Rumney @ 2005-07-28 21:38 UTC (permalink / raw)
exits funnel <exitsfunnel@yahoo.com> writes:
> So, what's going on? On what does emacs base the
> determination that the one file is a unix file while
> hte other is not?
The line ends are inconsistent. Or there is a ^M in the middle
of a line somewhere. If this is deliberate (part of a string maybe),
you should probably use "\x0d" instead.
> How can I fix it?
There may be better ways, but usually I use the following method to
repair such files (do not type any spaces, they are just seperating
keystrokes for clarity):
Keystrokes Explanation
M-< Ensure you are starting at the beginning of the file.
M-% C-q C-m RET RET Replace all ^M characters with nothing.
C-x RET f d o s RET Set the file to DOS mode.
C-x C-s Save the repaired file.
You can omit the third step if you don't mind the file having Unix line
ends.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem with UNIX/DOS issue on Emacs for Windows
2005-07-28 21:38 ` Problem with UNIX/DOS issue on Emacs for Windows Jason Rumney
@ 2005-07-29 10:06 ` B.T. Raven
2005-07-29 19:09 ` Jason Rumney
2005-07-29 14:19 ` rob wahoo
2005-08-02 11:08 ` exits funnel
2 siblings, 1 reply; 7+ messages in thread
From: B.T. Raven @ 2005-07-29 10:06 UTC (permalink / raw)
<jasonr (Jason Rumney) @ f2s.com> wrote in message
news:ur7di1uin.fsf@jasonrumney.net...
> exits funnel <exitsfunnel@yahoo.com> writes:
>
> > So, what's going on? On what does emacs base the
> > determination that the one file is a unix file while
> > hte other is not?
>
> The line ends are inconsistent. Or there is a ^M in the middle
> of a line somewhere. If this is deliberate (part of a string maybe),
> you should probably use "\x0d" instead.
>
> > How can I fix it?
>
> There may be better ways, but usually I use the following method to
> repair such files (do not type any spaces, they are just seperating
> keystrokes for clarity):
>
> Keystrokes Explanation
>
> M-< Ensure you are starting at the beginning of the
file.
> M-% C-q C-m RET RET Replace all ^M characters with nothing.
;; doesn't OP need a ! (bang) after the second RET?
> C-x RET f d o s RET Set the file to DOS mode.
> C-x C-s Save the repaired file.
>
> You can omit the third step if you don't mind the file having Unix
line
> ends.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem with UNIX/DOS issue on Emacs for Windows
2005-07-28 21:38 ` Problem with UNIX/DOS issue on Emacs for Windows Jason Rumney
2005-07-29 10:06 ` B.T. Raven
@ 2005-07-29 14:19 ` rob wahoo
2005-08-02 11:08 ` exits funnel
2 siblings, 0 replies; 7+ messages in thread
From: rob wahoo @ 2005-07-29 14:19 UTC (permalink / raw)
Google for eol-conversion.el. It is an emacs package the provides you
with a few user functions for changing files between DOS Unix, and MAC.
It also adds these functions under your Edit button on the menu bar.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem with UNIX/DOS issue on Emacs for Windows
2005-07-28 21:38 ` Problem with UNIX/DOS issue on Emacs for Windows Jason Rumney
2005-07-29 10:06 ` B.T. Raven
2005-07-29 14:19 ` rob wahoo
@ 2005-08-02 11:08 ` exits funnel
2 siblings, 0 replies; 7+ messages in thread
From: exits funnel @ 2005-08-02 11:08 UTC (permalink / raw)
Thanks Jason. I never was able to figure out why
Emacs thought the file was a UNIX file, but in any
case the steps you provided got the file straightened
out. Thanks agains.
-exits
--- jasonr@f2s.com wrote:
> exits funnel <exitsfunnel@yahoo.com> writes:
>
> > So, what's going on? On what does emacs base the
> > determination that the one file is a unix file
> while
> > hte other is not?
>
> The line ends are inconsistent. Or there is a ^M in
> the middle
> of a line somewhere. If this is deliberate (part of
> a string maybe),
> you should probably use "\x0d" instead.
>
> > How can I fix it?
>
> There may be better ways, but usually I use the
> following method to
> repair such files (do not type any spaces, they are
> just seperating
> keystrokes for clarity):
>
> Keystrokes Explanation
>
> M-< Ensure you are starting at
> the beginning of the file.
> M-% C-q C-m RET RET Replace all ^M characters
> with nothing.
> C-x RET f d o s RET Set the file to DOS mode.
> C-x C-s Save the repaired file.
>
> You can omit the third step if you don't mind the
> file having Unix line
> ends.
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Problem with UNIX/DOS issue on Emacs for Windows
@ 2005-07-28 20:41 exits funnel
2005-07-28 21:22 ` Peter Dyballa
0 siblings, 1 reply; 7+ messages in thread
From: exits funnel @ 2005-07-28 20:41 UTC (permalink / raw)
Hello,
I'm running the native Emacs for windows version
21.3.1 on a Win2000 machine. I'm using it to edit two
different java source files. One of the source files
looks fine in the buffer but the other, while
formatted correctly, displays '^M' olong with each
carriage return. I also note that for this file
'(Unix)' appears all the way to the left of the
modeline.
It seems that Emacs thinks that this file is formatted
for unix. When I look at the files in a hex-editor
they look the same to me - each line ending is marked
by a '0d0a' pair. I also tried running 'unix2dos'
(under cygwin) on the offending file but to no avail.
So, what's going on? On what does emacs base the
determination that the one file is a unix file while
hte other is not? How can I fix it? Thanks in
advance for any replies!
-exits
__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem with UNIX/DOS issue on Emacs for Windows
2005-07-28 20:41 exits funnel
@ 2005-07-28 21:22 ` Peter Dyballa
0 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2005-07-28 21:22 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 28.07.2005 um 22:41 schrieb exits funnel:
> each line ending is marked by a '0d0a' pair
This in decimal 13 and 10 meaning C-m and C-j, i.e. they're CR-LF --
and this should be DOS.
You could try to revert the buffer from the file with a new encoding:
C-x RET r <something ending with -dos> RET
(revert-buffer-with-coding-system).
--
Greetings
Pete
To be is to do.
-- I. Kant
To do is to be.
-- A. Sartre
Yabba-Dabba-Doo!
-- F. Flintstone
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-08-02 11:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.2002.1122584487.20277.help-gnu-emacs@gnu.org>
2005-07-28 21:38 ` Problem with UNIX/DOS issue on Emacs for Windows Jason Rumney
2005-07-29 10:06 ` B.T. Raven
2005-07-29 19:09 ` Jason Rumney
2005-07-29 14:19 ` rob wahoo
2005-08-02 11:08 ` exits funnel
2005-07-28 20:41 exits funnel
2005-07-28 21:22 ` Peter Dyballa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).