From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33690: 26.1; Wrong type argument: number-or-marker-p, nil in window-edges Date: Mon, 10 Dec 2018 09:01:13 +0200 Message-ID: <837egh3lxi.fsf@gnu.org> References: <871s6qe65n.fsf@informatimago.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1544425211 18268 195.159.176.226 (10 Dec 2018 07:00:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Dec 2018 07:00:11 +0000 (UTC) Cc: 33690@debbugs.gnu.org To: "Pascal J. Bourguignon" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 10 08:00:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gWFXy-0004d8-O2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Dec 2018 08:00:06 +0100 Original-Received: from localhost ([::1]:59454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWFa5-0007pg-28 for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Dec 2018 02:02:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWFZy-0007pU-Oe for bug-gnu-emacs@gnu.org; Mon, 10 Dec 2018 02:02:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gWFZu-0001x1-3X for bug-gnu-emacs@gnu.org; Mon, 10 Dec 2018 02:02:10 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36407) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gWFZq-0001vf-TJ for bug-gnu-emacs@gnu.org; Mon, 10 Dec 2018 02:02:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gWFZp-0006Lx-SS for bug-gnu-emacs@gnu.org; Mon, 10 Dec 2018 02:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Dec 2018 07:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33690 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33690-submit@debbugs.gnu.org id=B33690.154442530324393 (code B ref 33690); Mon, 10 Dec 2018 07:02:01 +0000 Original-Received: (at 33690) by debbugs.gnu.org; 10 Dec 2018 07:01:43 +0000 Original-Received: from localhost ([127.0.0.1]:40665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gWFZW-0006LL-9n for submit@debbugs.gnu.org; Mon, 10 Dec 2018 02:01:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gWFZU-0006L7-SW for 33690@debbugs.gnu.org; Mon, 10 Dec 2018 02:01:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gWFZL-0001gk-Be for 33690@debbugs.gnu.org; Mon, 10 Dec 2018 02:01:35 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWFZJ-0001eK-9x; Mon, 10 Dec 2018 02:01:31 -0500 Original-Received: from [176.228.60.248] (port=1877 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gWFZG-00029Y-8Q; Mon, 10 Dec 2018 02:01:28 -0500 In-reply-to: <871s6qe65n.fsf@informatimago.com> (pjb@informatimago.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:153295 Archived-At: > From: "Pascal J. Bourguignon" > Date: Sun, 09 Dec 2018 22:34:12 +0100 > > > Launching emacs in a terminal (DISPLAY=:0.0, but no X server running), > including my .emacs, I get > Wrong type argument: number-or-marker-p, nil in window-edges > errors on C-n and C-p. > The error come from window-edges. > > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) > window-edges(nil t nil t) > window-inside-pixel-edges() > window-screen-lines() > line-move-partial(1 nil) > line-move(1 nil nil 1) > next-line(1 1) > funcall-interactively(next-line 1 1) > call-interactively(next-line nil nil) > command-execute(next-line) > > Running with a window-edges not compiled, we find that the problem is > that border-width is nil. I would therefore suggest to patch > window-edges, to use 0 when frame-internal-border-width returns nil > (which occurs when running in a terminal): I don't understand. The definition of frame-internal-border-width is this: DEFUN ("frame-internal-border-width", Fframe_internal_border_width, Sframe_internal_border_width, 0, 1, 0, doc: /* Return width of FRAME's internal border in pixels. */) (Lisp_Object frame) { return make_number (FRAME_INTERNAL_BORDER_WIDTH (decode_any_frame (frame))); } This can only return numbers, never nil, even when we are on a text terminal. Are you sure you don't override this definition with some local code? Thanks.