From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: byte-code: Wrong type argument: number-or-marker-p, (+ -21) Date: Fri, 14 Nov 2003 23:47:21 +0100 (MET) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200311142330.hAENUB5p021655@stubby.bodenonline.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1068850581 878 80.91.224.253 (14 Nov 2003 22:56:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Nov 2003 22:56:21 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Nov 14 23:56:18 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AKmrS-0005fL-00 for ; Fri, 14 Nov 2003 23:56:18 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AKmrS-0007rs-00 for ; Fri, 14 Nov 2003 23:56:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AKnlS-0006BI-TY for emacs-devel@quimby.gnus.org; Fri, 14 Nov 2003 18:54:10 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AKnhW-0004Ru-HR for emacs-devel@gnu.org; Fri, 14 Nov 2003 18:50:06 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AKngy-0004Cb-VP for emacs-devel@gnu.org; Fri, 14 Nov 2003 18:50:05 -0500 Original-Received: from [193.201.16.94] (helo=stubby.bodenonline.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AKngS-00042o-Fn; Fri, 14 Nov 2003 18:49:00 -0500 Original-Received: from accessno42.bodenonline.com (accessno42.bodenonline.com [193.201.16.44]) by stubby.bodenonline.com (8.12.1/8.12.1) with ESMTP id hAENUB5p021655; Sat, 15 Nov 2003 00:30:11 +0100 In-Reply-To: "from Jan Nieuwenhuizen at Nov 12, 2003 04:33:14 pm" Original-To: Jan Nieuwenhuizen X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17829 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17829 > > I want to start my emacs with geometry 80x[full-screen-height], with > menu-bar and tool-bar disabled. > ... > > Then, starting emacs as: > > emacs --geometry 80x100+0-0& # too tall for my screen, but ok for testing > > prints this error: > > byte-code: Wrong type argument: number-or-marker-p, (+ -520) > > After hitting this error emacs exhibits some seemingly unrelated > problems, such as gud not syncing the src window. > > Running with --debug-init does not help, adding (setq debug-on-error > t) to ~/.emacs.el yields: > > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p (+ -21)) > frame-notice-user-settings() > command-line-1(("80x100+0-0")) > command-line() > normal-top-level() > > however, there is no call to number-or-marker-p in > frame-notice-user-settings. I'm confused. These lines in frame-notice-user-settings triggers the error: (let* ... (top (frame-parameter frame-initial-frame 'top))) (when (and (consp initial-top) (eq '- (car initial-top))) (setq newparms (append newparms `((top . ,(+ top (* lines char-height)))) nil))) When the top of the frame is over the top of the display (i.e. y is negative), frame-parameter returns a strange value (evaluated in *scratch*): (frame-parameter (selected-frame) 'top) (+ -21) Ditto for left. This is because of this code in x_report_frame_params: /* Represent negative positions (off the top or left screen edge) in a way that Fmodify_frame_parameters will understand correctly. */ XSETINT (tem, f->left_pos); if (f->left_pos >= 0) store_in_alist (alistptr, Qleft, tem); else store_in_alist (alistptr, Qleft, Fcons (Qplus, Fcons (tem, Qnil))); It has been like this a long time (21.2 at least). Someone better in lisp than me can probably fix frame-notice-user-settings so it works ok. My initial attempt (if (consp top) (car (cdr top)) top) leads to a serious miscalculation of the top position with your geometry parameter, the whole frame is over the top. The bottom of the frame should be on the bottom of the screen. Jan D.