emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trunk emacs infelicity with linum mode


From: Manoj Srivastava
Subject: Re: Trunk emacs infelicity with linum mode
Date: Fri, 05 Sep 2014 11:48:09 -0700
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) (x86_64-unknown-linux-gnu)

On Thu, Sep 04 2014, Eli Zaretskii wrote:

>> From: Manoj Srivastava <address@hidden>
>> Date: Wed, 03 Sep 2014 09:28:20 -0700
>> 
>> Breakpoint 3, lface_from_face_name_no_resolve (address@hidden,
>> address@hidden, address@hidden)
>>     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 (address@hidden,
>> address@hidden, address@hidden)
>>     at xfaces.c:1967
>> #1 0x00000000004b047b in get_lface_attributes_no_remap
>> (address@hidden, address@hidden,
>>     address@hidden, address@hidden) at xfaces.c:2003
>> #2 0x00000000004b160f in get_lface_attributes (address@hidden,
>> face_name=17204162, address@hidden, signal_p=1,
>>     address@hidden) at xfaces.c:2050
>> #3 0x00000000004b7569 in lookup_named_face (address@hidden,
>> address@hidden, address@hidden)
>>     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>, address@hidden) 
>> at eval.c:2815
>> #6 0x0000000000589bf3 in exec_byte_code (bytestr=<optimized out>,
>> vector=16288805, maxdepth=<optimized out>,
>>     args_template=<optimized out>, address@hidden,
>> args=<optimized out>, address@hidden) at bytecode.c:920
>> #7  0x0000000000554b47 in funcall_lambda (fun=22295153, address@hidden, 
>> arg_vector=0x7fffffffc438, 
>>     address@hidden) at eval.c:2976
>> #8  0x0000000000554e0b in Ffuncall (nargs=2, address@hidden) at eval.c:2869
>> #9 0x0000000000589bf3 in exec_byte_code (bytestr=<optimized out>,
>> vector=19151957, maxdepth=<optimized out>,
>>     args_template=<optimized out>, address@hidden,
>> args=<optimized out>, address@hidden) at bytecode.c:920
>> #10 0x0000000000554b47 in funcall_lambda (fun=22294961, address@hidden, 
>> arg_vector=0x7fffffffc5a0, 
>>     address@hidden) at eval.c:2976
>> #11 0x0000000000554e0b in Ffuncall (address@hidden, address@hidden) at 
>> eval.c:2869
>> #12 0x00000000005551ca in call1 (address@hidden, arg1=<optimized out>) at 
>> eval.c:2607
>> #13 0x000000000055c7f2 in mapcar1 (leni=1, address@hidden,
>> address@hidden, address@hidden) at fns.c:2591
>> #14 0x000000000055ca32 in Fmapc (function=22953634, sequence=17119974) at 
>> fns.c:2680
>> #15 0x0000000000554fe2 in Ffuncall (nargs=<optimized out>, address@hidden) 
>> at eval.c:2811
>> #16 0x0000000000589bf3 in exec_byte_code (bytestr=<optimized out>,
>> vector=16288725, maxdepth=<optimized out>,
>>     args_template=<optimized out>, address@hidden,
>> args=<optimized out>, address@hidden) at bytecode.c:920
>> #17 0x0000000000554b47 in funcall_lambda (fun=22295569, address@hidden, 
>> arg_vector=0x7fffffffc7d0, 
>>     address@hidden) at eval.c:2976
>> #18 0x0000000000554e0b in Ffuncall (nargs=2, address@hidden) at eval.c:2869
>> #19 0x0000000000589bf3 in exec_byte_code (bytestr=<optimized out>,
>> vector=16289461, maxdepth=<optimized out>,
>>     args_template=<optimized out>, address@hidden,
>> args=<optimized out>, address@hidden) at bytecode.c:920
>> #20 0x0000000000554b47 in funcall_lambda (fun=22296849, address@hidden, 
>> arg_vector=0x7fffffffc908, 
>>     address@hidden) at eval.c:2976
>> #21 0x0000000000554e0b in Ffuncall (address@hidden, address@hidden) 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 
>> (address@hidden) 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 <address@hidden> <http://www.golden-gryphon.com/>  
4096R/C5779A1C E37E 5EC5 2A01 DA25 AD20  05B6 CF48 9438 C577 9A1C

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]