From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Manoj Srivastava Newsgroups: gmane.emacs.devel Subject: Re: Trunk emacs infelicity with linum mode Date: Fri, 05 Sep 2014 11:48:09 -0700 Organization: Manoj Srivastava's Home Message-ID: <87lhpxaopi.fsf@glaurung.internal.golden-gryphon.com> References: <87zjeix7hg.fsf@glaurung.internal.golden-gryphon.com> <838um1gar9.fsf@gnu.org> <87ppfdyhpf.fsf@glaurung.internal.golden-gryphon.com> <8361h5g7mv.fsf@gnu.org> <87zjehw5cs.fsf@glaurung.internal.golden-gryphon.com> <834mwog0u0.fsf@gnu.org> <87wq9kd5y3.fsf@glaurung.internal.golden-gryphon.com> <83oauve75i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1409942939 11336 80.91.229.3 (5 Sep 2014 18:48:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Sep 2014 18:48:59 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 05 20:48:49 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XPyYy-0008KR-0L for ged-emacs-devel@m.gmane.org; Fri, 05 Sep 2014 20:48:48 +0200 Original-Received: from localhost ([::1]:59760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPyYx-0000Bp-JM for ged-emacs-devel@m.gmane.org; Fri, 05 Sep 2014 14:48:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPyYf-0000Bk-0n for emacs-devel@gnu.org; Fri, 05 Sep 2014 14:48:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPyYa-0003aZ-7R for emacs-devel@gnu.org; Fri, 05 Sep 2014 14:48:28 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:40270) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPyYZ-0003aR-Q5 for emacs-devel@gnu.org; Fri, 05 Sep 2014 14:48:24 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XPyYZ-00081M-0V for emacs-devel@gnu.org; Fri, 05 Sep 2014 20:48:23 +0200 Original-Received: from c-71-231-121-134.hsd1.wa.comcast.net ([71.231.121.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Sep 2014 20:48:23 +0200 Original-Received: from srivasta by c-71-231-121-134.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Sep 2014 20:48:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 373 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-231-121-134.hsd1.wa.comcast.net User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) (x86_64-unknown-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAACYAAAAwCAMAAABKbPgaAAAAM1BMVEUAAADIjH/0rp1KPz79 0b+ic2nlpJc2Ly2AY17VlYb4uqi2gHQXFBN2WVXgno5iT02Xa2Nx+jaIAAACVElEQVQ4jeWU23bj IAxFLUAggQX6/6+dI9LGTpo+9mlYiXNhc3TnOP50naZE0tqvgEk+soutnNfQ8yPTWMTENhNrjI+Y +N7POVt8tAzpn2vJlsmttbyfrdkP7hx5iezteGzsbOts7xT+tC1mcG+LtRP2X/16bEQExuyx1uZW vscrAWUT8aE0aDBeBuw8nS5u4WgWyDCllOZUBeyWgbWbGrBsTDpTx0qpphlcYPcgJLvBXFClPMg5 6WH2JidLIAaDF5aAed7uPTH4bjw0bZvfajp2tHc1F+cBm+Vr9YomGSwNhbmcczYEWUu5MBpYvCLV F+ZIKwQfYB+CBXnIRQFvIRhK6l96PemsFLEPFxi+MPxiTYH0Ave1InPsIYes3NJb42ytBSmmysyj lIQYHJm6Im1WbQ0kWMesKFRFPKTDzJ3GhWUn2KWKEkWlKthoACLm2eWJQQh2qKbAUgQxa+8TVjn1 aySm8656ookCfCc5TRzvnZ6YOu3NpHg+uR5YuRkNF/b5IHq5Y7Ve6c2+sR4hqIZ3+5DCt3ukh8Eo vFIXVJxqfMdbkd/BF3YaQkB/2RIUHPMS7RLVAHefrYzWZVQ/ei4peBsROFLi90ltQyvF5I05t4Zs L4C9DODJ2AZCUf8UitGjCIdfx15QQkfZibTOGT3edxns5fY6F2rstKcTwiiaJnQwvYkdzTlaTqNH IkSmGdLrON45tGsMNDoSYr4bxH5emHEFaoFjKBahHXFXfLx9cR9p6ejJXihuxPz57gWHZkWovbPl 9gsU8eImtBi++3D+f+sfT/Mg79fyEz8AAAAASUVORK5CYII= X-URL: http://www.golden-gryphon.com/ Mail-Copies-To: never Cancel-Lock: sha1:4SkyyuehI3ccizQgqlVNlmF0oeo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174048 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, Sep 04 2014, Eli Zaretskii wrote: >> From: Manoj Srivastava >> Date: Wed, 03 Sep 2014 09:28:20 -0700 >>=20 >> Breakpoint 3, lface_from_face_name_no_resolve (f=3Df@entry=3D0x120f6d0, >> face_name=3Dface_name@entry=3D17204162, signal_p=3Dsignal_p@entry=3D1) >> at xfaces.c:1967 >> 1967 signal_error ("Invalid face", face_name); >> --8<---------------cut here---------------end--------------->8--- >>=20 >> --8<---------------cut here---------------start------------->8--- >> #0 lface_from_face_name_no_resolve (f=3Df@entry=3D0x120f6d0, >> face_name=3Dface_name@entry=3D17204162, signal_p=3Dsignal_p@entry=3D1) >> at xfaces.c:1967 >> #1 0x00000000004b047b in get_lface_attributes_no_remap >> (f=3Df@entry=3D0x120f6d0, face_name=3Dface_name@entry=3D17204162, >> attrs=3Dattrs@entry=3D0x7fffffffc2c0, signal_p=3Dsignal_p@entry=3D1)= at xfaces.c:2003 >> #2 0x00000000004b160f in get_lface_attributes (f=3Df@entry=3D0x120f6d0, >> face_name=3D17204162, attrs=3Dattrs@entry=3D0x7fffffffc2c0, signal_p=3D1, >> named_merge_points=3Dnamed_merge_points@entry=3D0x0) at xfaces.c:2050 >> #3 0x00000000004b7569 in lookup_named_face (f=3Df@entry=3D0x120f6d0, >> symbol=3Dsymbol@entry=3D17204162, signal_p=3Dsignal_p@entry=3D1) >> at xfaces.c:4503 >> #4 0x00000000004b760e in Fface_font (face=3D17204162, frame=3D> out>, character=3D12672242) at xfaces.c:3844 >> #5 0x0000000000554fd2 in Ffuncall (nargs=3D, args=3Dargs= @entry=3D0x7fffffffc438) at eval.c:2815 >> #6 0x0000000000589bf3 in exec_byte_code (bytestr=3D, >> vector=3D16288805, maxdepth=3D, >> args_template=3D, nargs=3Dnargs@entry=3D1, >> args=3D, args@entry=3D0x7fffffffc438) at bytecode.c:920 >> #7 0x0000000000554b47 in funcall_lambda (fun=3D22295153, nargs=3Dnargs@= entry=3D1, arg_vector=3D0x7fffffffc438,=20 >> arg_vector@entry=3D0x7fffffffc5a8) at eval.c:2976 >> #8 0x0000000000554e0b in Ffuncall (nargs=3D2, args=3Dargs@entry=3D0x7ff= fffffc5a0) at eval.c:2869 >> #9 0x0000000000589bf3 in exec_byte_code (bytestr=3D, >> vector=3D19151957, maxdepth=3D, >> args_template=3D, nargs=3Dnargs@entry=3D1, >> args=3D, args@entry=3D0x7fffffffc5a0) at bytecode.c:920 >> #10 0x0000000000554b47 in funcall_lambda (fun=3D22294961, nargs=3Dnargs@= entry=3D1, arg_vector=3D0x7fffffffc5a0,=20 >> arg_vector@entry=3D0x7fffffffc6e8) at eval.c:2976 >> #11 0x0000000000554e0b in Ffuncall (nargs=3Dnargs@entry=3D2, args=3Dargs= @entry=3D0x7fffffffc6e0) at eval.c:2869 >> #12 0x00000000005551ca in call1 (fn=3Dfn@entry=3D22953634, arg1=3D) at eval.c:2607 >> #13 0x000000000055c7f2 in mapcar1 (leni=3D1, vals=3Dvals@entry=3D0x0, >> fn=3Dfn@entry=3D22953634, seq=3Dseq@entry=3D17119974) at fns.c:2591 >> #14 0x000000000055ca32 in Fmapc (function=3D22953634, sequence=3D1711997= 4) at fns.c:2680 >> #15 0x0000000000554fe2 in Ffuncall (nargs=3D, args=3Dargs= @entry=3D0x7fffffffc7d0) at eval.c:2811 >> #16 0x0000000000589bf3 in exec_byte_code (bytestr=3D, >> vector=3D16288725, maxdepth=3D, >> args_template=3D, nargs=3Dnargs@entry=3D1, >> args=3D, args@entry=3D0x7fffffffc7d0) at bytecode.c:920 >> #17 0x0000000000554b47 in funcall_lambda (fun=3D22295569, nargs=3Dnargs@= entry=3D1, arg_vector=3D0x7fffffffc7d0,=20 >> arg_vector@entry=3D0x7fffffffc910) at eval.c:2976 >> #18 0x0000000000554e0b in Ffuncall (nargs=3D2, args=3Dargs@entry=3D0x7ff= fffffc908) at eval.c:2869 >> #19 0x0000000000589bf3 in exec_byte_code (bytestr=3D, >> vector=3D16289461, maxdepth=3D, >> args_template=3D, nargs=3Dnargs@entry=3D0, >> args=3D, args@entry=3D0x7fffffffc908) at bytecode.c:920 >> #20 0x0000000000554b47 in funcall_lambda (fun=3D22296849, nargs=3Dnargs@= entry=3D0, arg_vector=3D0x7fffffffc908,=20 >> arg_vector@entry=3D0x7fffffffca30) at eval.c:2976 >> #21 0x0000000000554e0b in Ffuncall (nargs=3Dnargs@entry=3D1, args=3Dargs= @entry=3D0x7fffffffca28) at eval.c:2869 >> #22 0x00000000005551e8 in call0 (fn=3D22958818) at eval.c:2592 >> #23 0x000000000046bda6 in run_funs (funs=3D17204162) at window.c:3315 >> #24 0x000000000047188d in run_window_configuration_change_hook (f=3Df@en= try=3D0x120f6d0) at window.c:3369 >> #25 0x0000000000420db1 in adjust_frame_size (f=3D0x120f6d0, >> new_width=3D, new_height=3D, >> inhibit=3D, pretend=3D) at frame.c:582 >> #26 0x000000000041e4ce in change_frame_size (pixelwise=3D> out>, safe=3D, delay=3D, >> pretend=3D, new_height=3D, >> new_width=3D, f=3D) at dispnew.c:5560 >> #27 do_pending_window_change (safe=3Dfalse) at dispnew.c:5487 >> #28 0x0000000000420e27 in adjust_frame_size (f=3D0x120f6d0, >> new_width=3D, new_height=3D, inhibit=3D0, >> pretend=3D) at frame.c:484 >> #29 0x00000000004cfd62 in Fx_create_frame (parms=3D17204162) at xfns.c:3= 244 > > 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. =20 =2D-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 =3D true; 486 487 return; 488 } 489 #endif 490 491 if (new_text_width =3D=3D old_text_width 492 && new_text_height =3D=3D old_text_height 493 && new_windows_width =3D=3D old_windows_width (gdb) list 494 && new_windows_height =3D=3D old_windows_height 495 && new_pixel_width =3D=3D old_pixel_width 496 && new_pixel_height =3D=3D 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 !=3D 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)) =3D new_cols; 522 523 #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! define= d (HAVE_NS) (gdb) list 524 if (WINDOWP (f->tool_bar_window)) 525 { 526 XWINDOW (f->tool_bar_window)->pixel_width =3D new_windows= _width; 527 XWINDOW (f->tool_bar_window)->total_cols 528 =3D new_windows_width / unit_width; 529 } 530 #endif 531 } 532 =2D-8<---------------cut here---------------end--------------->8--- For some reason, all the values for the old window are set to 10. Here is the session: =2D-8<---------------cut here---------------start------------->8--- Breakpoint 4, adjust_frame_size (f=3D0x11db380, new_width=3D= , new_height=3D, inhibit=3D5,=20 pretend=3D) at frame.c:514 514 if (new_windows_width !=3D 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 !=3D 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 =3D 106 (gdb) print old_windows_width $2 =3D 10 ... *(gdb) print new_text_width $4 =3D 90 *(gdb) print old_text_width $5 =3D 10 (gdb) print new_windows_width $6 =3D 106 *(gdb) print old_windows_width $7 =3D 10 (gdb) print new_windows_height $8 =3D 230 *(gdb) print old_windows_height $9 =3D 10 (gdb) print new_pixel_width $10 =3D 108 *(gdb) print old_pixel_width $11 =3D 10 =2D-8<---------------cut here---------------end--------------->8--- Here are the inputs to the function adjust_frame_seze:=20 =2D-8<---------------cut here---------------start------------->8--- (gdb) print *f $12 =3D { header =3D { size =3D 4611686018477899797 },=20 name =3D 16103377,=20 icon_name =3D 12672242,=20 title =3D 12672242,=20 focus_frame =3D 12672242,=20 root_window =3D 19015685,=20 selected_window =3D 19015685,=20 minibuffer_window =3D 19019797,=20 param_alist =3D 17180166,=20 scroll_bars =3D 12672242,=20 condemned_scroll_bars =3D 12672242,=20 menu_bar_items =3D 12672242,=20 face_alist =3D 17323366,=20 menu_bar_vector =3D 12672242,=20 buffer_predicate =3D 12672242,=20 buffer_list =3D 17066726,=20 buried_buffer_list =3D 12672242,=20 tool_bar_window =3D 12672242,=20 desired_tool_bar_string =3D 12672242,=20 current_tool_bar_string =3D 12672242,=20 tool_bar_items =3D 12672242,=20 font_data =3D 12672242,=20 face_cache =3D 0xc84ae0,=20 last_tool_bar_item =3D -1,=20 menu_bar_items_used =3D 0,=20 namebuf =3D 0x0,=20 shell_position =3D 0x0,=20 current_pool =3D 0x0,=20 desired_pool =3D 0x0,=20 desired_matrix =3D 0x0,=20 current_matrix =3D 0x0,=20 glyphs_initialized_p =3D true,=20 resized_p =3D false,=20 default_face_done_p =3D true,=20 already_hscrolled_p =3D false,=20 updated_p =3D false,=20 minimize_tool_bar_window_p =3D false,=20 fonts_changed =3D false,=20 cursor_type_changed =3D false,=20 redisplay =3D true,=20 external_menu_bar =3D false,=20 visible =3D 0,=20 iconified =3D false,=20 garbaged =3D true,=20 wants_modeline =3D true,=20 auto_raise =3D false,=20 auto_lower =3D false,=20 no_split =3D false,=20 explicit_name =3D false,=20 window_sizes_changed =3D false,=20 mouse_moved =3D false,=20 pointer_invisible =3D false,=20 frozen_window_starts =3D false,=20 output_method =3D output_x_window,=20 want_fullscreen =3D FULLSCREEN_NONE,=20 vertical_scroll_bar_type =3D vertical_scroll_bar_left,=20 horizontal_scroll_bars =3D false,=20 new_pixelwise =3D false,=20 official =3D false, tool_bar_lines =3D 0,=20 tool_bar_height =3D 0,=20 n_tool_bar_rows =3D 0,=20 n_tool_bar_items =3D 0,=20 decode_mode_spec_buffer =3D 0xd17040 "\220\263T\001",=20 insert_line_cost =3D 0x0,=20 delete_line_cost =3D 0x0,=20 insert_n_lines_cost =3D 0x0,=20 delete_n_lines_cost =3D 0x0,=20 text_cols =3D 10,=20 text_lines =3D 10,=20 total_cols =3D 10,=20 total_lines =3D 10,=20 text_width =3D 10,=20 text_height =3D 10,=20 new_width =3D 0,=20 new_height =3D 0,=20 left_pos =3D 0,=20 top_pos =3D 0,=20 pixel_width =3D 10,=20 pixel_height =3D 10,=20 x_pixels_diff =3D 0,=20 y_pixels_diff =3D 0,=20 win_gravity =3D 0,=20 size_hint_flags =3D 0,=20 border_width =3D 0,=20 internal_border_width =3D 1,=20 right_divider_width =3D 0,=20 bottom_divider_width =3D 0,=20 left_fringe_width =3D 8,=20 right_fringe_width =3D 8,=20 fringe_cols =3D 2,=20 menu_bar_lines =3D 0,=20 menu_bar_height =3D 0,=20 column_width =3D 9,=20 line_height =3D 23,=20 terminal =3D 0xfedbd8,=20 output_data =3D { tty =3D 0xd0f750,=20 x =3D 0xd0f750,=20 w32 =3D 0xd0f750,=20 ns =3D 0xd0f750,=20 nothing =3D 13694800 },=20 font_driver_list =3D 0x13e4040,=20 wait_event_type =3D 0,=20 desired_cursor =3D FILLED_BOX_CURSOR,=20 cursor_width =3D 0,=20 blink_off_cursor =3D FILLED_BOX_CURSOR,=20 blink_off_cursor_width =3D 0,=20 config_scroll_bar_width =3D 0,=20 config_scroll_bar_cols =3D 2,=20 config_scroll_bar_height =3D 0,=20 config_scroll_bar_lines =3D 0,=20 cost_calculation_baud_rate =3D 0,=20 alpha =3D {0, 0},=20 gamma =3D 0,=20 extra_line_spacing =3D 0,=20 background_pixel =3D 16777215,=20 foreground_pixel =3D 0 } (gdb) print new_height $14 =3D (gdb) print new_width $15 =3D (gdb) print inhibit $16 =3D 5 *(gdb) print pretend $17 =3D =2D-8<---------------cut here---------------end--------------->8--- manoj =2D-=20 A pencil with no point needs no eraser. Manoj Srivastava =20=20 4096R/C5779A1C E37E 5EC5 2A01 DA25 AD20 05B6 CF48 9438 C577 9A1C --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQFuBAEBCgBYBQJUCgVqURSAAAAAABsALXNyaXZhc3RhQGdvbGRlbi1ncnlwaG9u LmNvbUFCQTcxMDI1QTFCNUE4OEE0RTVGNjhDMjM2QkQ3MjBGNkY1NzY0NzJfMTEy OAAKCRA2vXIPb1dkckj9B/9Qqc5w9tqSddYt04iQqadZfni4V5xg0iAn+tLZaE7A PwfcovyUjVjyKWfwj16sz/UWOvXlMoc2GbgmIgy6RSzKq4++cSMj1VWwG2wkijOm mBvP89COCoQLi3Rn1cBeWwxZhhCuZTyWYb1QO3YUN4btHVy/99DqgHZSONX80VC1 39s1lICFOESz+ls3x2qK4V7D1ecMRWqfOGwYytEh/00w0TPzx9Yfl8Xgjcg9Pvy1 OY/eVFIhgD11Zwa+B9/ljyyeTai5neF5BFCiwO8Hd29PyPiZM7ToW66giGkEQKx4 FIjXUhlo29M3nmLTFkyrIoew1iAm1hzIgptik0D5ZGlt =yTyk -----END PGP SIGNATURE----- --=-=-=--