unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: joseph@cauldrondevelopment.com, 45848@debbugs.gnu.org
Subject: bug#45848: 27.1; Buffers menu opens wrong buffer
Date: Thu, 14 Jan 2021 08:40:59 +0100	[thread overview]
Message-ID: <51227849-be44-5475-b903-c5029f7c576e@gmx.at> (raw)
In-Reply-To: <5118f4c07ec3d18a4012ba6d1f383b28.squirrel@coffland.com>

 > 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.
 >
 > The Buffers menu on each frame appears to be the same but in reality the
 > order is different.  When one frame is in focus but you click on the
 > Buffers menu of an unfocused frame it will show the Buffers for the
 > focused menu.  If you close the menu and reclick, the focus will have
 > changed and it will show the correct Buffers menu.
 >
 > 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.

I always disable the Buffers menu here so I can't tell whether there was
a noticeable change recently.  The function responsible for providing
that menu ('menu-bar-update-buffers') uses the global buffer list - not
the one specific for that menu bar's frame.  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.  The second issue, and that is one that should never happen,
is that apparently Emacs switches to another buffer than the one whose
name you clicked on.  Maybe someone else has an idea how such a thing
could occur in practice.

martin





  reply	other threads:[~2021-01-14  7:40 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 [this message]
2022-05-09 14:17   ` Lars Ingebrigtsen

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=51227849-be44-5475-b903-c5029f7c576e@gmx.at \
    --to=rudalics@gmx.at \
    --cc=45848@debbugs.gnu.org \
    --cc=joseph@cauldrondevelopment.com \
    /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).