From: Kenichi Handa <handa@m17n.org>
To: 1039@emacsbugs.donarmstrong.com
Cc: cyd@stupidchicken.com, rfrancoise@debian.org, pdewacht@gmail.com,
handa@m17n.org
Subject: bug#1039: 23.0.60; emacs forgets EOL convention after revert-buffer
Date: Thu, 29 Jan 2009 13:20:49 +0900 [thread overview]
Message-ID: <tl7r62m68v2.fsf@m17n.org> (raw)
> If you load a file with DOS line endings, and revert it with M-x
> revert-buffer, emacs forgets the used EOL convention and will use
> Unix line endings when writing the file.
This problem is already fixed.
> That patch fixes the bug I reported, but it creates a new one: if you
> change the EOL convention outside of emacs, revert-buffer no longer
> detects this. To reproduce:
>
> printf "hello\r\nworld\r\n" > hello
> emacs -Q hello &
> printf "hello\rworld\r" > hello
> M-x revert-buffer
> # emacs still sees DOS newlines
This is already fixed too.
But, the problem is the case that you load "hello" by explicitly
specifying dos coding system, or you once save the file by dos coding
sytem before reverting. In this case, Emacs respects your
specification, and thus revert-buffer loads the file as dos coding
system, which results in seeing many CR charaters in the above case.
We think this behaviour is not a bug but a feature.
---
Kenichi Handa
handa@m17n.org
next reply other threads:[~2009-01-29 4:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 4:20 Kenichi Handa [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-10-08 16:15 bug#1039: 23.0.60; emacs forgets EOL convention after revert-buffer Chong Yidong
2008-10-08 18:03 ` martin rudalics
2008-10-11 22:10 ` Peter De Wachter
2008-10-12 18:48 ` martin rudalics
2008-10-13 19:53 ` Peter De Wachter
2008-09-27 21:15 Peter De Wachter
2008-09-27 22:12 ` martin rudalics
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=tl7r62m68v2.fsf@m17n.org \
--to=handa@m17n.org \
--cc=1039@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.com \
--cc=pdewacht@gmail.com \
--cc=rfrancoise@debian.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.