From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: strip extraneous CR characters Date: Mon, 28 Sep 2009 20:10:33 +0200 Message-ID: <83hbunq6sm.fsf@gnu.org> References: <87y6nzf70b.fsf@lifelogs.com> <83r5trqd2w.fsf@gnu.org> <87bpkvez8e.fsf@lifelogs.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1254161424 8968 80.91.229.12 (28 Sep 2009 18:10:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Sep 2009 18:10:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 28 20:10:13 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MsKeN-00082m-Hy for ged-emacs-devel@m.gmane.org; Mon, 28 Sep 2009 20:08:40 +0200 Original-Received: from localhost ([127.0.0.1]:54765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MsKeN-0008JS-58 for ged-emacs-devel@m.gmane.org; Mon, 28 Sep 2009 14:08:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MsKeG-0008Hs-Gp for emacs-devel@gnu.org; Mon, 28 Sep 2009 14:08:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MsKeF-0008HA-Ca for emacs-devel@gnu.org; Mon, 28 Sep 2009 14:08:31 -0400 Original-Received: from [199.232.76.173] (port=43763 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MsKeF-0008H7-A0 for emacs-devel@gnu.org; Mon, 28 Sep 2009 14:08:31 -0400 Original-Received: from mtaout2.012.net.il ([84.95.2.4]:43589) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MsKeE-0002Vm-O4 for emacs-devel@gnu.org; Mon, 28 Sep 2009 14:08:31 -0400 Original-Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KQP00D000WHU800@i_mtaout2.012.net.il> for emacs-devel@gnu.org; Mon, 28 Sep 2009 20:08:29 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.56.156]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KQP009PW1243U00@i_mtaout2.012.net.il>; Mon, 28 Sep 2009 20:08:29 +0200 (IST) In-reply-to: <87bpkvez8e.fsf@lifelogs.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115730 Archived-At: > From: Ted Zlatanov > Date: Mon, 28 Sep 2009 12:49:21 -0500 > > Where can I find an example of this EOL decoding from DOS, to ensure I > am doing it correctly? It's very simple: (let ((coding-system-for-read 'undecided-dos)) (insert-file-contents ....)) or: (let ((coding-system-for-read 'undecided-dos)) (decode-coding-inserted-region ....)) or: (decode-coding-region start end 'undecided-dos ...) or (if you must use a string, which I personally advise against): (decode-coding-string STRING 'undecided-dos ...) If none of the above fits the bill, please tell more about what you need to accomplish, where is the text with CRs held originally and where do you want to have the text with CRs stripped.