GNU bug report logs -
#11738
24.1.50; Regression: `modify-frame-parameters' is broken for `left' & `top'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Tue, 19 Jun 2012 02:38:02 UTC
Severity: normal
Found in version 24.1.50
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11738 in the body.
You can then email your comments to 11738 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11738
; Package
emacs
.
(Tue, 19 Jun 2012 02:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 19 Jun 2012 02:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Note: It still works fine in the release (24.1), but is broken in this
build.
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.
See also this, which brought the bug to my attention:
http://lists.gnu.org/archive/html/help-gnu-emacs/2012-06/msg00227.html
In GNU Emacs 24.1.50.1 (i386-mingw-nt5.1.2600)
of 2012-06-18 on MARVIN
Bzr revision: 108646 michael.albinus <at> gmx.de-20120617185439-jfcgwwbr97nbflkz
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.6) --no-opt --enable-checking --cflags
-ID:/devel/emacs/libs/libXpm-3.5.8/include
-ID:/devel/emacs/libs/libXpm-3.5.8/src
-ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
-ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
-ID:/devel/emacs/libs/giflib-4.1.4-1/include
-ID:/devel/emacs/libs/jpeg-6b-4/include
-ID:/devel/emacs/libs/tiff-3.8.2-1/include
-ID:/devel/emacs/libs/gnutls-3.0.9/include
-ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
-ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11738
; Package
emacs
.
(Mon, 02 Jul 2012 16:42:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 11738 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11738
; Package
emacs
.
(Sat, 07 Jul 2012 15:41:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 11738 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11738
; Package
emacs
.
(Sat, 14 Jul 2012 21:17:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 11738 <at> debbugs.gnu.org (full text, mbox):
ping. No response - it's been a month so far.
> ping. This is a regression.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11738
; Package
emacs
.
(Tue, 17 Jul 2012 21:29:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 11738 <at> debbugs.gnu.org (full text, mbox):
Hello,
I was the one who brought issue to Drew's attention a month ago:
http://lists.gnu.org/archive/html/help-gnu-emacs/2012-06/msg00227.html
The ability to slide frames side-to-side--with the keyboard--is vital
for frame-based emacs users, like myself.
If it is not possible to fix this regression, and revivify Drew's
move-frame-[up|down|left|right], are there alternate mechanisms?
I am not aware of any other options.
So I urge you to rectify this at your earliest convenience.
Many thanks,
-BC
GNU Emacs 24.1.50.1 (i386-mingw-nt6.1.7601) of 2012-06-18 on MARVIN
Windows 7
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11738
; Package
emacs
.
(Wed, 18 Jul 2012 08:17:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 11738 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> oracle.com> writes:
> 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.
Paul Eggert's revision 108370 is responsible. The part below was bogus;
reverted in trunk. Paul---please be more careful when doing such
code-churning.
***************
*** 2913,2919 ****
}
/* Don't die if just one of these was set. */
! if (EQ (left, Qunbound))
{
left_no_change = 1;
if (f->left_pos < 0)
--- 2916,2922 ----
}
/* Don't die if just one of these was set. */
! if (! TYPE_RANGED_INTEGERP (int, left))
{
left_no_change = 1;
if (f->left_pos < 0)
***************
*** 2921,2927 ****
else
XSETINT (left, f->left_pos);
}
! if (EQ (top, Qunbound))
{
top_no_change = 1;
if (f->top_pos < 0)
--- 2924,2930 ----
else
XSETINT (left, f->left_pos);
}
! if (! TYPE_RANGED_INTEGERP (int, top))
{
top_no_change = 1;
if (f->top_pos < 0)
bug closed, send any further explanations to
11738 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com>
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 18 Jul 2012 08:18:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11738
; Package
emacs
.
(Wed, 18 Jul 2012 13:40:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 11738 <at> debbugs.gnu.org (full text, mbox):
> Paul Eggert's revision 108370 is responsible. The part below
> was bogus; reverted in trunk. Paul---please be more careful
> when doing such code-churning.
Thank you for fixing it - I'll check with the next Windows binary and let you
know if I see any problem.
And thanks especially to William Crandall for adding his voice to the bug
thread, without which who knows whether there would ever have been any response
from Emacs Dev.
And let me repeat that you might want to consider adding to Emacs itself the
functionality (if not the same functions) that I mentioned is provided by my
(simple) code.
That would provide a more general/systematic/abstract way of handling frame
geometric parameters.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11738
; Package
emacs
.
(Mon, 23 Jul 2012 22:17:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 11738 <at> debbugs.gnu.org (full text, mbox):
Thanks!
Just tried the new binary: All good again.
-BC
GNU Emacs 24.1.50.1 (i386-mingw-nt6.1.7601)
of 2012-07-22 on MARVIN
From: emacs-20120723-r109189-bin-i386.zip
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 21 Aug 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.