all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: occitan@esperanto.org, 12419@debbugs.gnu.org
Subject: bug#12419: Mouse click changes layout
Date: Tue, 25 Sep 2012 16:12:39 +0200	[thread overview]
Message-ID: <5061BBD7.8070009@gmx.at> (raw)
In-Reply-To: <834nmmi9sq.fsf@gnu.org>

 >>  > Where in the code or the infrastructure do we enforce an integral
 >>  > number of lines in a window?
 >>
 >> All over the window handling code, presently.
 >
 > Can you humor me with a typical example, please?

The central routine is `window--resize-child-windows'.  But
`balance-windows-2' and `fit-window-to-buffer' are typical too.  All
these go a long way to meet a self-imposed restriction specified in
lines (and columns) by adding lines one-by-one to some window.

Obviously, we can replace this restriction by a pixel specified one and
things become probably much simpler.  In any case, these routines have
to be rewritten.  I can't tell how this will affect the remaining code
(large parts of which rely on `window--resize-child-windows').

 > Why?  Emacs doesn't promise to have the last line visible even now, if
 > the window has variable size fonts.  What we currently do promise
 > (IIUC) is to have each window's height an integral multiple of the
 > default face's height.  But if the window shows no characters with the
 > default face, that contract is irrelevant anyway.

It's not me you have to convince here ;-)

 >> So even if we manage to provide really maximized frames, the window
 >> handling code will have to show most windows with fully visible
 >> lines.
 >
 > See above: you cannot guarantee that.

My experience tells me that people using the default face and only that
will ask for it.  Let's hope I'm wrong.

 > Do we really need such a change?  What damage could be caused by
 > accepting a window size in integral lines, but producing a window that
 > is slightly larger or smaller?  Again, this happens today already as
 > long as non-default faces are displayed in the window.

Probably not much.  Parts of the mouse code might report incongruent
results.  And likely, window resizing will get inconsistent over time.
Give it a try.  Have you ever looked at the routines XEmacs uses for
handling frame/window pixel sizes?  There's quite a lot of them.

 >> And I suppose that we want a function that calculates the number of
 >> pixels between two buffer positions
 >
 > Doesn't pos-visible-in-window-p fit the bill already?

Have you looked at the loop at the end of `fit-window-to-buffer'?  It's
apparently needed because `count-screen-lines' doesn't return a value
that's good enough there.

martin





  reply	other threads:[~2012-09-25 14:12 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
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5061BBD7.8070009@gmx.at \
    --to=rudalics@gmx.at \
    --cc=12419@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.