unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41862: 27.0.91; Isearch menu added to menu-bar
@ 2020-06-14 22:05 Drew Adams
  2020-06-15 22:53 ` Juri Linkov
  2021-06-13 11:15 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2020-06-14 22:05 UTC (permalink / raw)
  To: 41862

Starting with Emacs 27, `isearch-mode-map'
includes`isearch-menu-bar-map', which adds menu `Isearch' to the
menu-bar.

This should at least be optional, via user option (not requiring a user
to fiddle with keymaps).

emacs -Q

1. Resize the frame with your mouse, to make it narrower - just wide
enough to show the existing menu-bar menu names.

2. `C-s'

This causes the frame to be redisplayed to add menu-bar menu `Isearch',
which, in effect, moves everything down a line visually, because it
causes the menu-bar to wrap (since the frame was only wide enough to
show the menu-bar without the added `Isearch'.

3. `C-g', or otherwise end Isearch.

This causes the frame to be redisplayed to remove menu-bar menu
`Isearch', with the inverse jarring redisplay.

This behavior is intolerable.  At least let users disable it easily,
with an option.  A better solution than that should be found, but until
then, please at least do that.

The added user option might be only binary: (dis)allow menu `Isearch'.
Or it might have a third value that lets menu `Isearch' be added only if
there's room for it without wrapping.  In that case, the doc needs to be
very clear, so users don't wonder why `Isearch' may sometimes appear and
sometimes not.

If this jarring behavior is platform-dependent, the consider taking care
of it only for platforms where it manifests.  It's a problem for MS
Windows, at least.

In GNU Emacs 27.0.91 (build 1, x86_64-w64-mingw32)
 of 2020-04-20
Repository revision: c36c5a3dedbb2e0349be1b6c3b7567ea7b594f1c
Windowing system distributor `Microsoft Corp.', version 10.0.18362
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static''





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#41862: 27.0.91; Isearch menu added to menu-bar
  2020-06-14 22:05 bug#41862: 27.0.91; Isearch menu added to menu-bar Drew Adams
@ 2020-06-15 22:53 ` Juri Linkov
  2020-06-16  1:25   ` Drew Adams
  2021-06-13 11:15 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2020-06-15 22:53 UTC (permalink / raw)
  To: Drew Adams; +Cc: 41862

> 2. `C-s'
>
> This causes the frame to be redisplayed to add menu-bar menu `Isearch',
> which, in effect, moves everything down a line visually, because it
> causes the menu-bar to wrap (since the frame was only wide enough to
> show the menu-bar without the added `Isearch'.
>
> 3. `C-g', or otherwise end Isearch.
>
> This causes the frame to be redisplayed to remove menu-bar menu
> `Isearch', with the inverse jarring redisplay.

I wonder why are you talking about Isearch only.  Doesn't the same
problem exist for other modes, e.g. Dired menu-bar menus are quite long.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#41862: 27.0.91; Isearch menu added to menu-bar
  2020-06-15 22:53 ` Juri Linkov
@ 2020-06-16  1:25   ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2020-06-16  1:25 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 41862

> > 2. `C-s'
> >
> > This causes the frame to be redisplayed to add menu-bar menu `Isearch',
> > which, in effect, moves everything down a line visually, because it
> > causes the menu-bar to wrap (since the frame was only wide enough to
> > show the menu-bar without the added `Isearch'.
> >
> > 3. `C-g', or otherwise end Isearch.
> >
> > This causes the frame to be redisplayed to remove menu-bar menu
> > `Isearch', with the inverse jarring redisplay.
> 
> I wonder why are you talking about Isearch only.  Doesn't the same
> problem exist for other modes, e.g. Dired menu-bar menus are quite long.

I think the answer is because I've never run into
this problem elsewhere.  It's not about the length
of the menu-bar (well, that's a precondition for
the problem to manifest).  It's about the dynamic
addition and removal of a menu.

For a given window/frame width that shows the whole
menu-bar, you don't see the problem.  The frame
jerking around each time you use `C-s' is a very
different story.

So yes, the phenomenon isn't specific to Isearch.
It's specific to something that adds and removes
a menu often, dynamically, I guess.

For Isearch, the solution/workaround I suggested is
a user option.  Let me return to the unannoying
old behavior, at least.

I don't expect a real solution to the menu-bar
wrapping problem anytime soon - that's been
longstanding.  Please find some good way to mitigate
the problem introduced by the Isearch change.

Obviously people use Isearch a lot, and adding &
removing the menu each time can really be annoying.
Perhaps you have a better suggestion.  I guess users
could maybe customize to always use 2 in their
`default-frame-alist' for `menu-bar-lines', but it
would be a shame for them to have to do that, I
think.

Here's maybe another possibility (dunno how
reasonable it is): If I use Dired, and then use
`M-x' (not in my setup but in `emacs -Q') then menu
`Minbuf' gets added dynamically, for the duration
of an active minibuffer.  But the difference is
that other Dired menus are temporarily removed, so
there's no frame-jerking menu-bar wrapping.

I don't know of other such temporary additions of
a menu, but there probably are some.  I know of
only `Minibuf' and `Isearch'.  The problem is only
with Isearch, between those two.  Maybe Isearch
could/should remove some menus while it adds menu
`Isearch'?  Dunno.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#41862: 27.0.91; Isearch menu added to menu-bar
  2020-06-14 22:05 bug#41862: 27.0.91; Isearch menu added to menu-bar Drew Adams
  2020-06-15 22:53 ` Juri Linkov
@ 2021-06-13 11:15 ` Lars Ingebrigtsen
  2021-06-13 14:53   ` bug#41862: [External] : " Drew Adams
  1 sibling, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-13 11:15 UTC (permalink / raw)
  To: Drew Adams; +Cc: 41862

Drew Adams <drew.adams@oracle.com> writes:

> Starting with Emacs 27, `isearch-mode-map'
> includes`isearch-menu-bar-map', which adds menu `Isearch' to the
> menu-bar.

Many modes add stuff to the menu bar -- there's nothing special about
isearch here.

> This should at least be optional, via user option (not requiring a user
> to fiddle with keymaps).

I don't see why -- the general mechanism we have for this works across
any mode, so that's more convenient than adding some random user options
for a mode here and there:

(define-key isearch-mode-map [menu-bar] nil)

So I'm closing this bug report.

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#41862: [External] : Re: bug#41862: 27.0.91; Isearch menu added to menu-bar
  2021-06-13 11:15 ` Lars Ingebrigtsen
@ 2021-06-13 14:53   ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2021-06-13 14:53 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 41862@debbugs.gnu.org

> > Starting with Emacs 27, `isearch-mode-map'
> > includes`isearch-menu-bar-map', which adds menu
> > `Isearch' to the menu-bar.
> 
> Many modes add stuff to the menu bar -- there's nothing
> special about isearch here.
> 
> > This should at least be optional, via user option
> > (not requiring a user to fiddle with keymaps).
> 
> I don't see why -- the general mechanism we have for
> this works across any mode, so that's more convenient
> than adding some random user options for a mode here
> and there:
> 
> (define-key isearch-mode-map [menu-bar] nil)
> 
> So I'm closing this bug report.

Just to make sure: Did you read my reply to Juri here?
Like you, I said that there's nothing special about
isearch here.

The point is _not_ to remove/prevent the Isearch menu.

And the point is especially not for any given user
to have to do that, and especially not by fiddling
with keymaps.

The point is for Emacs to find a good solution.  I
mentioned the Dired solution, which has long existed,
and which I'm guessing could make sense for Isearch:
When the Isearch menu is shown, consider temporary
removal of another menu (or two) a menu that's not
so useful during Isearch.

That lets you use the Isearch menu without the
annoyance.  And yes, whether to do such removal
(and which menu(s) to remove temporarily) could be
user-configurable with an option.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-13 14:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 22:05 bug#41862: 27.0.91; Isearch menu added to menu-bar Drew Adams
2020-06-15 22:53 ` Juri Linkov
2020-06-16  1:25   ` Drew Adams
2021-06-13 11:15 ` Lars Ingebrigtsen
2021-06-13 14:53   ` bug#41862: [External] : " Drew Adams

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).