From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#18136: 24.4.50; crash in redisplay when calling load-theme Date: Thu, 31 Jul 2014 18:53:33 +0200 Message-ID: <53DA748D.4010201@gmx.at> References: <87d2cpxaq1.fsf@holos.localdomain> <8338dkh6wo.fsf@gnu.org> <53D77B06.8040907@gmx.at> <83tx60fjnh.fsf@gnu.org> <53D7A965.30700@gmx.at> <83mwbste5o.fsf@gnu.org> <53D7C0C4.7070406@gmx.at> <83iomgt9d2.fsf@gnu.org> <53D7E6B6.6070007@gmx.at> <83fvhkt3wm.fsf@gnu.org> <53D9210E.2030800@gmx.at> <8361ieu5nr.fsf@gnu.org> <53D92D00.7070600@gmx.at> <831tt2u428.fsf@gnu.org> <53DA0307.6040004@gmx.at> <83oaw5ssuf.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1406825669 7676 80.91.229.3 (31 Jul 2014 16:54:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Jul 2014 16:54:29 +0000 (UTC) Cc: mvoteiza@udel.edu, 18136@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 31 18:54:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XCtcT-0004yH-2Y for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Jul 2014 18:54:21 +0200 Original-Received: from localhost ([::1]:57826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCtcS-000778-Jg for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Jul 2014 12:54:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCtcI-00072y-Gk for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2014 12:54:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCtcA-0003vW-S4 for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2014 12:54:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCtcA-0003vH-Ne for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2014 12:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XCtcA-00012B-6i for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2014 12:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Jul 2014 16:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18136 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18136-submit@debbugs.gnu.org id=B18136.14068256373964 (code B ref 18136); Thu, 31 Jul 2014 16:54:02 +0000 Original-Received: (at 18136) by debbugs.gnu.org; 31 Jul 2014 16:53:57 +0000 Original-Received: from localhost ([127.0.0.1]:53193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XCtc4-00011r-GF for submit@debbugs.gnu.org; Thu, 31 Jul 2014 12:53:57 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:57874) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XCtc1-00011Z-KO for 18136@debbugs.gnu.org; Thu, 31 Jul 2014 12:53:54 -0400 Original-Received: from [188.22.37.103] ([188.22.37.103]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0M7DVi-1WIIZl2zf4-00x3aL; Thu, 31 Jul 2014 18:53:43 +0200 In-Reply-To: <83oaw5ssuf.fsf@gnu.org> X-Provags-ID: V03:K0:Ykx0a/OWjLKt41mrHcHgg6DKcPtMu5Aq1muWL5Ub67jJrtY4EdD cS6KYRUZbH2NR9iO6IbH5NLzWQPFT1r5rjDufiF5tFCpUpkL8gqE10GTZzdbY+aIIXKQeH7 5tuMGNiAOjeYR3KMT2jtFCub0SbIDmmKf+H3OL7W75Cvm+xcSHdThXg8kMk81NEzpKt0r1O f4DMi1syN1tL7qWYoXk9A== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92007 Archived-At: >> But I don't really understand about `set-frame-height' and friends on a >> TTY and what they are supposed to do. Should these be allowed to change >> the frame size? > > Yes. In the sense that the frame can get larger or smaller than the terminal window? So we internally work with say 100 frame lines although the terminal can display only 80? Or am I missing something? >> Now about the >> >> change_frame_size (XFRAME (selected_frame), >> FrameCols (t->display_info.tty), >> FrameRows (t->display_info.tty) >> - FRAME_MENU_BAR_LINES (f), 0, 0, 1, 0); >> >> call in init_display. What precisely is this supposed to accomplish? > > Allocate the glyph matrices, at the very least, I guess. OK. BTW doesn't adjust_frame_glyphs_for_frame_redisplay count the menubar specially? What is top_window_y = FRAME_TOP_MARGIN (f); for? >> Back to init_display and the question I asked earlier: Why should the >> subsequent adjust_frame_size call do >> >> if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) >> FrameRows (FRAME_TTY (f)) = new_lines; >> >> here? > > Maybe it shouldn't, when called from init_display. But we should at > least leave an eassert there, in case we overlook something. Can I call adjust_frame_size directly from init_display? IIUC FrameRows is the height of the terminal window and when I change the height of that window I want to change the height of the Emacs frame as well via handle_window_change_signal/change_frame_size. This means I can set FrameCols where I do it now because whenever I change the size of the outer frame that of the frame's windows changes too. Still it seems to me contrived to set FrameCols/FrameRows when adjusting the sizes of a frame's windows. And setting FrameCols when called from init_display is certainly not TRT IMHO. > In any case, this begs the question: why do you at all call > adjust_frame_size in this case, if the frame already has the required > size? I think the answer is that adjust_frame_size does something > else: it calls adjust_frame_glyphs. That call is required at > init_display time for obvious reasons, but it is inside > adjust_frame_size which is only called when the frame size changes, > which sounds like a contradiction in the design. Think of turning off/on the menubar of a maximized frame. In this case I do not change the size of the frame either. Yet I have to call adjust_frame_glyphs. BTW in an earlier mail you said that > E.g., with your suggested semantics, what would you expect from this: > > emacs -Q > M-: (frame-height) RET > M-x menu-bar-mode RET > M-: (frame-height) RET > > Would you expect to see the 2 results of frame-height identical or > different? > > The current trunk displays 2 identical results, and actually resizes > the root window to be consistent with that, so that there's an unused > empty line below the echo area. Is that intended? It looks like a > misfeature to me. Where and how did you get that? I can't reproduce it here. >> Now please tell me one thing: Which calls of change_frame_size or >> adjust_frame_size _should_ set FrameRows or FrameCols > > Any calls that actually change the frame size. Is turning off/on the TTY menubar one of them? I think not. Yet we set FrameCols. Wouldn't it be principally cleaner if we set FrameCols and FrameRows after calling get_tty_size only? martin