all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: Emacs geometry
Date: Mon, 24 Jul 2006 21:15:10 -0700	[thread overview]
Message-ID: <EIENLHALHGIMHGDOLMIMGEAGCKAA.drew.adams@oracle.com> (raw)
In-Reply-To: <uodvee54g.fsf@gnu.org>

    > From: "Drew Adams" <drew.adams@oracle.com>
    > I reported this bug recently to Fran Litterio.

    What bug, and in which message did you report it?

As I said, I reported it to Fran, as at first I thought it was related to
his fix of another frame positioning bug I reported. Here is most of what I
sent to Fran, followed by my view of this new behavior and a request to put
things back the way they were.

----

With emacs -Q:

The initial frame is 2 or 3 cm from the upper left of the display (more or
less like what happens if you do (set-frame-position (selected-frame) 100
100)); in the past, the initial frame has always been flush with top left.

Playing with `make-frame' a little, I'm convinced that that is the problem,
but I don't quite understand what's going on. It seems to open frames in
different places, not necessarily with regard to standard "cascading" (to
the right and down) from the current frame.

I'm not sure that the position of a frame created by `make-frame' is
specified by Emacs, if you don't supply a frame alist, but the behavior
seems wrong now generally, and it is quite different from the behavior
before. It also seems inconsistent now, and it was consistent before.

In my own code (not emacs -Q, which was the case for the above description),
here are 1) the alist I pass to `make-frame' to create a standalone
minibuffer frame and 2) my value of `default-frame-alist'.

Minbuffer:

(...
 (menu-bar-lines)
 (height . 2)
 (icon-type . t)
 (minibuffer . only)
 (user-position . t)
 (vertical-scroll-bars))

`default-frame-alist':

(...
 (menu-bar-lines . 1)
 (top . 0)
 (left . 0)
 (width . 80)
 (height . 35)
 (minibuffer)
 (user-position . t)
 (tool-bar-lines . 1)
 (left-fringe . 0)
 (right-fringe . 0)
 (fringe . 0)
 (menu-bar-lines . 1))

I don't impose a top, left position for the minibuffer frame using the
alist; I position that frame afterward, using `modify-frame-parameters'.

I do impose (0, 0) as the position of default-frame-alist. Nevertheless, the
first frame created is maybe 4cm from the left and 5cm from the top (and the
minibuffer frame is about 1cm from the left). So, the default-frame-alist
does not seem to be respected, wrt position.

Actually, it's weirder than that. The initial positions of the main frame
and the minibuffer frame seem to be inconsistent. At first I thought it
might depend on which other frames were open - even from a different Emacs
session. I iconified some existing sessions and then started a new Emacs
session, and the main frame was about 2cm from the left and 3cm from the
top; the minibuffer frame was about 3cm from the left. But I did that again,
and the positions were 2cm, 3cm for the main frame and 5cm for the
minibuffer frame. It's almost as if the last position of some frame (even
from another session, that might even be iconified now) were saved, and then
the next frame created was offset from that.

Previously, Emacs gave consistent and reasonable results for `make-frame' -
both Emacs 20 and previous Emacs 22 builds. Now, it seems that one doesn't
know what to expect. However, it's not random - something seems to be going
on in some way related to frames previously created (even in previous
sessions).

----

Now, I see that you (Eli) say that this new, inconsistent and unpredictable
behavior is a feature:

    With "emacs -Q", this is the intended behavior:
    the latest changes let the system locate the Emacs
    frame.  The original cause for the change
    was to avoid locating the Emacs frame in the
    portions of the screen occupied by the task bar
    and other decorations.

I understand the motivation, but I, for one, don't like this improvement one
bit. I don't remember seeing this design change discussed, BTW.

First, `default-frame-alist' should be rigorously respected - it seems to be
ignored wrt position now. Second, a user should not *need* to provide
position settings for `default-frame-alist' (or even to provide a
`default-frame-alist') in order to get consistent results when s?he opens
Emacs.

Windows apps generally do not behave in this inconsistent way, trying to
avoid the task bar - most simply open at 0,0. The new behavior seems silly,
and is quite annoying, IMO. If people don't laugh at it, they will curse at
it.

There should be a default value for top, left = 0,0, as before. Anything
else seems weird and unnatural. If the reason for this change was to avoid
the position of the task bar, then I would say:

- The cure is far worse than the disease.

- If there is a good way for Emacs to determine
  the task-bar position, then it could DTRT in
  this regard - *not* just leave positioning up
  to the window manager or the stars.

- If there is no good way for Emacs to determine
  the task-bar position, then it should position
  frames as before, and let the user, who can
  know the task bar position, deal with
  positioning frames to avoid it.

Here is the version I was testing:

In GNU Emacs 22.0.50.1 (i386-msvc-nt5.1.2600)
 of 2006-07-19 on BOS-CTHEWLAP2
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-msvc (12.00)'

  reply	other threads:[~2006-07-25  4:15 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24 20:21 Emacs geometry Sridhar Boovaraghavan
2006-07-24 21:25 ` Drew Adams
2006-07-25  3:27   ` Eli Zaretskii
2006-07-25  4:15     ` Drew Adams [this message]
2006-07-25  6:20       ` Ralf Angeli
2006-07-25 13:41         ` Drew Adams
2006-07-25 18:24           ` Eli Zaretskii
2006-07-25 18:56             ` Drew Adams
2006-07-25 20:08               ` Eli Zaretskii
2006-07-25 21:18                 ` Drew Adams
2006-07-25 22:07                   ` Jason Rumney
2006-07-26  0:36                     ` Drew Adams
2006-07-26  4:57                       ` Sridhar Boovaraghavan
2006-07-26  6:38                         ` Eli Zaretskii
2006-07-26 14:00                           ` Drew Adams
2006-07-26  8:46                         ` Jason Rumney
2006-07-26 14:00                           ` Drew Adams
2006-07-26 14:35                             ` Mathias Dahl
2006-07-26 16:02                             ` Jason Rumney
2006-07-25 13:48         ` Drew Adams
2006-07-25 18:07         ` Eli Zaretskii
2006-07-25 18:55           ` Ralf Angeli
2006-07-25 19:58             ` Eli Zaretskii
2006-07-25 20:41               ` Eli Zaretskii
2006-07-27 21:58                 ` Ralf Angeli
2006-07-28 10:08                   ` Eli Zaretskii
2006-07-30 20:30                     ` Ralf Angeli
2006-07-30 20:33                       ` David Kastrup
2006-07-30 20:38                       ` Eli Zaretskii
2006-07-30 20:48                         ` David Kastrup
2006-07-30 21:22                           ` Eli Zaretskii
2006-07-30 20:41                       ` Eli Zaretskii
2006-07-30 21:09                         ` Ralf Angeli
2006-07-30 21:27                           ` Eli Zaretskii
2006-07-30 21:46                             ` Ralf Angeli
2006-07-31  3:17                               ` Eli Zaretskii
2006-07-31 19:06                                 ` Ralf Angeli
2006-07-31 20:03                                   ` Eli Zaretskii
2006-07-31 21:37                                     ` Ralf Angeli
2006-07-31 23:51                                       ` Nick Roberts
2006-08-01  2:52                                         ` Nick Roberts
2006-08-01 17:55                                           ` Ralf Angeli
2006-08-02  3:19                                             ` Eli Zaretskii
2006-08-01  3:16                                       ` Eli Zaretskii
2006-08-01  5:47                                         ` Ralf Angeli
2006-08-01 20:09                                         ` Ralf Angeli
2006-08-04 11:39                                           ` Eli Zaretskii
2006-08-05 14:05                                             ` Ralf Angeli
2006-08-06  3:16                                               ` Eli Zaretskii
2006-07-30 22:17                       ` Kim F. Storm
2006-07-30 22:44                         ` Ralf Angeli
2006-07-30 22:53                           ` David Kastrup
2006-07-31 16:17                           ` Stefan Monnier
2006-07-31 19:07                             ` Ralf Angeli
2006-07-28  2:57                 ` YAMAMOTO Mitsuharu
2006-07-25 21:29               ` Ralf Angeli
2006-07-26  3:14                 ` Eli Zaretskii
2006-08-04 11:44                 ` Eli Zaretskii
2006-07-25 18:06       ` Eli Zaretskii
2006-07-25  3:26 ` Eli Zaretskii
2006-07-25  4:46   ` Sridhar Boovaraghavan
2006-07-25 18:18     ` Ralf Angeli
2006-07-25 18:22     ` Eli Zaretskii
     [not found] <E925E59A6745554D82E04F24445BFF8D479497@limx3m1.lim.emea.dell.com>
2006-07-27 15:21 ` Drew Adams
2006-07-27 15:40   ` Jason Rumney
     [not found] <E925E59A6745554D82E04F24445BFF8D47949A@limx3m1.lim.emea.dell.com>
2006-07-27 15:49 ` Drew Adams
2006-07-28  9:52   ` Eli Zaretskii
2006-07-28 10:07     ` Robert_Thorpe
2006-07-28 10:18       ` Eli Zaretskii
2006-07-28 10:58     ` Jason Rumney
2006-07-28 13:45     ` Drew Adams
2006-07-28 22:04       ` Nick Roberts
2006-07-28 23:03         ` Drew Adams
2006-07-28 23:45           ` Nick Roberts
2006-07-29  8:37       ` Eli Zaretskii
2006-07-29 14:42         ` Drew Adams
2006-07-29 14:54           ` Eli Zaretskii

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=EIENLHALHGIMHGDOLMIMGEAGCKAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.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 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.