GNU bug report logs -
#818
23.0.60; error when window-size-change-functions is a buffer-local hook
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 818 in the body.
You can then email your comments to 818 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#818
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Markus Triska <markus.triska <at> gmx.at>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
In "emacs -Q", evaluating:
(progn
(add-hook 'window-size-change-functions 'identity nil t)
(split-window))
yields:
Symbol's function definition is void: t
In GNU Emacs 23.0.60.4 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)
of 2008-08-26 on mt-computer.vdn.ca
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#818
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
martin rudalics <rudalics <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 818 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
> In "emacs -Q", evaluating:
>
> (progn
> (add-hook 'window-size-change-functions 'identity nil t)
> (split-window))
>
> yields:
>
> Symbol's function definition is void: t
Does the attached patch fix it?
martin
[818.diff (text/plain, inline)]
*** xdisp.c.~1.1244.~ 2008-08-07 03:54:06.000000000 +0200
--- xdisp.c 2008-08-30 16:12:09.765625000 +0200
***************
*** 9591,9597 ****
while (CONSP (functions))
{
! call1 (XCAR (functions), frame);
functions = XCDR (functions);
}
UNGCPRO;
--- 9591,9598 ----
while (CONSP (functions))
{
! if (!EQ (XCAR (functions), Qt))
! call1 (XCAR (functions), frame);
functions = XCDR (functions);
}
UNGCPRO;
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#818
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Markus Triska <markus.triska <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #15 received at 818 <at> emacsbugs.donarmstrong.com (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
> Does the attached patch fix it?
Yes, thank you. Once it is fixed in trunk, could you please apply the
following patch to linum.el? Thank you!
2008-08-30 Markus Triska <markus.triska <at> gmx.at>
* linum.el (linum-mode): `window-size-change-functions' can now be
buffer-local.
(linum-update-window): Use result of `move-overlay'.
diff --git a/lisp/linum.el b/lisp/linum.el
index a88bb61..4f77035 100644
--- a/lisp/linum.el
+++ b/lisp/linum.el
@@ -30,7 +30,7 @@
;;; Code:
-(defconst linum-version "0.9wz")
+(defconst linum-version "0.9x")
(defvar linum-overlays nil "Overlays used in this buffer.")
(defvar linum-available nil "Overlays available for reuse.")
@@ -82,15 +82,14 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers."
'linum-update-current) nil t)
(add-hook 'after-change-functions 'linum-after-change nil t))
(add-hook 'window-scroll-functions 'linum-after-scroll nil t)
- ;; mistake in Emacs: window-size-change-functions cannot be local
- (add-hook 'window-size-change-functions 'linum-after-size)
+ (add-hook 'window-size-change-functions 'linum-after-size nil t)
(add-hook 'change-major-mode-hook 'linum-delete-overlays nil t)
(add-hook 'window-configuration-change-hook
'linum-after-config nil t)
(linum-update-current))
(remove-hook 'post-command-hook 'linum-update-current t)
(remove-hook 'post-command-hook 'linum-schedule t)
- (remove-hook 'window-size-change-functions 'linum-after-size)
+ (remove-hook 'window-size-change-functions 'linum-after-size t)
(remove-hook 'window-scroll-functions 'linum-after-scroll t)
(remove-hook 'after-change-functions 'linum-after-change t)
(remove-hook 'window-configuration-change-hook 'linum-after-config t)
@@ -154,11 +153,9 @@ and you have to scroll or press \\[recenter-top-bottom] to update the numbers."
(throw 'visited t))))))
(setq width (max width (length str)))
(unless visited
- (let (ov)
- (if (null linum-available)
- (setq ov (make-overlay (point) (point)))
- (setq ov (pop linum-available))
- (move-overlay ov (point) (point)))
+ (let ((ov (if (null linum-available)
+ (make-overlay (point) (point))
+ (move-overlay (pop linum-available) (point) (point)))))
(push ov linum-overlays)
(overlay-put ov 'before-string
(propertize " " 'display `((margin left-margin) ,str)))
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#818
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
martin rudalics <rudalics <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #20 received at 818 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> Does the attached patch fix it?
>
> Yes, thank you. Once it is fixed in trunk, could you please apply the
> following patch to linum.el? Thank you!
I hopefully checked it in. Please have a look.
> + (add-hook 'window-size-change-functions 'linum-after-size nil t)
My fix only makes sure that Emacs does not issue an error when calling a
function in `window-size-change-functions' and one of these functions
was earlier added buffer-locally. But I'm not sure whether this DTRT
when the value is buffer-local. If it doesn't, we might have to fix it
as Stefan did for `window-configuration-change-hook' just with the frame
argument added. Please have a look at this issue. You might also want
to look at the thread "Wrong window end reported after splitting window"
on emacs-devel around the beginning of this year.
martin
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#818
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Andreas Schwab <schwab <at> suse.de>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #25 received at 818 <at> emacsbugs.donarmstrong.com (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
> *** xdisp.c.~1.1244.~ 2008-08-07 03:54:06.000000000 +0200
> --- xdisp.c 2008-08-30 16:12:09.765625000 +0200
> ***************
> *** 9591,9597 ****
>
> while (CONSP (functions))
> {
> ! call1 (XCAR (functions), frame);
> functions = XCDR (functions);
> }
> UNGCPRO;
> --- 9591,9598 ----
>
> while (CONSP (functions))
> {
> ! if (!EQ (XCAR (functions), Qt))
> ! call1 (XCAR (functions), frame);
> functions = XCDR (functions);
> }
> UNGCPRO;
Why doesn't this use run-hook-with-args?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab <at> suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#818
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
martin rudalics <rudalics <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #30 received at 818 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Why doesn't this use run-hook-with-args?
I don't know. The recent run_funs in window.c uses call0.
Please do whatever you consider appropriate.
Thanks, martin.
bug closed, send any further explanations to Markus Triska <markus.triska <at> gmx.at>
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Mon, 01 Sep 2008 19:55:07 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <don <at> donarmstrong.com>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Tue, 30 Sep 2008 14:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.