all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dmantipov@yandex.ru, emacs-devel@gnu.org
Subject: Re: Menus with more items than the TTY can display
Date: Thu, 17 Oct 2013 11:28:47 +0200	[thread overview]
Message-ID: <525FADCF.5010700@gmx.at> (raw)
In-Reply-To: <83y55tnii4.fsf@gnu.org>

 > How about putting a breakpoint in resize_mini_window, and reporting
 > the backtrace (including Lisp backtrace) when it breaks?

This should work but fails for some reason I can't explain.  Recall my
earlier observation that the behavior does _not_ occur when I set
`resize-mini-windows' to nil.  So I'd just have to check where this
variable's settings may affect the course of events and I will have
found the culprit.  I see few such places:

- The one in xdisp.c's resize_mini_window around line 10450 where we
   return immediately when this variable is nil.

- The ones in window.el.  All these seem to go through
   `window--resize-mini-window' which ends up in calling
   `resize-mini-window-internal'.  Putting a breakpoint there gets me no
   hits.  So I exclude this.

- The one in `display-message-or-buffer' should be caught in
   resize_mini_window IIUC.  Excluded as well.

This means that resize_mini_window is indeed the only candidate and I
put a breakpoint there at if (!FRAME_MINIBUF_ONLY_P (f)).

Now to reproduce the behavior, I start emacs in the terminal, remove the
terminal's menu to be able to pass F10 to emacs, attach gdb to the
terminal's emacs, provoke an end of buffer message in the terminal to
verify that the breakpoint is reached at all, hit F10 in the terminal
and scroll the menu.  Now from the time I hit F10 until I hit it again
the breakpoint is _not_ reached.  The following is an IMO meaningless
backtrace after hitting F10 the second time:


#0  resize_mini_window (w=0xd12f28, exact_p=0) at xdisp.c:10465
#1  0x00000000004502c8 in display_echo_area_1 (a1=13709096, a2=13619698) at xdisp.c:10357
#2  0x000000000044f998 in with_echo_area_buffer (w=0xd12f28, which=0, fn=0x450290 <display_echo_area_1>, a1=13709096, a2=13619698) at xdisp.c:10147
#3  0x0000000000450258 in display_echo_area (w=0xd12f28) at xdisp.c:10327
#4  0x000000000045163b in echo_area_display (update_frame_p=0) at xdisp.c:10831
#5  0x0000000000454bfa in redisplay_internal () at xdisp.c:13103
#6  0x000000000045380d in redisplay () at xdisp.c:12699
#7  0x0000000000550163 in read_char (commandflag=1, map=13594294, prev_event=13619698, used_mouse_menu=0x7fffc22d17ef, end_time=0x0) at keyboard.c:2573
#8  0x000000000055e9a8 in read_key_sequence (keybuf=0x7fffc22d19d0, bufsize=30, prompt=13619698, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9115
#9  0x000000000054d114 in command_loop_1 () at keyboard.c:1431
#10 0x00000000005eb38b in internal_condition_case (bfun=0x54cd21 <command_loop_1>, handlers=13679474, hfun=0x54c4f8 <cmd_error>) at eval.c:1331
#11 0x000000000054c9a4 in command_loop_2 (ignore=13619698) at keyboard.c:1158
#12 0x00000000005ea804 in internal_catch (tag=13675202, func=0x54c97e <command_loop_2>, arg=13619698) at eval.c:1097
#13 0x000000000054c954 in command_loop () at keyboard.c:1137
#14 0x000000000054c003 in recursive_edit_1 () at keyboard.c:776
#15 0x000000000054c1e8 in Frecursive_edit () at keyboard.c:840
#16 0x000000000054a178 in main (argc=3, argv=0x7fffc22d1e78) at emacs.c:1577

Lisp Backtrace:
"redisplay_internal (C function)" (0xcee798)


So this is a complete mystery to me.  Is it possible that toggling F10
suppresses any signals from the terminal to the debugger?

martin




  reply	other threads:[~2013-10-17  9:28 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 11:28 Menus with more items than the TTY can display Eli Zaretskii
2013-10-11 11:40 ` Dmitry Antipov
2013-10-11 14:43   ` Eli Zaretskii
2013-10-11 17:06     ` chad
2013-10-11 17:48       ` Eli Zaretskii
2013-10-14 15:38     ` Eli Zaretskii
2013-10-15 18:28       ` martin rudalics
2013-10-15 19:04         ` Eli Zaretskii
2013-10-16  7:44           ` martin rudalics
2013-10-16 15:19             ` Eli Zaretskii
2013-10-16 17:45               ` martin rudalics
2013-10-16 18:15                 ` Eli Zaretskii
2013-10-16 18:34                   ` martin rudalics
2013-10-16 18:59                     ` Eli Zaretskii
2013-10-17  9:27                       ` martin rudalics
2013-10-17 16:21                         ` Eli Zaretskii
2013-10-17 17:11                           ` martin rudalics
2013-10-17 17:41                             ` Eli Zaretskii
2013-10-17 18:01                               ` martin rudalics
2013-10-17 18:08                                 ` chad
2013-10-18  7:54                                   ` martin rudalics
2013-10-17 20:04                                 ` Eli Zaretskii
2013-10-18  7:54                               ` martin rudalics
2013-10-17 22:52                             ` Xue Fuqiao
2013-10-18  7:02                               ` Eli Zaretskii
2013-10-18  7:59                                 ` martin rudalics
2013-10-18 22:59                                 ` Xue Fuqiao
2013-10-19  7:43                                   ` Eli Zaretskii
2013-10-19 22:51                                     ` Xue Fuqiao
2013-10-20  2:44                                       ` Eli Zaretskii
2013-10-18  7:56                               ` martin rudalics
2013-10-18  9:51                                 ` Eli Zaretskii
2013-10-16 19:05                     ` Eli Zaretskii
2013-10-17  9:28                       ` martin rudalics [this message]
2013-10-17 16:38                         ` Eli Zaretskii
2013-10-17 17:13                           ` martin rudalics
2013-10-17 17:45                             ` Eli Zaretskii
2013-10-17 18:01                               ` martin rudalics
2013-10-17 20:06                                 ` Eli Zaretskii
2013-10-17 20:25                                   ` Eli Zaretskii
2013-10-18  7:55                                     ` martin rudalics
2013-10-18  9:32                                       ` Eli Zaretskii
2013-10-18 14:35                                         ` martin rudalics
2013-10-18 15:30                                           ` Eli Zaretskii
2013-10-18 19:17                                             ` Eli Zaretskii
2013-10-19 10:38                                               ` martin rudalics
2013-10-19 11:54                                                 ` Eli Zaretskii
2013-10-19 13:57                                                   ` martin rudalics
2013-10-19 14:57                                                     ` Eli Zaretskii
2013-10-19 16:23                                                       ` Eli Zaretskii
2013-10-19 18:36                                                         ` martin rudalics
2013-10-19 19:15                                                           ` Eli Zaretskii
2013-10-20 10:20                                                             ` martin rudalics
2013-10-20 16:38                                                               ` Eli Zaretskii
2013-10-20 18:41                                                                 ` martin rudalics
2013-10-20 19:16                                                                   ` Eli Zaretskii
2013-10-19 18:36                                                       ` martin rudalics
2013-10-19 19:14                                                         ` Eli Zaretskii
2013-10-20 10:19                                                           ` martin rudalics
2013-10-20 16:19                                                             ` Eli Zaretskii
2013-10-20 18:41                                                               ` martin rudalics
2013-10-20 19:27                                                                 ` Eli Zaretskii
2013-10-21  7:19                                                                   ` martin rudalics
2013-10-21 16:42                                                                     ` Eli Zaretskii
2013-10-21 17:34                                                                       ` martin rudalics
2013-10-21 18:17                                                                         ` Eli Zaretskii
2013-10-18  7:55                                   ` martin rudalics
2013-10-18  9:50                                     ` Eli Zaretskii
2013-10-18 14:36                                       ` martin rudalics
2013-10-18  8:36                             ` Eli Zaretskii
2013-10-18 14:35                               ` martin rudalics
2013-10-11 11:41 ` Dani Moncayo
2013-10-11 12:07   ` Dmitry Antipov
2013-10-11 14:44     ` Eli Zaretskii
2013-10-11 17:49     ` Stefan Monnier
2013-10-11 18:00       ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=525FADCF.5010700@gmx.at \
    --to=rudalics@gmx.at \
    --cc=dmantipov@yandex.ru \
    --cc=eliz@gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.