unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "52874@debbugs.gnu.org" <52874@debbugs.gnu.org>
Subject: bug#52874: [External] : Re: bug#52874: 26.3; Be able to keep current menu-bar menus when minibuffer is used
Date: Thu, 30 Dec 2021 15:43:20 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488B6020B580A347DF02D08F3459@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <8335mak53n.fsf@gnu.org>

> > The problem is that when the
> > minibuffer is active, the menu-bar menus are no
> > longer those for what was the current buffer
> > before it was active.
> >
> > The problem is not the _addition_ of a Minibuf
> > menu to the menu-bar.  The problem is that the
> > menu-bar menus are changed to be those for the
> > new current buffer, which is the minibuffer.
> >
> > It should be enough that menu Minibuf is added,
> > and so available.  There's little sense in
> > changing the other menus to those for a
> > relatively plain  buffer such as the minibuffer.
> 
> It _is_ added, after removing the parts that were
> specific to the mode of the original buffer.  The
> "constant" parts of the menu bar are kept.

Yes, that's what I said: Minibuf is added and
the non-"constant" menus are removed.

It's the removal of those non-constant menus
that I'm asking to _be able_ to prevent from
happening.

> I still don't understand what kind of problem this causes.  In your
> Dired example, the Dired-specific menu items are not useful in the
> minibuffer; in fact, using those menu items could get  the user in
> trouble (recursive minibuffers and all that).

Please see the original bug report.

They _are_ useful for a command that uses the
minibuffer to browse and use the menu-bar menus.

In such a context it's useful to see what the
menu-bar menus are for the mode in question,
because that's the mode the command was invoked
in.

> On the practical side, adding menu items could easily overflow the
> one screen line allocated to the menu bar, after which the behavior
> becomes ugly and toolkit-dependent.

That's a general problem.  It's not particular
to this context.  And the only menu added is
Minibuf.

And if you really think that's a problem then
the ability to keep the menu-bar as it was when
the minibuffer is entered could forego adding
menu Minibuf to the menu-bar.  Not a problem.

This is about _allowing_ (e.g. by binding a var)
code to keep the menu-bar as it was when the
minibuffer was entered.  It's not about imposing
such behavior.  Allow.  Temporarily.

> So I think you suggestion, if accepted, would be a step in the wrong
> direction.

Again, it would be done only by choice, e.g. for
a given command.

The point is that a command whose purpose is to
do something with the menu-bar menus is about the
menus that are active when (i.e., just as/before)
that command is invoked.  Its entire behavior is
about those menus - _not_ the Minibuf menu plus
"the constant parts of the menu-bar".

It's about a command that, like `menu-bar-open',
uses the menu-bar as it was before that command
is invoked.

When `menu-bar-open' is invoked, the menu-bar
menus aren't changed (the minibuffer isn't used).

A command that navigates the menus using the
minibuffer should, likewise, be able to prevent
the menu-bar menus from changing.  That's all.

For my particular use case, such a command is
`lacarte-execute-menu-command'.  I'd like to be
able to have it bind a global variable that
would prevent the menu-bar from changing as
long as that binding is in effect.
___

https://www.emacswiki.org/emacs/download/lacarte.el





  reply	other threads:[~2021-12-30 15:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-29 16:37 bug#52874: 26.3; Be able to keep current menu-bar menus when minibuffer is used Drew Adams
2021-12-29 22:22 ` Drew Adams
2021-12-30  5:57   ` Eli Zaretskii
2021-12-30 15:43     ` Drew Adams [this message]
2021-12-30 16:42       ` bug#52874: [External] : " Eli Zaretskii
2021-12-30 17:59         ` Drew Adams
2021-12-30 18:11           ` Eli Zaretskii
2021-12-30 19:05             ` Drew Adams
2021-12-30 20:37               ` Drew Adams
2021-12-31 16:01                 ` Drew Adams

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=SJ0PR10MB5488B6020B580A347DF02D08F3459@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=52874@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).