From: Manoj Srivastava <srivasta@ieee.org>
To: emacs-devel@gnu.org
Subject: Re: Trunk emacs infelicity with linum mode
Date: Fri, 05 Sep 2014 11:48:09 -0700 [thread overview]
Message-ID: <87lhpxaopi.fsf@glaurung.internal.golden-gryphon.com> (raw)
In-Reply-To: 83oauve75i.fsf@gnu.org
[-- Attachment #1: Type: text/plain, Size: 12948 bytes --]
On Thu, Sep 04 2014, Eli Zaretskii wrote:
>> From: Manoj Srivastava <srivasta@ieee.org>
>> Date: Wed, 03 Sep 2014 09:28:20 -0700
>>
>> Breakpoint 3, lface_from_face_name_no_resolve (f=f@entry=0x120f6d0,
>> face_name=face_name@entry=17204162, signal_p=signal_p@entry=1)
>> at xfaces.c:1967
>> 1967 signal_error ("Invalid face", face_name);
>> --8<---------------cut here---------------end--------------->8---
>>
>> --8<---------------cut here---------------start------------->8---
>> #0 lface_from_face_name_no_resolve (f=f@entry=0x120f6d0,
>> face_name=face_name@entry=17204162, signal_p=signal_p@entry=1)
>> at xfaces.c:1967
>> #1 0x00000000004b047b in get_lface_attributes_no_remap
>> (f=f@entry=0x120f6d0, face_name=face_name@entry=17204162,
>> attrs=attrs@entry=0x7fffffffc2c0, signal_p=signal_p@entry=1) at xfaces.c:2003
>> #2 0x00000000004b160f in get_lface_attributes (f=f@entry=0x120f6d0,
>> face_name=17204162, attrs=attrs@entry=0x7fffffffc2c0, signal_p=1,
>> named_merge_points=named_merge_points@entry=0x0) at xfaces.c:2050
>> #3 0x00000000004b7569 in lookup_named_face (f=f@entry=0x120f6d0,
>> symbol=symbol@entry=17204162, signal_p=signal_p@entry=1)
>> at xfaces.c:4503
>> #4 0x00000000004b760e in Fface_font (face=17204162, frame=<optimized
>> out>, character=12672242) at xfaces.c:3844
>> #5 0x0000000000554fd2 in Ffuncall (nargs=<optimized out>, args=args@entry=0x7fffffffc438) at eval.c:2815
>> #6 0x0000000000589bf3 in exec_byte_code (bytestr=<optimized out>,
>> vector=16288805, maxdepth=<optimized out>,
>> args_template=<optimized out>, nargs=nargs@entry=1,
>> args=<optimized out>, args@entry=0x7fffffffc438) at bytecode.c:920
>> #7 0x0000000000554b47 in funcall_lambda (fun=22295153, nargs=nargs@entry=1, arg_vector=0x7fffffffc438,
>> arg_vector@entry=0x7fffffffc5a8) at eval.c:2976
>> #8 0x0000000000554e0b in Ffuncall (nargs=2, args=args@entry=0x7fffffffc5a0) at eval.c:2869
>> #9 0x0000000000589bf3 in exec_byte_code (bytestr=<optimized out>,
>> vector=19151957, maxdepth=<optimized out>,
>> args_template=<optimized out>, nargs=nargs@entry=1,
>> args=<optimized out>, args@entry=0x7fffffffc5a0) at bytecode.c:920
>> #10 0x0000000000554b47 in funcall_lambda (fun=22294961, nargs=nargs@entry=1, arg_vector=0x7fffffffc5a0,
>> arg_vector@entry=0x7fffffffc6e8) at eval.c:2976
>> #11 0x0000000000554e0b in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7fffffffc6e0) at eval.c:2869
>> #12 0x00000000005551ca in call1 (fn=fn@entry=22953634, arg1=<optimized out>) at eval.c:2607
>> #13 0x000000000055c7f2 in mapcar1 (leni=1, vals=vals@entry=0x0,
>> fn=fn@entry=22953634, seq=seq@entry=17119974) at fns.c:2591
>> #14 0x000000000055ca32 in Fmapc (function=22953634, sequence=17119974) at fns.c:2680
>> #15 0x0000000000554fe2 in Ffuncall (nargs=<optimized out>, args=args@entry=0x7fffffffc7d0) at eval.c:2811
>> #16 0x0000000000589bf3 in exec_byte_code (bytestr=<optimized out>,
>> vector=16288725, maxdepth=<optimized out>,
>> args_template=<optimized out>, nargs=nargs@entry=1,
>> args=<optimized out>, args@entry=0x7fffffffc7d0) at bytecode.c:920
>> #17 0x0000000000554b47 in funcall_lambda (fun=22295569, nargs=nargs@entry=1, arg_vector=0x7fffffffc7d0,
>> arg_vector@entry=0x7fffffffc910) at eval.c:2976
>> #18 0x0000000000554e0b in Ffuncall (nargs=2, args=args@entry=0x7fffffffc908) at eval.c:2869
>> #19 0x0000000000589bf3 in exec_byte_code (bytestr=<optimized out>,
>> vector=16289461, maxdepth=<optimized out>,
>> args_template=<optimized out>, nargs=nargs@entry=0,
>> args=<optimized out>, args@entry=0x7fffffffc908) at bytecode.c:920
>> #20 0x0000000000554b47 in funcall_lambda (fun=22296849, nargs=nargs@entry=0, arg_vector=0x7fffffffc908,
>> arg_vector@entry=0x7fffffffca30) at eval.c:2976
>> #21 0x0000000000554e0b in Ffuncall (nargs=nargs@entry=1, args=args@entry=0x7fffffffca28) at eval.c:2869
>> #22 0x00000000005551e8 in call0 (fn=22958818) at eval.c:2592
>> #23 0x000000000046bda6 in run_funs (funs=17204162) at window.c:3315
>> #24 0x000000000047188d in run_window_configuration_change_hook (f=f@entry=0x120f6d0) at window.c:3369
>> #25 0x0000000000420db1 in adjust_frame_size (f=0x120f6d0,
>> new_width=<optimized out>, new_height=<optimized out>,
>> inhibit=<optimized out>, pretend=<optimized out>) at frame.c:582
>> #26 0x000000000041e4ce in change_frame_size (pixelwise=<optimized
>> out>, safe=<optimized out>, delay=<optimized out>,
>> pretend=<optimized out>, new_height=<optimized out>,
>> new_width=<optimized out>, f=<optimized out>) at dispnew.c:5560
>> #27 do_pending_window_change (safe=false) at dispnew.c:5487
>> #28 0x0000000000420e27 in adjust_frame_size (f=0x120f6d0,
>> new_width=<optimized out>, new_height=<optimized out>, inhibit=0,
>> pretend=<optimized out>) at frame.c:484
>> #29 0x00000000004cfd62 in Fx_create_frame (parms=17204162) at xfns.c:3244
>
> When I follow this recipe on my machine, I see no call to
> run_window_configuration_change_hook, because adjust_frame_size
> returns before that, having discovered (around line 500) that the new
> and the old dimensions are identical, and therefore no resize is
> needed.
>
> Can you see why this is not so in your case? Perhaps the calculations
> of frame dimensions in the case of Lucid are to blame?
>
> Also, I think linum-update-window should do nothing if 'linum' is not
> a valid face on the selected frame, because functions in
> window-configuration-change-hook can be called in many situations on
> which linum has no control.
Here is an gdb session with more breakpoints.
--8<---------------cut here---------------start------------->8---
(gdb) list
484 x_set_window_size (f, 0, new_text_width, new_text_height, 1);
485 f->resized_p = true;
486
487 return;
488 }
489 #endif
490
491 if (new_text_width == old_text_width
492 && new_text_height == old_text_height
493 && new_windows_width == old_windows_width
(gdb) list
494 && new_windows_height == old_windows_height
495 && new_pixel_width == old_pixel_width
496 && new_pixel_height == old_pixel_height)
497 /* No change. Sanitize window sizes and return. */
498 {
499 sanitize_window_sizes (frame, Qt);
500 sanitize_window_sizes (frame, Qnil);
501
502 return;
503 }
(gdb) list
504
505 block_input ();
506
507 #ifdef MSDOS
508 /* We only can set screen dimensions to certain values supported
509 by our video hardware. Try to find the smallest size greater
510 or equal to the requested dimensions. */
511 dos_set_window_size (&new_lines, &new_cols);
512 #endif
513
(gdb) list
514 if (new_windows_width != old_windows_width)
515 {
516 resize_frame_windows (f, new_windows_width, 1, 1);
517
518 /* MSDOS frames cannot PRETEND, as they change frame size by
519 manipulating video hardware. */
520 if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
521 FrameCols (FRAME_TTY (f)) = new_cols;
522
523 #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
(gdb) list
524 if (WINDOWP (f->tool_bar_window))
525 {
526 XWINDOW (f->tool_bar_window)->pixel_width = new_windows_width;
527 XWINDOW (f->tool_bar_window)->total_cols
528 = new_windows_width / unit_width;
529 }
530 #endif
531 }
532
--8<---------------cut here---------------end--------------->8---
For some reason, all the values for the old window are set to
10. Here is the session:
--8<---------------cut here---------------start------------->8---
Breakpoint 4, adjust_frame_size (f=0x11db380, new_width=<optimized out>, new_height=<optimized out>, inhibit=5,
pretend=<optimized out>) at frame.c:514
514 if (new_windows_width != old_windows_width)
(gdb) list
509 by our video hardware. Try to find the smallest size greater
510 or equal to the requested dimensions. */
511 dos_set_window_size (&new_lines, &new_cols);
512 #endif
513
514 if (new_windows_width != old_windows_width)
515 {
516 resize_frame_windows (f, new_windows_width, 1, 1);
517
518 /* MSDOS frames cannot PRETEND, as they change frame size by
(gdb) print new_windows_width
$1 = 106
(gdb) print old_windows_width
$2 = 10
...
*(gdb) print new_text_width
$4 = 90
*(gdb) print old_text_width
$5 = 10
(gdb) print new_windows_width
$6 = 106
*(gdb) print old_windows_width
$7 = 10
(gdb) print new_windows_height
$8 = 230
*(gdb) print old_windows_height
$9 = 10
(gdb) print new_pixel_width
$10 = 108
*(gdb) print old_pixel_width
$11 = 10
--8<---------------cut here---------------end--------------->8---
Here are the inputs to the function adjust_frame_seze:
--8<---------------cut here---------------start------------->8---
(gdb) print *f
$12 = {
header = {
size = 4611686018477899797
},
name = 16103377,
icon_name = 12672242,
title = 12672242,
focus_frame = 12672242,
root_window = 19015685,
selected_window = 19015685,
minibuffer_window = 19019797,
param_alist = 17180166,
scroll_bars = 12672242,
condemned_scroll_bars = 12672242,
menu_bar_items = 12672242,
face_alist = 17323366,
menu_bar_vector = 12672242,
buffer_predicate = 12672242,
buffer_list = 17066726,
buried_buffer_list = 12672242,
tool_bar_window = 12672242,
desired_tool_bar_string = 12672242,
current_tool_bar_string = 12672242,
tool_bar_items = 12672242,
font_data = 12672242,
face_cache = 0xc84ae0,
last_tool_bar_item = -1,
menu_bar_items_used = 0,
namebuf = 0x0,
shell_position = 0x0,
current_pool = 0x0,
desired_pool = 0x0,
desired_matrix = 0x0,
current_matrix = 0x0,
glyphs_initialized_p = true,
resized_p = false,
default_face_done_p = true,
already_hscrolled_p = false,
updated_p = false,
minimize_tool_bar_window_p = false,
fonts_changed = false,
cursor_type_changed = false,
redisplay = true,
external_menu_bar = false,
visible = 0,
iconified = false,
garbaged = true,
wants_modeline = true,
auto_raise = false,
auto_lower = false,
no_split = false,
explicit_name = false,
window_sizes_changed = false,
mouse_moved = false,
pointer_invisible = false,
frozen_window_starts = false,
output_method = output_x_window,
want_fullscreen = FULLSCREEN_NONE,
vertical_scroll_bar_type = vertical_scroll_bar_left,
horizontal_scroll_bars = false,
new_pixelwise = false,
official = false,
tool_bar_lines = 0,
tool_bar_height = 0,
n_tool_bar_rows = 0,
n_tool_bar_items = 0,
decode_mode_spec_buffer = 0xd17040 "\220\263T\001",
insert_line_cost = 0x0,
delete_line_cost = 0x0,
insert_n_lines_cost = 0x0,
delete_n_lines_cost = 0x0,
text_cols = 10,
text_lines = 10,
total_cols = 10,
total_lines = 10,
text_width = 10,
text_height = 10,
new_width = 0,
new_height = 0,
left_pos = 0,
top_pos = 0,
pixel_width = 10,
pixel_height = 10,
x_pixels_diff = 0,
y_pixels_diff = 0,
win_gravity = 0,
size_hint_flags = 0,
border_width = 0,
internal_border_width = 1,
right_divider_width = 0,
bottom_divider_width = 0,
left_fringe_width = 8,
right_fringe_width = 8,
fringe_cols = 2,
menu_bar_lines = 0,
menu_bar_height = 0,
column_width = 9,
line_height = 23,
terminal = 0xfedbd8,
output_data = {
tty = 0xd0f750,
x = 0xd0f750,
w32 = 0xd0f750,
ns = 0xd0f750,
nothing = 13694800
},
font_driver_list = 0x13e4040,
wait_event_type = 0,
desired_cursor = FILLED_BOX_CURSOR,
cursor_width = 0,
blink_off_cursor = FILLED_BOX_CURSOR,
blink_off_cursor_width = 0,
config_scroll_bar_width = 0,
config_scroll_bar_cols = 2,
config_scroll_bar_height = 0,
config_scroll_bar_lines = 0,
cost_calculation_baud_rate = 0,
alpha = {0, 0},
gamma = 0,
extra_line_spacing = 0,
background_pixel = 16777215,
foreground_pixel = 0
}
(gdb) print new_height
$14 = <optimized out>
(gdb) print new_width
$15 = <optimized out>
(gdb) print inhibit
$16 = 5
*(gdb) print pretend
$17 = <optimized out>
--8<---------------cut here---------------end--------------->8---
manoj
--
A pencil with no point needs no eraser.
Manoj Srivastava <srivasta@acm.org> <http://www.golden-gryphon.com/>
4096R/C5779A1C E37E 5EC5 2A01 DA25 AD20 05B6 CF48 9438 C577 9A1C
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 582 bytes --]
next prev parent reply other threads:[~2014-09-05 18:48 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 17:22 Trunk emacs infelicity with linum mode Manoj Srivastava
2014-09-02 18:03 ` Eli Zaretskii
2014-09-02 18:56 ` Manoj Srivastava
2014-09-02 19:11 ` Eli Zaretskii
2014-09-03 7:06 ` Manoj Srivastava
2014-09-03 15:50 ` Eli Zaretskii
2014-09-03 16:28 ` Manoj Srivastava
2014-09-04 15:29 ` Eli Zaretskii
2014-09-04 15:56 ` Stefan Monnier
2014-09-04 18:37 ` Eli Zaretskii
2014-09-04 20:25 ` Stefan Monnier
2014-09-05 6:58 ` Eli Zaretskii
2014-09-05 15:23 ` Stefan Monnier
2014-09-05 15:32 ` Eli Zaretskii
2014-09-05 16:23 ` Stefan Monnier
2014-09-05 17:49 ` Eli Zaretskii
2014-09-06 1:19 ` Manoj Srivastava
2014-09-06 7:43 ` Eli Zaretskii
2014-09-06 15:23 ` Manoj Srivastava
2014-09-06 20:27 ` Stefan Monnier
2014-09-07 5:07 ` Manoj Srivastava
2014-09-08 0:28 ` Stefan Monnier
2014-09-05 18:48 ` Manoj Srivastava [this message]
2014-09-05 19:53 ` Eli Zaretskii
2014-09-06 8:52 ` martin rudalics
2014-09-06 11:18 ` martin rudalics
2014-09-07 15:24 ` Eli Zaretskii
2014-09-07 18:03 ` martin rudalics
2014-09-07 19:28 ` Eli Zaretskii
2014-09-08 9:31 ` martin rudalics
2014-09-07 18:09 ` martin rudalics
2014-09-07 19:34 ` Eli Zaretskii
2014-09-08 9:32 ` martin rudalics
2014-09-09 13:13 ` Eli Zaretskii
2014-09-10 8:03 ` martin rudalics
2014-09-10 17:39 ` Eli Zaretskii
2014-09-10 19:02 ` martin rudalics
2014-09-10 19:15 ` Eli Zaretskii
2014-09-10 19:25 ` Eli Zaretskii
2014-09-11 9:26 ` martin rudalics
2014-09-11 15:14 ` Eli Zaretskii
2014-09-11 16:40 ` martin rudalics
2014-09-11 16:53 ` Eli Zaretskii
2014-09-11 17:59 ` martin rudalics
2014-09-11 18:09 ` martin rudalics
2014-09-03 12:37 ` Herbert J. Skuhra
2014-09-03 15:31 ` Manoj Srivastava
2015-01-04 18:09 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lhpxaopi.fsf@glaurung.internal.golden-gryphon.com \
--to=srivasta@ieee.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).