all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joe Riel <joer@san.rr.com>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Detect end-of-line format
Date: Tue, 2 Feb 2021 08:02:10 -0800	[thread overview]
Message-ID: <20210202080210.684304f4@gauss> (raw)
In-Reply-To: <CAArVCkSXkCvX=nij42JYWWw_-gWNHqxXdQACKa2pEhpR2RwMtw@mail.gmail.com>

On Tue, 2 Feb 2021 09:20:34 +0100
Philipp Stephani <p.stephani2@gmail.com> wrote:

> Am Di., 2. Feb. 2021 um 06:04 Uhr schrieb Joe Riel <joer@san.rr.com>:
> >
> > Is there an emacs function that indicates the end-of-line
> > format (unix, dos, mac) used in the file associated with
> > a buffer?
> >  
> 
> Try
> (coding-system-eol-type buffer-file-coding-system)
> or, if the buffer hasn't been decoded yet:
> (coding-system-eol-type (detect-coding-region (point-min) (point-max) :highest))
> 

Thanks, the first works for my purposes.

-- 
Joe Riel




      reply	other threads:[~2021-02-02 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  5:03 Detect end-of-line format Joe Riel
2021-02-02  8:20 ` Philipp Stephani
2021-02-02 16:02   ` Joe Riel [this message]

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=20210202080210.684304f4@gauss \
    --to=joer@san.rr.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=p.stephani2@gmail.com \
    /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.