From: "Göktuğ Kayaalp" <self@gkayaalp.com>
To: martin rudalics <rudalics@gmx.at>
Cc: eliz@gnu.org, emacs-devel@gnu.org
Subject: Re: Potential bug in the logic of rmail-select-summary
Date: Thu, 28 Jan 2021 02:23:46 +0300 [thread overview]
Message-ID: <87ft2mhsl9.fsf@gkayaalp.com> (raw)
In-Reply-To: <d41a0f55-917f-4a2e-bc64-1b12db069a7c@gmx.at> (message from martin rudalics on Wed, 20 Jan 2021 17:51:22 +0100)
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:
(setq
display-buffer-alist
'(((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)
'rmail-mode)))
.
((lambda (buffer _)
(split-window-vertically (/ (window-height) 4))
;; Select the buffer.
(switch-to-buffer buffer)
;; Return the current window.
(selected-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
‘rmail-new-summary’:
;; 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))))
(delete-other-windows)))
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!
Best,
-gk.
next prev parent reply other threads:[~2021-01-27 23:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 12:23 Potential bug in the logic of rmail-select-summary Göktuğ Kayaalp
2021-01-19 14:50 ` Eli Zaretskii
2021-01-19 17:14 ` Göktuğ Kayaalp
2021-01-19 18:33 ` Eli Zaretskii
2021-01-19 19:04 ` martin rudalics
2021-01-20 14:09 ` Göktuğ Kayaalp
2021-01-20 16:51 ` martin rudalics
2021-01-27 23:23 ` Göktuğ Kayaalp [this message]
2021-01-28 9:42 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ft2mhsl9.fsf@gkayaalp.com \
--to=self@gkayaalp.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).