all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "David J. Biesack" <David.Biesack@sas.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 4448@emacsbugs.donarmstrong.com
Subject: bug#4448: 23.1; unrmail fails if buffer has mixed line endings (patch)
Date: Wed, 16 Sep 2009 13:48:41 -0400	[thread overview]
Message-ID: <ytb4or2ye4m.fsf@sas.com> (raw)
In-Reply-To: <837hvyyfkd.fsf@gnu.org> (message from Eli Zaretskii on Wed, 16 Sep 2009 20:17:38 +0300)

> Date: Wed, 16 Sep 2009 20:17:38 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > 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





  reply	other threads:[~2009-09-16 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16 13:28 bug#4448: 23.1; unrmail fails if buffer has mixed line endings (patch) David J. Biesack
2009-09-16 17:17 ` Eli Zaretskii
2009-09-16 17:48   ` David J. Biesack [this message]
2009-09-16 20:33     ` Eli Zaretskii
2009-09-17 12:58       ` David J. Biesack
2009-09-17 14:06         ` Stefan Monnier
2009-09-17 14:56           ` David J. Biesack

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=ytb4or2ye4m.fsf@sas.com \
    --to=david.biesack@sas.com \
    --cc=4448@emacsbugs.donarmstrong.com \
    --cc=eliz@gnu.org \
    /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.