From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joe Riel Newsgroups: gmane.emacs.help Subject: Re: Detect end-of-line format Date: Tue, 2 Feb 2021 08:02:10 -0800 Message-ID: <20210202080210.684304f4@gauss> References: <20210201210342.2ef9275b@gauss> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6574"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Philipp Stephani Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 02 17:14:08 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6yJb-0001ZX-N4 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 02 Feb 2021 17:14:07 +0100 Original-Received: from localhost ([::1]:37344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6yJa-0000ET-A6 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 02 Feb 2021 11:14:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6y8I-00041k-5f for help-gnu-emacs@gnu.org; Tue, 02 Feb 2021 11:02:26 -0500 Original-Received: from p-impout002aa.msg.pkvw.co.charter.net ([47.43.26.133]:37192 helo=p-impout002.msg.pkvw.co.charter.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6y8B-0004d8-74 for help-gnu-emacs@gnu.org; Tue, 02 Feb 2021 11:02:25 -0500 Original-Received: from gauss ([75.80.191.41]) by cmsmtp with ESMTP id 6y82lQgp3FRqF6y82lSU9P; Tue, 02 Feb 2021 16:02:11 +0000 X-Authority-Analysis: v=2.3 cv=cZSsUULM c=1 sm=1 tr=0 a=+5CDr9/63YJEsolaBHb2hg==:117 a=+5CDr9/63YJEsolaBHb2hg==:17 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=ayC55rCoAAAA:8 a=xsGGLW-m-SwtUNrhYJgA:9 a=CjuIK1q_8ugA:10 a=B_RyunTPg8udlmYm5Cu2:22 In-Reply-To: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-CMAE-Envelope: MS4wfFPQXtBjnuAQYe3qzhIfgdjZJHcv9XjDUSGFxN442qXwWcVVsSSbLM3mvvqUxQ+to7ITf9pCzG4jjP4mIz6TzUN/s5wMyf6kgEDdzbOoPor0WqOlrIq/ VAJsoIEtUf6RYCRuBBRpghIIaqpp5Z55RKnu65GgT3B2nVbXVqOZPsMGqULb0ZRdnM1mylYwDPZHXQ== Received-SPF: pass client-ip=47.43.26.133; envelope-from=joer@san.rr.com; helo=p-impout002.msg.pkvw.co.charter.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127562 Archived-At: On Tue, 2 Feb 2021 09:20:34 +0100 Philipp Stephani wrote: > Am Di., 2. Feb. 2021 um 06:04 Uhr schrieb Joe Riel : > > > > 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