[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rmail-mbox-branch]: inital problems

From: Alfred M. Szmidt
Subject: Re: [rmail-mbox-branch]: inital problems
Date: Sat, 18 Sep 2004 02:09:54 +0200

       It would be nice if the new rmail would report an error if it
       is trying to open a old mailbox.  Right now it just assumes
       that it knows what it is doing, and will barf with a babyl
       formated mailbox.

   How about this?

I don't like it, it does the check far far to late.  It should do it
before switching to any modes.

I was thinking something more along the lines of:

--- rmail.el    23 Feb 2003 00:33:25 -0000      1.368.2.5
+++ rmail.el    18 Sep 2004 00:08:34 -0000
@@ -684,16 +685,16 @@ If `rmail-display-summary' is non-nil, m
         (find-file-noselect file-name))))
     (if (eq major-mode 'rmail-edit-mode)
        (error "Exit Rmail Edit mode before getting new mail"))
+    ;; If file starts like a Babyl file, reject it.
+    (if (looking-at "BABYL OPTIONS:")
+       (error "This is a BABYL file; use M-x unrmail to convert it"))
     (if (and existed (> (buffer-size) 0))
        ;; Buffer not new and not empty; ensure in proper mode, but that's all.
        (or (eq major-mode 'rmail-mode)
            (progn (rmail-mode-2)
                   (setq run-mail-hook t)))
       (setq run-mail-hook t)
-      (rmail-mode-2)
-      ;; Convert all or part to Babyl file if possible.
-;;;      (rmail-convert-file)
-      (goto-char (point-max)))
+      (rmail-mode-2))
     ;; As we have read a file by raw-text, the buffer is set to
     ;; unibyte.  We must make it multibyte if necessary.
     (if (and rmail-enable-multibyte

reply via email to

[Prev in Thread] Current Thread [Next in Thread]