Re: [PATCH 2/2] emacs: fix `notmuch-wash-region-to-button' to work at beginning of buffer

Subject: Re: [PATCH 2/2] emacs: fix `notmuch-wash-region-to-button' to work at beginning of buffer

Date: Mon, 30 Jan 2012 16:11:03 +0200

To: Dmitry Kurochkin, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Mon, 30 Jan 2012 16:24:46 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> `Notmuch-wash-region-to-button' is the function that creates hidden
> regions with buttons for signatures, citations and original messages.
> Before the change, it did not work correctly if the to-be-hidden
> region started at the beginning of a message: the visibility toggle
> button was hidden as well.  The patch fixes this.  There are two parts
> in the fix:
> 
> * Use `insert-before-markers' instead of `insert' for creating the
>   button, so that it does not get added to the hidden overlay.
> 
> * Stop using PREFIX argument for adding a newline before the button.
>   The newline should not be added before a button at the beginning of
>   buffer.
> 
> The corresponding test is fixed now.
> ---

+1 -- for test and fix.


Tomi

Thread: