unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Emacs on Windows: How to save line breaks in Unix style in undecided buffers by default.
@ 2009-01-25 12:59 hans bennekop
  2009-01-25 18:43 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: hans bennekop @ 2009-01-25 12:59 UTC (permalink / raw)
  To: help-gnu-emacs

In unsaved buffers that are not linked to a file the end-of-line style
is 'undecided'.
In this case Emacs saves line breaks in DOS style (crlf) on Windows.
How can I set it up to use Unix line breaks (lf) by default?

Calling (prefer-coding-system 'utf-8-unix) or setting "" in
file-coding-system-alist to 'undecided-unix works as a quick fix, but
also causes DOS style files to be opened as Unix style files, which is
rather annoying.

Thank you!
Hans




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Emacs on Windows: How to save line breaks in Unix style in undecided buffers by default.
  2009-01-25 12:59 Emacs on Windows: How to save line breaks in Unix style in undecided buffers by default hans bennekop
@ 2009-01-25 18:43 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2009-01-25 18:43 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 25 Jan 2009 13:59:08 +0100
> From: hans bennekop <ylphcm@googlemail.com>
> 
> In unsaved buffers that are not linked to a file the end-of-line style
> is 'undecided'.
> In this case Emacs saves line breaks in DOS style (crlf) on Windows.
> How can I set it up to use Unix line breaks (lf) by default?

Read the description of add-untranslated-filesystem in the Emacs
manual.

Alternatively, try this:

 (setq-default buffer-file-coding-system 'undecided-unix)




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-25 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-25 12:59 Emacs on Windows: How to save line breaks in Unix style in undecided buffers by default hans bennekop
2009-01-25 18:43 ` Eli Zaretskii

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).