From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: set-frame-position - is it a bug? Date: Fri, 05 Aug 2005 16:33:32 +0200 Organization: Informatimago Message-ID: <87slxowj0j.fsf@thalassa.informatimago.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1123252858 19998 80.91.229.2 (5 Aug 2005 14:40:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Aug 2005 14:40:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 05 16:40:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E13K4-0001oP-HE for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Aug 2005 16:37:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E13Mv-0002wJ-Jt for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Aug 2005 10:40:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!easynet-monga!easynet.net!easynet-post2!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:qeXdeKIrZ2PNRRxDjLjCtSQ0d3c= Original-Lines: 36 Original-NNTP-Posting-Host: 62.93.174.79 Original-X-Trace: DXC=?k=>=2me7FE^STO9PTHfOCEY<>`XO4V7M>Uh List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28441 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28441 Friedrich Laher writes: > the intetion 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? No. IMO it's a bug in the interaction between emacs and the window manager. With my version of emacs "22.0.50.1", and with my window manager (WindowMaker), it works as you want. You could use: (defvar fpx-compensation 0) (defvar fpy-compensation -1) (setq fpx (cdr (assoc 'left (frame-parameters)))) (setq fpy (cdr (assoc 'top (frame-parameters)))) (setq fpx (+ 1 fpx fpx-compensation)) (setq fpy (+ 1 fpy fpy-compensation)) (set-frame-position (next-frame) fpx fpy) -- __Pascal Bourguignon__ http://www.informatimago.com/ I need a new toy. Tail of black dog keeps good time. Pounce! Good dog! Good dog!