[Top][All Lists]

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

Re: Potential bug in the logic of rmail-select-summary

From: Göktuğ Kayaalp
Subject: Re: Potential bug in the logic of rmail-select-summary
Date: Thu, 28 Jan 2021 02:23:46 +0300

On 2021-01-20 17:51 +01, martin rudalics <rudalics@gmx.at> wrote:
> So I suggest you put a 'display-buffer-reuse-window' at the beginning of
> 'gk-display-buffer-for-rmail' and test how it behaves then.

Thanks for the suggestion.  I tried to add it to the logic using an
if-let*, and I made sure the function returned a window, but I could not
improve the situation. I then tried to just skip dealing with the
situation where there’s only a single window:

 '(((lambda (b _) (and (not (one-window-p))
                       ;; also:
                       ;; (memq (with-current-buffer b major-mode)
                        ;;     '(rmail-mode rmail-summary-mode)))
                       (eq (with-current-buffer b major-mode)
    ((lambda (buffer _)
       (split-window-vertically (/ (window-height) 4))
       ;; Select the buffer.
       (switch-to-buffer buffer)
       ;; Return the current window.

but still got the same behaviour.  I think this has something to do with
the following lines in rmailsum.el, in the definition of

            ;; If pop-to-buffer did not use that window, delete that
            ;; window.  (This can happen if it uses another frame.)
            (if (not (eq sumbuf (window-buffer (frame-first-window))))

Here the condition is for some reason true somewhere in the call chain,
and I don’t really understand.

I think I’ll give up on this as what Rmail does with buffers in
intermediary steps of a command is fairly complex, and Rmail has many
assumptions about what’s where when.  Maybe later I’ll try make Rmail
call pop-to-buffer no more than strictly necessary.  Till then I’ll give
it it’s own frame and call it a day :)

Again, thanks for bearing with me!



reply via email to

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