Thanks! Now all the recipes in this thread doesn't trigger the problem. However, I still encountered it when using Emacs with my own config. It's basically the same as the show-paren-mode recipe here. I'm doing this with show-paren-mode: ``` (define-advice show-paren-function (:around (fn) fix) "Highlight enclosing parens when point is inside them." ;; Hack. `show-paren-function' checks the value of `show-paren-mode', but ;; we don't want to use `show-paren-mode'. (let ((show-paren-mode t)) (if (looking-at-p (rx (* white) (syntax open-parenthesis))) (funcall fn) (save-excursion (ignore-errors (backward-up-list)) (funcall fn))))) (setq show-paren-when-point-in-periphery t show-paren-when-point-inside-paren t) (add-hook 'post-command-hook #'show-paren-function) ``` I'm in paren.el, point 11567. Another window is in the same file, point 11524. They are a pair of parens: ``` (overlay-put show-paren--overlay 'face face)))))) ^11524 ^11567 ``` When I press Ctrl+f+g+b, the point jumps back to 11524. Here's the backtrace: ``` Thread 1 "emacs" hit Breakpoint 1, signal_or_quit (error_symbol=..., data=..., keyboard_quit=false) at eval.c:1793 1793 { #0 signal_or_quit (error_symbol=..., data=..., keyboard_quit=false) at eval.c:1793 #1 0x000056215e7d87ad in quit () at eval.c:1783 #2 0x000056215e7d868b in process_quit_flag () at eval.c:1730 #3 0x000056215e7d86d7 in maybe_quit () at eval.c:1750 #4 0x000056215e7eae6f in Fdelq (elt=..., list=...) at fns.c:1841 #5 0x000056215e7fbb95 in font_put_extra (font=..., prop=..., val=...) at font.c:745 #6 0x000056215e8042a5 in font_clear_prop (attrs=0x7ffd696120e0, prop=FONT_SLANT_INDEX) at font.c:3114 #7 0x000056215e683b71 in merge_face_vectors (w=0x562161abb2c8, f=0x562160c3ca78, from=0x7ffd69611cb0, to=0x7ffd696120e0, named_merge_points=0x7ffd69611c90) at xfaces.c:2234 #8 0x000056215e6841fb in merge_named_face (w=0x562161abb2c8, f=0x562160c3ca78, face_name=..., to=0x7ffd696120e0, named_merge_points=0x7ffd69611c90, attr_filter=0) at xfaces.c:2350 #9 0x000056215e685b4e in merge_face_ref (w=0x562161abb2c8, f=0x562160c3ca78, face_ref=..., to=0x7ffd696120e0, err_msgs=true, named_merge_points=0x0, attr_filter=0) at xfaces.c:2834 #10 0x000056215e6908b2 in face_at_buffer_position (w=0x562161abb2c8, pos=11394, endptr=0x7ffd696121e0, limit=11494, mouse=false, base_face_id=0, attr_filter=0) at xfaces.c:6441 #11 0x000056215e583e8e in face_at_pos (it=0x7ffd69613900, attr_filter=0) at xdisp.c:4379 #12 0x000056215e584177 in handle_face_prop (it=0x7ffd69613900) at xdisp.c:4475 #13 0x000056215e582423 in handle_stop (it=0x7ffd69613900) at xdisp.c:3854 #14 0x000056215e592956 in next_element_from_buffer (it=0x7ffd69613900) at xdisp.c:8905 #15 0x000056215e58ea69 in get_next_display_element (it=0x7ffd69613900) at xdisp.c:7494 #16 0x000056215e5c590d in display_line (it=0x7ffd69613900, cursor_vpos=17) at xdisp.c:23588 #17 0x000056215e5b5c7e in try_window (window=..., pos=..., flags=1) at xdisp.c:19499 #18 0x000056215e5b2859 in redisplay_window (window=..., just_this_one_p=false) at xdisp.c:18906 #19 0x000056215e5a9aea in redisplay_window_0 (window=...) at xdisp.c:16617 #20 0x000056215e7d7e52 in internal_condition_case_1 (bfun=0x56215e5a9aa4 , arg=..., handlers=..., hfun=0x56215e5a9a68 ) at eval.c:1502 #21 0x000056215e5a9a39 in redisplay_windows (window=...) at xdisp.c:16597 #22 0x000056215e5a99eb in redisplay_windows (window=...) at xdisp.c:16591 #23 0x000056215e5a836d in redisplay_internal () at xdisp.c:16065 #24 0x000056215e5a5d0e in redisplay () at xdisp.c:15281 #25 0x000056215e6f7707 in read_char (commandflag=1, map=..., prev_event=..., used_mouse_menu=0x7ffd69618ccd, end_time=0x0) at keyboard.c:2539 #26 0x000056215e70b119 in read_key_sequence (keybuf=0x7ffd69618eb0, prompt=..., dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9569 #27 0x000056215e6f3958 in command_loop_1 () at keyboard.c:1376 #28 0x000056215e7d7d6f in internal_condition_case (bfun=0x56215e6f34ba , handlers=..., hfun=0x56215e6f2906 ) at eval.c:1478 #29 0x000056215e6f307b in command_loop_2 (handlers=...) at keyboard.c:1117 #30 0x000056215e7d6e66 in internal_catch (tag=..., func=0x56215e6f3050 , arg=...) at eval.c:1198 #31 0x000056215e6f301b in command_loop () at keyboard.c:1095 #32 0x000056215e6f23b1 in recursive_edit_1 () at keyboard.c:720 #33 0x000056215e6f25cd in Frecursive_edit () at keyboard.c:792 #34 0x000056215e6ee179 in main (argc=1, argv=0x7ffd69619338) at emacs.c:2310 $21 = 11524 ``` Eli Zaretskii 于2021年8月17日周二 上午3:09写道: > > From: Amai Kinono > > Date: Tue, 17 Aug 2021 02:28:45 +0800 > > Cc: 44448@debbugs.gnu.org > > > > Thanks for your help. I've got a backtrace when the bug happens ;) > > > > (The story is, there must be some problems of the developing toolchain > on my > > distro (tested on 2 PCs running it), so I burn a new ubuntu live CD and > built & > > debugged Emacs on it, works like a charm.) > > > > The backtrace: > > > > --- > > > > Thread 1 "emacs" hit Breakpoint 3, signal_or_quit > (error_symbol=XIL(0x555555e9b520), data=XIL(0xbee0), > > keyboard_quit=false) at eval.c:1793 > > 1793 { > > #0 signal_or_quit (error_symbol=XIL(0x555555e9b520), data=XIL(0xbee0), > keyboard_quit=false) at > > eval.c:1793 > > #1 0x000055555582d7ad in quit () at eval.c:1783 > > #2 0x000055555582d68b in process_quit_flag () at eval.c:1730 > > #3 0x000055555582d6d7 in maybe_quit () at eval.c:1750 > > #4 0x0000555555839e4a in list_length (list=XIL(0)) at fns.c:150 > > #5 0x000055555590036e in get_logical_fringe_bitmap (w=0x5555567d5870, > bitmap=XIL(0xe430), > > right_p=1, partial_p=0) at fringe.c:746 > > #6 0x0000555555903a0b in update_window_fringes (w=0x5555567d5870, > keep_current_p=true) at > > fringe.c:1248 > > #7 0x000055555560a033 in redisplay_window (window=XIL(0x5555567d5875), > just_this_one_p=false) at > > xdisp.c:19401 > > Thanks, I installed a fix. >