Re: [PATCH v2 0/4] Add refresh all buffers functionality

Subject: Re: [PATCH v2 0/4] Add refresh all buffers functionality

Date: Sun, 25 Sep 2016 03:20:41 +0300

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Ioan-Adrian Ratiu


On Sat, 24 Sep 2016, David Bremner <david@tethera.net> wrote:
> Ioan-Adrian Ratiu <adi@adirat.com> writes:
>
>> On Sat, 24 Sep 2016, Ioan-Adrian Ratiu <adi@adirat.com> wrote:
>>> Argh, so right after I posted this I found a bug: for every new window
>>> in which you open the same notmuch-show buffer it creates a new buffer.
>>>
>>> For example if from notmuch-search you open a thread "hello" in multiple
>>> windows, each window will show a different "hello<1>" "hello<2>" etc
>>> buffer instead of showing a single "hello" buffer for all windows.
>>
>> This is really weird. I'm experiencing this bug even without my patches
>> so it's not a fault in my code. I've tried with both emacs 25.1 and the
>> latest emacs git rev, does anyone else experience this behaviour?
>>
>> Am I missing something, is this an expected behaviour and not a bug?
>
> I don't (yet) have an opinion on whether this is a bug, but I can
> confirm the behaviour exists, e.g. using devel/try-emacs-mua -Q in emacs 24.5.1

It's caused by the generate-new-buffer-name call in notmuch-show(), it's
been there since cca 2010 by 9bee20aed (notmuch.el: Make notmuch-show
buffer name first subject...)

I don't quite understand why generate-new-buffer-name is called at all
there. What's wrong with the existing buffer names and why do we want
to create others? :)

Thread: