From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#11738: 24.1.50; Regression: `modify-frame-parameters' is broken for `left' & `top' Date: Sat, 7 Jul 2012 08:34:48 -0700 Message-ID: <4B27B3319B104929928F1A25283B8325@us.oracle.com> References: <410D9B3E38A743B3B0259C9376E528A9@us.oracle.com> <25492B287E9942E3B6C798C3CD0DFD22@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341675377 24311 80.91.229.3 (7 Jul 2012 15:36:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jul 2012 15:36:17 +0000 (UTC) To: <11738@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 07 17:36:11 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SnX3H-0002vb-7s for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jul 2012 17:36:07 +0200 Original-Received: from localhost ([::1]:39116 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnX3G-0002Dg-9T for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jul 2012 11:36:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnX3B-00027y-KC for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2012 11:36:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnX38-00025n-QW for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2012 11:36:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnX38-00025f-Mz for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2012 11:35:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SnX82-0006mp-LS for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2012 11:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jul 2012 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11738 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11738-submit@debbugs.gnu.org id=B11738.134167560825996 (code B ref 11738); Sat, 07 Jul 2012 15:41:02 +0000 Original-Received: (at 11738) by debbugs.gnu.org; 7 Jul 2012 15:40:08 +0000 Original-Received: from localhost ([127.0.0.1]:54968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SnX7A-0006lD-0b for submit@debbugs.gnu.org; Sat, 07 Jul 2012 11:40:08 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:33573) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SnX77-0006l5-1k for 11738@debbugs.gnu.org; Sat, 07 Jul 2012 11:40:06 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q67FYxrC024872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <11738@debbugs.gnu.org>; Sat, 7 Jul 2012 15:34:59 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q67FYwSf001302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <11738@debbugs.gnu.org>; Sat, 7 Jul 2012 15:34:58 GMT Original-Received: from abhmt110.oracle.com (abhmt110.oracle.com [141.146.116.62]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q67FYwHZ015593 for <11738@debbugs.gnu.org>; Sat, 7 Jul 2012 10:34:58 -0500 Original-Received: from dradamslap1 (/10.159.222.164) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 07 Jul 2012 08:34:57 -0700 X-Priority: 1 (Highest) X-MSMail-Priority: High X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <25492B287E9942E3B6C798C3CD0DFD22@us.oracle.com> Importance: High Thread-Index: Ac1Nw+O2ldyI1ES4QkatGLImM9kOgAKrMkJQAPhg+AA= X-Message-Flag: Follow up X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61691 Archived-At: ping. This is a regression. The frame position parameters (`left' and `top') are broken now. Please restore the use of cons values, which are consistent and facilitate programmatic manipulation of frames. Consider also adding conversion functions such as these between the parameter forms. These are defined in `frame-fns.el' and have been in use for decades. `frame-geom-spec-cons' `frame-geom-value-cons' `frame-geom-spec-numeric' `frame-geom-value-numeric' And consider adding incremental, wraparound frame movement functions such as these, defined in `frame-cmds.el': `move-frame-up' `move-frame-down' `move-frame-left' `move-frame-right' The definition of `*-right' or `*-down' shows the importance of supporting a simple cons parameter value: (defun move-frame-down (&optional increment frame) "Move FRAME (default: selected-frame) down by INCREMENT. INCREMENT is in units of ten pixels. Interactively, it is given by the prefix argument." (interactive "P") (setq increment (if increment (prefix-numeric-value increment) 10)) ; 1 is too small (modify-frame-parameters frame (list (list 'top '+ (new-frame-position frame 'top increment))))) (defun new-frame-position (frame type incr) "Return the new TYPE position of FRAME, incremented by INCR. TYPE is `left' or `top'. INCR is the increment to use when changing the position." (let ((new-pos (+ incr (cadr (frame-geom-value-cons type (cdr (assq type (frame-parameters frame))))))) (display-dimension (if (eq 'left type) (available-screen-pixel-width t) (available-screen-pixel-height t))) (frame-dimension (if (eq 'left type) (frame-pixel-width frame) (frame-pixel-height frame)))) (if (not move-frame-wrap-within-display-flag) new-pos (when (< new-pos (- frame-dimension)) (setq new-pos display-dimension)) (when (> new-pos display-dimension) (setq new-pos (- frame-dimension))) new-pos))) http://www.emacswiki.org/emacs/download/frame-fns.el http://www.emacswiki.org/emacs/download/frame-cmds.el > ping. > > > emacs -Q > > In *scratch*: > > (setq new (- (frame-parameter nil 'left) 10)) > > (setq new `(left + ,new)) > > (modify-frame-parameters nil (list new)) > > > > IOW, try to set `left' or `top' to a value that is a cons > > whose car is `left' or `top', whose cadr is `+' or `-', > > and whose caddr is some new value. Nothing happens. > > > > This is a regression wrt ALL previous Emacs versions (well, ever > > since we had frames). It is important that the cons form of these > > parameter values continue to be accepted, as it has always been.