bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#10729: 24.0.93; On MS-Windows: emacsclientw.exe -n -c does create a


From: Juanma Barranquero
Subject: bug#10729: 24.0.93; On MS-Windows: emacsclientw.exe -n -c does create a new frame, but does not always display the requested file or the requested directory (24.0.92 does)
Date: Tue, 7 Feb 2012 14:08:42 +0100

On Tue, Feb 7, 2012 at 08:53, martin rudalics <rudalics@gmx.at> wrote:

> A `set-buffer' can be needed if win is already selected but next-buffer
> is not the current buffer.

Thanks, now I understand. Looking at the code, select_window does not
call Fset_buffer if the window is already selected. I think that
should be noted in the docstring of Fselect_window, which on that
issue says only this:

 Select window.  Most editing will apply to window's buffer.
 Also make window's buffer current and make window the frame's selected
 window.  Return window.

> I'm not used to working with Emacs as server.  Could you try putting a
> breakpoint somewhere in set_window_buffer and get a backtrace there?

The attached backtrace is the call that sets *scratch* (bug.txt is the
short test file).

    Juanma


Breakpoint 3, Fset_window_buffer (window=81516037,
buffer_or_name=54738949, keep_margins=54700058) at window.c:3069
3069      register struct window *w = decode_window (window);
(gdb) bt
#0  Fset_window_buffer (window=81516037, buffer_or_name=54738949,
keep_margins=54700058) at window.c:3069
#1  0x01036cf3 in Ffuncall (nargs=3, args=0x88aeb0) at eval.c:2994
#2  0x010de95e in exec_byte_code (bytestr=20138569, vector=20138645,
maxdepth=16, args_template=54700058, nargs=0, args=0x0) at
bytecode.c:785
#3  0x01037b38 in funcall_lambda (fun=20138501, nargs=4,
arg_vector=0x342a81a) at eval.c:3218
#4  0x0103701e in Ffuncall (nargs=5, args=0x88b1a0) at eval.c:3036
#5  0x010de95e in exec_byte_code (bytestr=20139169, vector=20139317,
maxdepth=28, args_template=54700058, nargs=0, args=0x0) at
bytecode.c:785
#6  0x010ddefc in Fbyte_code (bytestr=20139169, vector=20139317,
maxdepth=28) at bytecode.c:423
#7  0x01034e58 in eval_sub (form=20139158) at eval.c:2341
#8  0x0103260e in internal_catch (tag=54981826, func=0x103451f
<eval_sub>, arg=20139158) at eval.c:1257
#9  0x010df31c in exec_byte_code (bytestr=20138897, vector=20139029,
maxdepth=28, args_template=54700058, nargs=0, args=0x0) at
bytecode.c:966
#10 0x01037b38 in funcall_lambda (fun=20138845, nargs=2,
arg_vector=0x342a81a) at eval.c:3218
#11 0x0103701e in Ffuncall (nargs=3, args=0x88b850) at eval.c:3036
#12 0x010de95e in exec_byte_code (bytestr=20141809, vector=20141893,
maxdepth=20, args_template=54700058, nargs=0, args=0x0) at
bytecode.c:785
#13 0x01037b38 in funcall_lambda (fun=20141781, nargs=1,
arg_vector=0x342a81a) at eval.c:3218
#14 0x0103701e in Ffuncall (nargs=2, args=0x88bb58) at eval.c:3036
#15 0x01036195 in call1 (fn=54848066, arg1=57495045) at eval.c:2756
#16 0x011c019a in replace_buffer_in_windows (buffer=57495045) at window.c:2781
#17 0x010ab865 in Fkill_buffer (buffer_or_name=54700058) at buffer.c:1539
#18 0x01036c20 in Ffuncall (nargs=2, args=0x88bcb4) at eval.c:2987
#19 0x010de95e in exec_byte_code (bytestr=56290273, vector=81404805,
maxdepth=20, args_template=1028, nargs=1, args=0x88bfbc) at
bytecode.c:785
#20 0x01037704 in funcall_lambda (fun=56018789, nargs=1,
arg_vector=0x404) at eval.c:3152
#21 0x0103701e in Ffuncall (nargs=2, args=0x88bfb4) at eval.c:3036
#22 0x010de95e in exec_byte_code (bytestr=54897281, vector=82037253,
maxdepth=20, args_template=0, nargs=0, args=0x88c2c4) at
bytecode.c:785
#23 0x01037704 in funcall_lambda (fun=56819493, nargs=0,
arg_vector=0x0) at eval.c:3152
#24 0x0103701e in Ffuncall (nargs=1, args=0x88c2c0) at eval.c:3036
#25 0x01034be2 in eval_sub (form=82028518) at eval.c:2307
#26 0x01032b09 in internal_lisp_condition_case (var=81410938,
bodyform=82028518, handlers=82026542) at eval.c:1454
#27 0x010df383 in exec_byte_code (bytestr=54897457, vector=82037125,
maxdepth=56, args_template=0, nargs=0, args=0x88c7a4) at
bytecode.c:981
#28 0x01037704 in funcall_lambda (fun=56815621, nargs=0,
arg_vector=0x0) at eval.c:3152
#29 0x0103701e in Ffuncall (nargs=1, args=0x88c7a0) at eval.c:3036
#30 0x01034be2 in eval_sub (form=82028454) at eval.c:2307
#31 0x01032b09 in internal_lisp_condition_case (var=81410914,
bodyform=82028454, handlers=82028502) at eval.c:1454
#32 0x010df383 in exec_byte_code (bytestr=54897521, vector=81404357,
maxdepth=84, args_template=7196, nargs=7, args=0x88ccb0) at
bytecode.c:981
#33 0x01037704 in funcall_lambda (fun=56954789, nargs=7,
arg_vector=0x1c1c) at eval.c:3152
#34 0x0103701e in Ffuncall (nargs=8, args=0x88cc90) at eval.c:3036
#35 0x010de95e in exec_byte_code (bytestr=54817377, vector=57453061,
maxdepth=32, args_template=0, nargs=0, args=0x88cf94) at
bytecode.c:785
#36 0x01037704 in funcall_lambda (fun=56818309, nargs=0,
arg_vector=0x0) at eval.c:3152
#37 0x0103701e in Ffuncall (nargs=1, args=0x88cf90) at eval.c:3036
#38 0x010de95e in exec_byte_code (bytestr=57148833, vector=81305125,
maxdepth=4, args_template=0, nargs=0, args=0x88d294) at bytecode.c:785
#39 0x01037704 in funcall_lambda (fun=56816709, nargs=0,
arg_vector=0x0) at eval.c:3152
#40 0x0103701e in Ffuncall (nargs=1, args=0x88d290) at eval.c:3036
#41 0x01034be2 in eval_sub (form=82028366) at eval.c:2307
#42 0x01032b09 in internal_lisp_condition_case (var=81410770,
bodyform=82028366, handlers=82028414) at eval.c:1454
#43 0x010df383 in exec_byte_code (bytestr=57149281, vector=54798725,
maxdepth=40, args_template=1028, nargs=1, args=0x88d798) at
bytecode.c:981
#44 0x01037704 in funcall_lambda (fun=56045605, nargs=1,
arg_vector=0x404) at eval.c:3152
#45 0x0103701e in Ffuncall (nargs=2, args=0x88d790) at eval.c:3036
#46 0x010de95e in exec_byte_code (bytestr=55380625, vector=81599493,
maxdepth=128, args_template=0, nargs=0, args=0x88dac4) at
bytecode.c:785
#47 0x01037704 in funcall_lambda (fun=55708613, nargs=0,
arg_vector=0x0) at eval.c:3152
#48 0x0103701e in Ffuncall (nargs=1, args=0x88dac0) at eval.c:3036
#49 0x01034be2 in eval_sub (form=55900630) at eval.c:2307
#50 0x01032b09 in internal_lisp_condition_case (var=81410842,
bodyform=55900630, handlers=55900054) at eval.c:1454
#51 0x010df383 in exec_byte_code (bytestr=55793521, vector=57560325,
maxdepth=40, args_template=0, nargs=0, args=0x88df94) at
bytecode.c:981
#52 0x01037704 in funcall_lambda (fun=57868997, nargs=0,
arg_vector=0x0) at eval.c:3152
#53 0x0103701e in Ffuncall (nargs=1, args=0x88df90) at eval.c:3036
#54 0x01034be2 in eval_sub (form=55900966) at eval.c:2307
#55 0x0103260e in internal_catch (tag=81410794, func=0x103451f
<eval_sub>, arg=55900966) at eval.c:1257
#56 0x010df31c in exec_byte_code (bytestr=55793585, vector=81404421,
maxdepth=48, args_template=2056, nargs=2, args=0x88e43c) at
bytecode.c:966
#57 0x01037704 in funcall_lambda (fun=56954053, nargs=2,
arg_vector=0x808) at eval.c:3152
#58 0x0103701e in Ffuncall (nargs=3, args=0x88e430) at eval.c:3036
#59 0x01035bf3 in Fapply (nargs=2, args=0x88e4c4) at eval.c:2492
#60 0x01036140 in apply1 (fn=81410338, arg=55901310) at eval.c:2730
#61 0x0104c229 in read_process_output_call (fun_and_args=55901014) at
process.c:5002
#62 0x01032cd3 in internal_condition_case_1 (bfun=0x104c1a6
<read_process_output_call>, arg=55901014, handlers=54757786,
    hfun=0x104c22b <read_process_output_error_handler>) at eval.c:1538
#63 0x0104c8fc in read_process_output (proc=57560069, channel=4) at
process.c:5201
#64 0x0104bd71 in wait_reading_process_output (time_limit=30,
microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=54700058,
wait_proc=0x0,
    just_wait_proc=0) at process.c:4844
#65 0x010f8826 in sit_for (timeout=120, reading=1, do_display=1) at
dispnew.c:6063
#66 0x0100923b in read_char (commandflag=1, nmaps=2, maps=0x88f980,
prev_event=54700058, used_mouse_menu=0x88fa58, end_time=0x0) at
keyboard.c:2690
#67 0x0101c25c in read_key_sequence (keybuf=0x88fbd4, bufsize=30,
prompt=54700058, dont_downcase_last=0, can_return_switch_frame=1,
    fix_current_buffer=1) at keyboard.c:9302
#68 0x01005c93 in command_loop_1 () at keyboard.c:1448
#69 0x01032beb in internal_condition_case (bfun=0x100569b
<command_loop_1>, handlers=54757786, hfun=0x1004eba <cmd_error>) at
eval.c:1500
#70 0x010052f7 in command_loop_2 (ignore=54700058) at keyboard.c:1159
#71 0x0103260e in internal_catch (tag=54755810, func=0x10052d3
<command_loop_2>, arg=54700058) at eval.c:1257
#72 0x010052b3 in command_loop () at keyboard.c:1138
#73 0x0100488f in recursive_edit_1 () at keyboard.c:758
#74 0x01004baa in Frecursive_edit () at keyboard.c:822
#75 0x010028b5 in main (argc=4, argv=0xc62ca8) at emacs.c:1715

Lisp Backtrace:
"set-window-buffer" (0x88aeb4)
"set-window-buffer-start-and-point" (0x88b1a4)
"byte-code" (0x88b404)
"switch-to-prev-buffer" (0x88b854)
"replace-buffer-in-windows" (0x88bb5c)
"kill-buffer" (0x88bcb8)
"server-unselect-display" (0x88bfb8)
0x362ff20 PVEC_COMPILED
"funcall" (0x88c2c0)
0x362f000 PVEC_COMPILED
"funcall" (0x88c7a0)
"server-execute" (0x88cc94)
0x362fa80 PVEC_COMPILED
0x362f440 PVEC_COMPILED
"funcall" (0x88d290)
"server-execute-continuation" (0x88d794)
0x3520bc0 PVEC_COMPILED
"funcall" (0x88dac0)
0x37302c0 PVEC_COMPILED
"funcall" (0x88df90)
"server-process-filter" (0x88e434)
(gdb) frame 0
#0  Fset_window_buffer (window=81516037, buffer_or_name=54738949,
keep_margins=54700058) at window.c:3069
3069      register struct window *w = decode_window (window);
(gdb) p buffer_or_name
$2 = 54738949
(gdb) pr
#<buffer *scratch*>
(gdb) frame 17
#17 0x010ab865 in Fkill_buffer (buffer_or_name=54700058) at buffer.c:1539
1539      replace_buffer_in_windows (buffer);
(gdb) p buffer_or_name
$3 = 54700058
(gdb) pr
nil
(gdb) frame 16
#16 0x011c019a in replace_buffer_in_windows (buffer=57495045) at window.c:2781
2781      call1 (Qreplace_buffer_in_windows, buffer);
(gdb) p buffer
$4 = 57495045
(gdb) pr
#<buffer bug.txt>
(gdb)





reply via email to

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