emacs-devel
[Top][All Lists]
Advanced

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

Re: Please try Pmail


From: Chong Yidong
Subject: Re: Please try Pmail
Date: Sun, 18 Jan 2009 21:57:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Thanks.  First, the swapping code in pmail should be tweaked to use
>> write-region-annotate, like in Stefan's 2008-12-30 change to
>> tar-mode.el.
>
> Sounds right.

Actually, there seems to be a problem with doing this.  The
straightforward approach for using write-region-annotate is:

(defun pmail-write-region-annotate (start end)
  (when (pmail-buffers-swapped-p)
    (set-buffer pmail-view-buffer)
    (widen)
    nil))

The `widen' is necessary because pmail-view-buffer, which contains the
swapped-out buffer contents, is narrowed to the current message.
Without it, only the narrowed part of pmail-view-buffer is written out,
which is wrong.  However, we need to re-narrow pmail-view-buffer after
performing write-region, otherwise pmail screws up.  It's not clear how
to do so.

So we must either (i) put buffer-swapped-with back in and use that, or
(ii) modify annotations to somehow automatically widen and save
restrictions when the current buffer is switched.

Any suggestions?




reply via email to

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