From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Trunk emacs infelicity with linum mode Date: Sun, 07 Sep 2014 18:24:18 +0300 Message-ID: <83ha0jcv31.fsf@gnu.org> 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> <87lhpxaopi.fsf@glaurung.internal.golden-gryphon.com> <83vbp1deta.fsf@gnu.org> <540ACB6A.5020402@gmx.at> <540AED8A.9030000@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1410103491 30540 80.91.229.3 (7 Sep 2014 15:24:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Sep 2014 15:24:51 +0000 (UTC) Cc: srivasta@ieee.org, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 07 17:24:39 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 1XQeKU-0003Wq-0f for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2014 17:24:38 +0200 Original-Received: from localhost ([::1]:38496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQeKT-0008NI-Cz for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2014 11:24:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQeKC-0008ND-EH for emacs-devel@gnu.org; Sun, 07 Sep 2014 11:24:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQeK7-0006SA-9M for emacs-devel@gnu.org; Sun, 07 Sep 2014 11:24:20 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:53955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQeK7-0006J8-0I for emacs-devel@gnu.org; Sun, 07 Sep 2014 11:24:15 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NBJ00600ER1P700@mtaout29.012.net.il> for emacs-devel@gnu.org; Sun, 07 Sep 2014 18:24:00 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NBJ003B5ES0AD30@mtaout29.012.net.il>; Sun, 07 Sep 2014 18:24:00 +0300 (IDT) In-reply-to: <540AED8A.9030000@gmx.at> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 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:174065 Archived-At: > Date: Sat, 06 Sep 2014 13:18:34 +0200 > From: martin rudalics > Cc: emacs-devel@gnu.org > > From the frame creation code everything is normal AFAICT. The problem > is with `linum--face-height' added on 2014-07-08 to the linum.el code: > > (defun linum--face-height (face) > (aref (font-info (face-font face)) 2)) > > ... > > (when (display-graphic-p) > (setq width (ceiling > ;; We'd really want to check the widths rather than the > ;; heights, but it's a start. > (/ (* width 1.0 (linum--face-height 'linum)) > (frame-char-height))))) > > If you take these out, the frame is created as usual. Yes, but how does that help us resolve this problem? There's nothing wrong in general with calling face-font, so linum-mode doesn't do anything blatantly incorrect here. It's just that this function is called "too early" in the frame creation process. How about adding some simple flag that would avoid calling window-configuration-change-hook when adjust_frame_size is called from x-create-frame?