From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [drew.adams@oracle.com: RE: set-frame-position - is it a bug?] Date: Wed, 12 Jul 2006 11:36:33 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1152718719 16922 80.91.229.2 (12 Jul 2006 15:38:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Jul 2006 15:38:39 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 12 17:38:36 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G0gmG-0001hj-4a for ged-emacs-devel@m.gmane.org; Wed, 12 Jul 2006 17:37:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G0gmF-0004JJ-Ji for ged-emacs-devel@m.gmane.org; Wed, 12 Jul 2006 11:37:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G0glP-0003yk-Vt for emacs-devel@gnu.org; Wed, 12 Jul 2006 11:36:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G0glO-0003y4-HX for emacs-devel@gnu.org; Wed, 12 Jul 2006 11:36:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G0glO-0003xo-2j for emacs-devel@gnu.org; Wed, 12 Jul 2006 11:36:34 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G0gmx-0006pa-4x for emacs-devel@gnu.org; Wed, 12 Jul 2006 11:38:11 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1G0glN-0002Vc-4P; Wed, 12 Jul 2006 11:36:33 -0400 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56951 Archived-At: Would someone please try to debug this? ------- Start of forwarded message ------- From: "Drew Adams" To: 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: 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" 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 -------