all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [drew.adams@oracle.com: RE: set-frame-position - is it a bug?]
@ 2006-07-12 15:36 Richard Stallman
  2006-07-12 16:07 ` Chong Yidong
  2007-04-28 18:57 ` Drew Adams
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Stallman @ 2006-07-12 15:36 UTC (permalink / raw)


Would someone please try to debug this?

------- Start of forwarded message -------
From: "Drew Adams" <drew.adams@oracle.com>
To: <rms@gnu.org>
Subject: RE: set-frame-position - is it a bug?
Date: Mon, 10 Jul 2006 06:16:58 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="ISO-8859-15"
In-Reply-To: <E1FzqBG-0005D7-12@fencepost.gnu.org>
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4

    Has this ever been fixed?

Not to my knowledge. I don't have the latest CVS snapshot, however.
It's trivial to verify (although I'm using Windows).

- --

    To: "Emacs-Pretest-Bug" <emacs-pretest-bug@gnu.org>
    Date: Sat, 10 Jun 2006 09:56:26 -0700

    This bug was apparently never fixed. To reproduce, simply resize a frame
    horizontally so that the menu-bar wraps, then change the 'left frame
    parameter.

    (setq left-pos (cdr (assq 'left (frame-parameters))))
    (modify-frame-parameters (selected-frame)
      (list (cons 'left (+ 30 left-pos))))

    The frame moves down, as well as right.

    This is annoying if you have, for instance, a key bound to a
    command to move
    the frame right. Repeated use of this key sends the frame downward
    diagonally. Use of the complementary key to move the frame left sends it
    downward as well, so the two are not even inverses if the
    menu-bar wraps.

    Similarly, a command to move the frame up sends it down
    instead. So, if you
    have keys bound to commands that move it up and down, the up movement is
    down instead - the two are not inverses if the menu-bar wraps.

        Sent: Friday, August 05, 2005 7:39 AM
        To: help-gnu-emacs@gnu.org
        Cc: Emacs-Devel
        Subject: RE: set-frame-position - is it a bug?

            the intention of the following code
              (setq fpx (cdr (assoc 'left (frame-parameters))))
              (setq fpy (cdr (assoc 'top  (frame-parameters))))
              (setq fpx (+ 1 fpx))
              (set-frame-position (next-frame) fpx fpy)
            is to move the frame honizontally 1 pixel right;
            but as a side-effect I get a vertical move as well.
            Is there something wrong with my code?

        The code looks OK to me.

        Is your menu-bar (or tool-bar) wider than your frame, so
        that it wraps around? That will cause the behavior you describe.

        Actually, now that I think of it, we should probably consider
        this an Emacs bug, so I'm cc'ing the emacs-devel list. Thanks for
        bringing this up - I've been aware of it for a long time, but it
        never occurred to me to file a bug.

        Bug: If menu-bar is wider than frame, so it wraps, then
        set-frame-position gets it wrong, in the manner described above.
------- End of forwarded message -------

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

* Re: [drew.adams@oracle.com: RE: set-frame-position - is it a bug?]
  2006-07-12 15:36 [drew.adams@oracle.com: RE: set-frame-position - is it a bug?] Richard Stallman
@ 2006-07-12 16:07 ` Chong Yidong
  2006-07-12 16:25   ` Drew Adams
  2006-07-12 18:10   ` Eli Zaretskii
  2007-04-28 18:57 ` Drew Adams
  1 sibling, 2 replies; 7+ messages in thread
From: Chong Yidong @ 2006-07-12 16:07 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Would someone please try to debug this?

I can't reproduce this.  Maybe this is a Windoze-only bug, or it's
fixed in the current CVS.

(On GNU/Linux, there is a different frame movement bug, which was
previously discussed on this list, that's not caused by Emacs but by
the Metacity window manager [apparently the latest version of Metacity
doesn't like programs to specify window positions; other window
managers work OK].)

>     To: "Emacs-Pretest-Bug" <emacs-pretest-bug@gnu.org>
>     Date: Sat, 10 Jun 2006 09:56:26 -0700
>
>     This bug was apparently never fixed. To reproduce, simply resize a frame
>     horizontally so that the menu-bar wraps, then change the 'left frame
>     parameter.
>
>     (setq left-pos (cdr (assq 'left (frame-parameters))))
>     (modify-frame-parameters (selected-frame)
>       (list (cons 'left (+ 30 left-pos))))
>
>     The frame moves down, as well as right.
>
>         Sent: Friday, August 05, 2005 7:39 AM
>         To: help-gnu-emacs@gnu.org
>         Cc: Emacs-Devel
>         Subject: RE: set-frame-position - is it a bug?
>
>             the intention of the following code
>               (setq fpx (cdr (assoc 'left (frame-parameters))))
>               (setq fpy (cdr (assoc 'top  (frame-parameters))))
>               (setq fpx (+ 1 fpx))
>               (set-frame-position (next-frame) fpx fpy)
>             is to move the frame honizontally 1 pixel right;
>             but as a side-effect I get a vertical move as well.
>             Is there something wrong with my code?

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

* RE: [drew.adams@oracle.com: RE: set-frame-position - is it a bug?]
  2006-07-12 16:07 ` Chong Yidong
@ 2006-07-12 16:25   ` Drew Adams
  2006-07-12 18:10   ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2006-07-12 16:25 UTC (permalink / raw)


Yes, I would guess that it is Windows specific, since Windows uses a
different menu bar (IIUC).

    I can't reproduce this.  Maybe this is a Windoze-only bug, or it's
    fixed in the current CVS.

    (On GNU/Linux, there is a different frame movement bug, which was
    previously discussed on this list, that's not caused by Emacs but by
    the Metacity window manager [apparently the latest version of Metacity
    doesn't like programs to specify window positions; other window
    managers work OK].)

    >     This bug was apparently never fixed. To reproduce, simply
    >     resize a frame horizontally so that the menu-bar wraps,
    >     then change the 'left frame parameter.
    >
    >     (setq left-pos (cdr (assq 'left (frame-parameters))))
    >     (modify-frame-parameters (selected-frame)
    >       (list (cons 'left (+ 30 left-pos))))
    >
    >     The frame moves down, as well as right.
    >
    >         Sent: Friday, August 05, 2005 7:39 AM
    >         To: help-gnu-emacs@gnu.org
    >         Cc: Emacs-Devel
    >         Subject: RE: set-frame-position - is it a bug?
    >
    >             the intention of the following code
    >               (setq fpx (cdr (assoc 'left (frame-parameters))))
    >               (setq fpy (cdr (assoc 'top  (frame-parameters))))
    >               (setq fpx (+ 1 fpx))
    >               (set-frame-position (next-frame) fpx fpy)
    >             is to move the frame honizontally 1 pixel right;
    >             but as a side-effect I get a vertical move as well.
    >             Is there something wrong with my code?

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

* Re: [drew.adams@oracle.com: RE: set-frame-position - is it a bug?]
  2006-07-12 16:07 ` Chong Yidong
  2006-07-12 16:25   ` Drew Adams
@ 2006-07-12 18:10   ` Eli Zaretskii
  2006-07-12 18:22     ` Drew Adams
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2006-07-12 18:10 UTC (permalink / raw)
  Cc: emacs-devel

> From: Chong Yidong <cyd@stupidchicken.com>
> Date: Wed, 12 Jul 2006 12:07:59 -0400
> Cc: emacs-devel@gnu.org
> 
> Richard Stallman <rms@gnu.org> writes:
> 
> > Would someone please try to debug this?
> 
> I can't reproduce this.  Maybe this is a Windoze-only bug, or it's
> fixed in the current CVS.

If this cannot be reproduced with _any_ toolkit, then it is Windows
specific (I see it on Windows with a build from 4 days ago).

I don't know when I will be able to look into this; it sounds like an
extremely marginal problem (who will need to ``resize the frame so
that the menu-bar wraps''?).  Maybe someone will beat me to it.

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

* RE: [drew.adams@oracle.com: RE: set-frame-position - is it a bug?]
  2006-07-12 18:10   ` Eli Zaretskii
@ 2006-07-12 18:22     ` Drew Adams
  2006-07-13  3:13       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2006-07-12 18:22 UTC (permalink / raw)


    If this cannot be reproduced with _any_ toolkit, then it is Windows
    specific (I see it on Windows with a build from 4 days ago).

    I don't know when I will be able to look into this; it sounds like an
    extremely marginal problem (who will need to ``resize the frame so
    that the menu-bar wraps''?).  Maybe someone will beat me to it.

I don't know whether you want to consider this "extremely marginal" - at
least two people reported it.

For a use case ("who will need to"): I have code that automatically resizes
each frame to fit its buffer contents. That code purposely ignores the menu
bar. The idea is to have as small a frame as possible, and still see all
buffer lines without wrapping or truncating. You don't want a wide,
half-empty frame with only narrow text in it, simply because the menu bar
happens to be wide for that mode.

The other user who reported this bug does not use automaic frame resizing
AFAIK. That user apparently resized the frame manually, or perhaps the
default frame size was itself too narrow for the menu bar in that particular
mode.

The point is that whether or not the menu bar is wrapped (regardless of how
that might come about), moving a frame should behave the same way (i.e.
behave normally).

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

* Re: [drew.adams@oracle.com: RE: set-frame-position - is it a bug?]
  2006-07-12 18:22     ` Drew Adams
@ 2006-07-13  3:13       ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2006-07-13  3:13 UTC (permalink / raw)
  Cc: emacs-devel

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Wed, 12 Jul 2006 11:22:44 -0700
> 
> The point is that whether or not the menu bar is wrapped (regardless of how
> that might come about), moving a frame should behave the same way (i.e.
> behave normally).

Of course.  I wasn't arguing about that; this is clearly a bug.

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

* RE: [drew.adams@oracle.com: RE: set-frame-position - is it a bug?]
  2006-07-12 15:36 [drew.adams@oracle.com: RE: set-frame-position - is it a bug?] Richard Stallman
  2006-07-12 16:07 ` Chong Yidong
@ 2007-04-28 18:57 ` Drew Adams
  1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2007-04-28 18:57 UTC (permalink / raw)
  To: emacs-devel

This 2005 bug was never fixed. It is apparently a Windows-only bug. Could
this be fixed?

> From: Richard Stallman Sent: Wednesday, July 12, 2006 8:37 AM
> Would someone please try to debug this?
>
>     To: "Emacs-Pretest-Bug" <emacs-pretest-bug@gnu.org>
>     Date: Sat, 10 Jun 2006 09:56:26 -0700
>
>     This bug was apparently never fixed. To reproduce, simply
>     resize a frame horizontally so that the menu-bar wraps, then
>     change the 'left frame parameter.
>
>     (setq left-pos (cdr (assq 'left (frame-parameters))))
>     (modify-frame-parameters (selected-frame)
>       (list (cons 'left (+ 30 left-pos))))
>
>     The frame moves down, as well as right.
>
>     This is annoying if you have, for instance, a key bound to a
>     command to move the frame right. Repeated use of this key
>     sends the frame downward diagonally. Use of the complementary
>     key to move the frame left sends it downward as well, so the
>     two are not even inverses if the menu-bar wraps.
>
>     Similarly, a command to move the frame up sends it down
>     instead. So, if you have keys bound to commands that move it
>     up and down, the up movement is
>     down instead - the two are not inverses if the menu-bar wraps.
>
>         Sent: Friday, August 05, 2005 7:39 AM
>         To: help-gnu-emacs@gnu.org
>         Cc: Emacs-Devel
>         Subject: RE: set-frame-position - is it a bug?
>
>             the intention of the following code
>               (setq fpx (cdr (assoc 'left (frame-parameters))))
>               (setq fpy (cdr (assoc 'top  (frame-parameters))))
>               (setq fpx (+ 1 fpx))
>               (set-frame-position (next-frame) fpx fpy)
>             is to move the frame honizontally 1 pixel right;
>             but as a side-effect I get a vertical move as well.
>             Is there something wrong with my code?
>
>         The code looks OK to me.
>
>         Is your menu-bar (or tool-bar) wider than your frame, so
>         that it wraps around? That will cause the behavior you describe.
>
>         Actually, now that I think of it, we should probably consider
>         this an Emacs bug, so I'm cc'ing the emacs-devel list. Thanks for
>         bringing this up - I've been aware of it for a long time, but it
>         never occurred to me to file a bug.
>
>         Bug: If menu-bar is wider than frame, so it wraps, then
>         set-frame-position gets it wrong, in the manner described above.

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

end of thread, other threads:[~2007-04-28 18:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-12 15:36 [drew.adams@oracle.com: RE: set-frame-position - is it a bug?] Richard Stallman
2006-07-12 16:07 ` Chong Yidong
2006-07-12 16:25   ` Drew Adams
2006-07-12 18:10   ` Eli Zaretskii
2006-07-12 18:22     ` Drew Adams
2006-07-13  3:13       ` Eli Zaretskii
2007-04-28 18:57 ` Drew Adams

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.