From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.help Subject: Re: Detect end-of-line format Date: Tue, 2 Feb 2021 09:20:34 +0100 Message-ID: References: <20210201210342.2ef9275b@gauss> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7178"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Joe Riel Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 02 09:21:28 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 1l6qwB-0001jY-ET for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 02 Feb 2021 09:21:27 +0100 Original-Received: from localhost ([::1]:33954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6qwA-0006g0-HP for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 02 Feb 2021 03:21:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6qvY-0006fn-ON for help-gnu-emacs@gnu.org; Tue, 02 Feb 2021 03:20:48 -0500 Original-Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:41532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6qvX-0004AM-EY for help-gnu-emacs@gnu.org; Tue, 02 Feb 2021 03:20:48 -0500 Original-Received: by mail-oi1-x231.google.com with SMTP id m13so21854533oig.8 for ; Tue, 02 Feb 2021 00:20:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F98l1eW0VORL0QDgQndrKjkuV8/d04uKaJkN1tCyzwE=; b=RbSwYpWB/pruZ/O24GTtqCHFhQAPjvyuRSJLTr35UFhrFqa2JG2/zzFFUxVXtdozlr VpPfubEfIidfO5b/xB3WH5dQmEALAlMUvdP68XV5S0h3r0uECg17wUF2w3/UMbz5ju6x ArJ6Wh8CI8M/iHbptcu/IDgei2/mJbC965zgItrcjeiM362TP50KcCBg/ea/Vyk4/aHL Tco7ns+uu1IZSBUuA72R0jipHLIE0+oT422kZQcvK4lCc9PlfIwb2kIvOsmxFwQFPyXX zfELMhQaz0CkXT4Fi8svThd0/vZ5jDw3FdapHBMDP7lxM0tumaYh+deJEWqPg1tEn1T2 zQQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F98l1eW0VORL0QDgQndrKjkuV8/d04uKaJkN1tCyzwE=; b=YULM0rp8JkIEi7ioVUlifgRKWBkf9JxEEiZLyZzduCqUoi1HOkYH7N6O96chQMLYTE GoTxG6nY0ObmG94PJexzQ7s35qyeGnDZJSidHdl593bWGZky7FdAq+FHPQMvn3SUWFhx bZ2BheDCGrAZVZ0lHJZHbnFHGYlvBjNy1MMX3LooR9ZR+kLS1WLbS0VQvr2+ZYdqxz20 ZQFZRYyy5OL5yCew1nCO2N7w31yvgILK7dTR9UYHSwhcymlvOgN1ZjpCrQBAMMCyhRaz WH90QHUq0Abw7l3MT5YJIMkxklXbj/KsbLiaxzgQbFtW1a9+2fYoOklTrj33xWixwB4A 7Rkw== X-Gm-Message-State: AOAM533rOlmDLTAyEdGhKgVRtNtbGcru8B9AYTKi94lOvv/iBFHqqg8N vrQE4Hf4/D6qyPbBNZWZtbviU1bStgH24gXS7X0= X-Google-Smtp-Source: ABdhPJyBhsWxugdywfkvwj1FoFpdZT+y0UBztJbEMdvupPYuv+3lPeoiqYZ1Kts6PARd3tYbkYthg16DhreH3J7Avqw= X-Received: by 2002:aca:5954:: with SMTP id n81mr1930018oib.25.1612254045771; Tue, 02 Feb 2021 00:20:45 -0800 (PST) In-Reply-To: <20210201210342.2ef9275b@gauss> Received-SPF: pass client-ip=2607:f8b0:4864:20::231; envelope-from=p.stephani2@gmail.com; helo=mail-oi1-x231.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:127558 Archived-At: 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))