From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "David J. Biesack" Newsgroups: gmane.emacs.bugs Subject: bug#4448: 23.1; unrmail fails if buffer has mixed line endings (patch) Date: Wed, 16 Sep 2009 13:48:41 -0400 Message-ID: References: <837hvyyfkd.fsf@gnu.org> Reply-To: "David J. Biesack" , 4448@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1253124441 22659 80.91.229.12 (16 Sep 2009 18:07:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Sep 2009 18:07:21 +0000 (UTC) Cc: 4448@emacsbugs.donarmstrong.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 16 20:07:14 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MnyuP-0000Fb-AA for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Sep 2009 20:07:13 +0200 Original-Received: from localhost ([127.0.0.1]:52086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnyuO-0002I0-OK for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Sep 2009 14:07:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MnyuK-0002Gj-I2 for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2009 14:07:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MnyuF-0002ED-LD for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2009 14:07:08 -0400 Original-Received: from [199.232.76.173] (port=56745 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnyuF-0002E4-Fa for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2009 14:07:03 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:35055) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MnyuE-0004qu-TS for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2009 14:07:03 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8GI70dE024441; Wed, 16 Sep 2009 11:07:01 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8GHt4Xh021335; Wed, 16 Sep 2009 10:55:04 -0700 Resent-Date: Wed, 16 Sep 2009 10:55:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "David J. Biesack" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 16 Sep 2009 17:55:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4448 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4448-submit@emacsbugs.donarmstrong.com id=B4448.125312333120335 (code B ref 4448); Wed, 16 Sep 2009 17:55:04 +0000 Original-Received: (at 4448) by emacsbugs.donarmstrong.com; 16 Sep 2009 17:48:51 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mercav14.na.sas.com (mercav14.na.sas.com [149.173.6.152]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8GHmnI7020328 for <4448@emacsbugs.donarmstrong.com>; Wed, 16 Sep 2009 10:48:51 -0700 X-TM-IMSS-Message-ID: <1a89a0d2000322ff@mercav14.na.sas.com> Original-Received: from d16922.us.sas.com ([10.40.12.239]) by mercav14.na.sas.com ([10.19.9.244]) with ESMTP (TREND IMSS SMTP Service 7.0) id 1a89a0d2000322ff ; Wed, 16 Sep 2009 13:48:42 -0400 In-reply-to: <837hvyyfkd.fsf@gnu.org> (message from Eli Zaretskii on Wed, 16 Sep 2009 20:17:38 +0300) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 16 Sep 2009 14:07:08 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31146 Archived-At: > Date: Wed, 16 Sep 2009 20:17:38 +0300 > From: Eli Zaretskii > > > This causes the > > > > (re-search-forward "^[*][*][*] EOOH [*][*][*]\n") > > > > in unrmail to fail. > > Yes, by design (although the traceback is not by design). I turned on debug-on-error to obtain the traceback > > Here is a patch which makes it work, but I don't think this is the correct > > change; it seems that the correct change would be to account for coding > > systems. > > Actually, I think the correct change would be to throw an error with a > meaningful error message. Babyl files written by Rmail are supposed > to have Unix EOLs. "supposed to", but in my case, this has happened multiple times (I have over 40 rmail files with \n in them) whether because rmail-edit, rmail-output, or the fact that I'm running on Windows and my rmail files are on a unix filesystem, or something else. If you have to modify the code to detect the situation and generate an more meaningful error message, there should be clear instructions on how to fix it.... which is still not very friendly. In that case, you may as well be more robust to begin with and just make it work, at least for this case. (My opinion; I'm certainly going to leave my patch in my installation.) > Of course, entering the debugger is not a graceful > reaction, but I don't think we should support incorrectly formatted > Babyl files. That way lies madness. Well, this again goes back to "how did it get incorrectly formatted?" and if Emacs created the problem, Emacs should correct it. I was happily using Emacs/rmail for years until 23.1 forced me to adopt mbox format. > Thanks. thanks -- David J. Biesack, SAS SAS Campus Dr. Cary, NC 27513 www.sas.com (919) 531-7771