unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 45848@debbugs.gnu.org, joseph@cauldrondevelopment.com
Subject: bug#45848: 27.1; Buffers menu opens wrong buffer
Date: Mon, 09 May 2022 16:17:28 +0200	[thread overview]
Message-ID: <87fsli6b9j.fsf@gnus.org> (raw)
In-Reply-To: <51227849-be44-5475-b903-c5029f7c576e@gmx.at> (martin rudalics's message of "Thu, 14 Jan 2021 08:40:59 +0100")

martin rudalics <rudalics@gmx.at> writes:

>> In recent versions of GTK Emacs with multiple frames open, selecting the
>> top buffer from the Buffers menu often opens the wrong buffer.  Upon
>> returning to the Buffers menu, the top item has changed to the one that
>> actually opened.  Selecting the desired file from the menu again opens the
>> correct file as expected.

I'm unable to reproduce this, but:

>> I belive the problem is that the Buffers menu opens before the frame focus
>> changes causing the wrong Buffers list to display for the frame.

When clicking on the Buffers menu without selecting the frame first, the
menu first displays the buffers in one order, and then
menu-bar-update-buffers is triggered, and then the order rearranges
itself, which is disturbing.

So menu-bar-update-hook is called too late -- after opening the menu
instead of before.  (Or perhaps called at the right time, but before the
frame is selected...)

> This means that
> conceptually the menu will show the same list regardless from where you
> invoke it unless that invoking step itself changes the global buffer
> list beforehand.  Now selecting a frame is one way to change it, popping
> up a menu from the menu bar should not change it.
>
> So the first issue we'd have to resolve is what the "correct Buffers
> menu" is.

I'm not sure, either.  It just lists things in `buffer-list' order, and
selecting a different frame will select a new window, and therefor a new
buffer, so switching frames will alter the order...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2022-05-09 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 23:13 bug#45848: 27.1; Buffers menu opens wrong buffer Joseph Coffland via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-14  7:40 ` martin rudalics
2022-05-09 14:17   ` Lars Ingebrigtsen [this message]

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=87fsli6b9j.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=45848@debbugs.gnu.org \
    --cc=joseph@cauldrondevelopment.com \
    --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).