unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: occitan@esperanto.org, 12419@debbugs.gnu.org
Subject: bug#12419: Mouse click changes layout
Date: Fri, 14 Sep 2012 21:14:13 +0200	[thread overview]
Message-ID: <50538205.1040900@gmx.at> (raw)
In-Reply-To: <jwv4nn0ipw7.fsf-monnier+emacs@gnu.org>

 >> Wouldn't using the "asymmetric" resizing do the job here?  I don't
 >> think the symmetric variant is ever TRT when triggered by resizing the
 >> minibuffer window.
 >
 > I think asymmetric would be a better choice, indeed.
 >
 > IIUC the difference between "asymmetric" and the old "miniwindow-resize"
 > behavior is that if the lowest window needs to be shrunk below the
 > minimum height, the "miniwindow-resize" just gave up, whereas the
 > "asymmetric" will try to resize further windows.

Asymmetric is what shrink_window_lowest_first did in Emacs 23.  It could
shrink all windows down to their safe minimum height.  But there's no
enlarge_window_lowest_first for the obvious reason.  You can't undo the
effect of shrink_window_lowest_first easily.  So Emacs 23 saved the
sizes of windows at the beginning of growing the minibuffer and restored
them, if possible, when shrinking the minibuffer back.  That's also why
the default of `resize-mini-windows' is `grow-only'.  You can't
implement `t' with this method.  And that's also why the echo area
usually gets cleared and sized back immediately.

 > I think The Right Thing(tm) lies somewhere between the two:
 > - OT1H it's generally a good idea not to grow the miniwindow larger than
 >   other windows), hence the old "miniwindow-resize".
 > - OTOH, if the window just above the minibuffer is a special tiny window
 >   displaying some auxiliary-info, it sometimes makes sense to treat it
 >   as a kind of "attachment to the modeline" and to resize the other
 >   window instead.

This is a case that must be handled.  Anything else would be a regression.

 > So maybe tweaking the asymmetric behavior so it only resizes 1 window
 > (typically the window immediately above the modeline, but if that one
 > is marked window-size-fixed, then the one above) would be ideal.
 >
 > In the mean time, I suggest we try to use asymmetric.

This would enlarge a one line window at the bottom of the frame whenever
the minibuffer is shrunk back.  Not a feasible option.  What I have to
do is to save the state (in the window structure to avoid the extra
allocations) before growing the minibuffer and restore it (if the
heights still match) when shrinking the minibuffer back.  This is
cumbersome but I see no other way.

 > PS: BTW, I've several times wished that when dragging modelines (and
 > vertical dividers), dragging them back would also bring back the other
 > dividers.

I had implemented that initially.  It's disconcerting (but I could make
it optional easily).

 > OTOH, I haven't had the chance to use an Emacs that would
 > behave like that, so maybe if it did I'd often wish that the dividers
 > don't move back.

Indeed.

martin





  reply	other threads:[~2012-09-14 19:14 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 22:04 bug#12419: Mouse click changes layout Daniel Pfeiffer
2012-09-12  2:59 ` Eli Zaretskii
2012-09-12  8:09 ` martin rudalics
2012-09-13 20:41   ` Daniel Pfeiffer
2012-09-14  9:00     ` martin rudalics
2012-09-14 10:36       ` Eli Zaretskii
2012-09-14 13:38         ` martin rudalics
2012-09-14 14:10           ` Drew Adams
2012-09-14 15:08             ` martin rudalics
2012-09-14 16:18               ` Drew Adams
2012-09-14 19:14                 ` martin rudalics
2012-09-14 19:40                   ` Drew Adams
2012-09-15  9:51                     ` martin rudalics
2012-09-15 10:31                       ` martin rudalics
2012-09-14 14:53           ` Eli Zaretskii
2012-09-14 15:16             ` martin rudalics
2012-09-14 16:20               ` Drew Adams
2012-09-14 19:14                 ` martin rudalics
2012-09-14 16:56               ` Eli Zaretskii
2012-09-14 19:15                 ` martin rudalics
2012-09-14 20:16                   ` Eli Zaretskii
2012-09-15  9:54                     ` martin rudalics
2012-09-15 10:23                       ` Eli Zaretskii
2012-09-15 10:39                         ` martin rudalics
2012-09-15 11:14                           ` Eli Zaretskii
2012-09-15 12:44                             ` martin rudalics
2012-09-15 13:35                               ` Eli Zaretskii
2012-09-15 14:34                                 ` martin rudalics
2012-09-14 15:45             ` Stefan Monnier
2012-09-14 19:14               ` martin rudalics [this message]
2012-09-14 19:56                 ` Stefan Monnier
2012-09-15  9:51                   ` martin rudalics
     [not found]       ` <5055D769.1060804@t-online.de>
2012-09-16 17:45         ` martin rudalics
2012-09-22 20:29           ` Daniel Pfeiffer
2012-09-23  9:21             ` martin rudalics
2012-09-23 21:56               ` Daniel Pfeiffer
2012-09-24  8:17                 ` martin rudalics
2012-09-24 14:33                   ` Eli Zaretskii
2012-09-25  9:58                     ` martin rudalics
2012-09-25 12:09                       ` Eli Zaretskii
2012-09-25 14:12                         ` martin rudalics
2012-09-26  8:22                           ` Eli Zaretskii
2012-09-26 11:03                             ` martin rudalics
2012-09-26 11:55                               ` Eli Zaretskii
2012-09-26 12:43                                 ` martin rudalics
2012-09-26 13:17                                   ` Eli Zaretskii
2012-09-26 13:44                                     ` martin rudalics
2012-09-26 13:57                                       ` Eli Zaretskii
2012-09-24 22:20                   ` Daniel Pfeiffer
2012-09-25  6:32                     ` Eli Zaretskii
2012-09-25  9:58                     ` martin rudalics
2020-09-13 17:06               ` Lars Ingebrigtsen
2020-12-07 16:43                 ` 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=50538205.1040900@gmx.at \
    --to=rudalics@gmx.at \
    --cc=12419@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=occitan@esperanto.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).