emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug in metamail


From: Richard Stallman
Subject: Re: Bug in metamail
Date: Fri, 11 Oct 2002 19:46:05 -0400

    This is because rmail-ignored-headers includes MIME related headers,
    such as "Content-Type:".  Simple user level solution is to put the
    following code in .emacs.  It is much better to remove these headers
    from rmail-ignored-headers in the next release of emacs distribution.

Hiding these headers is useful.  Most users don't use metamail, and
it would be a shame to give up the useful feature for them.

I think the right fix is that metamail should temporarily unhide the
headers.  This is not terribly hard to do--see rmail-redecode-body for
an example:

      (let ((pruned (rmail-msg-is-pruned)))
        (unwind-protect
            (let ((msgbeg (rmail-msgbeg rmail-current-message))
                  (msgend (rmail-msgend rmail-current-message)))
              ;; Un-prune the message if it is pruned.
              (if pruned
                  (rmail-toggle-header 1))
              (narrow-to-region msgbeg msgend)
              (goto-char (point-min))
              (when (search-forward "\n*** EOOH ***\n" (point-max) t)
                (narrow-to-region msgbeg (point)))
              (goto-char (point-min))
              ... your code here ...
              )
          (if pruned
              (rmail-toggle-header 0))))

Could you try using this approach?

Another approach is to search both the pruned and original
headers.  That would not require changing the buffer,
not even temporarily, so it would be advantageous.
It should not be terribly heard, even.
But you'd have to write that code.




reply via email to

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