Subject: RE: bug#1077: 23.0.60;x-create-frame: (wrong-type-argument number-or-marker-p nil)

From: "Drew Adams" <[email-masked]>
Date: Sat, 4 Oct 2008 09:38:20 -0700

No, I take back my guess about `visibility'. Just evaluating

(x-create-frame ((visibility) (width . 100) (width . 80) (height . 14)
(menu-bar-lines . 1) (top . 0) (left . 0) (unsplittable . t) (user-position . t)
(vertical-scroll-bars . right) (height . 14) (width . 80) (unsplittable . t)))

does not necessarily lead to the bug (error).

Something is happening inside `x-create-frame' -
for some reason, it tries to do (> nil 0).

> From: Drew Adams Sent: Friday, October 03, 2008 10:23 AM
> 
> My guess is that the error is coming from a `visibility' 
> value of nil. And `visibility' should probably not be nil anyway
> here - the frame should be displayed visibly, presumably. There is
> no `visibility' parameter value given to `x-create-frame-with-faces',
> so it must be coming up with that on its own when it calls
> `x-create-frame'.
>  
> Debugger entered--Lisp error: (wrong-type-argument 
> number-or-marker-p nil)
>   >(nil 0)
>   x-create-frame(((visibility) (width . 100) (width . 80) (height
>   . 14) (menu-bar-lines . 1) (top . 0) (left . 0) (unsplittable . t)
>   (user-position . t) (vertical-scroll-bars . right) (height . 14)
>   (width . 80) (unsplittable . t))) 
>   x-create-frame-with-faces(((background-color . "LavenderBlush2")
>   (mouse-color . "VioletRed") (cursor-color . "VioletRed") (width
>   . 100) (font . "-*-Lucida 
> Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1")
>   (width . 80)
>   (height . 14) (mouse-color . "Yellow") (cursor-color . "Yellow")
>   (menu-bar-lines . 1) (foreground-color . "Black") (background-color
>   . "LightSteelBlue") (top . 0) (left . 0) (unsplittable . t)
>   (user-position . t) (vertical-scroll-bars . right) (height . 14)
>   (width . 80) (unsplittable . t))) 
>   make-frame(((background-color . "LavenderBlush2") (mouse-color
>   . "VioletRed") (cursor-color . "VioletRed") (width . 100) (font
>   . "-*-Lucida Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1")
>   (width . 80) (height . 14) (mouse-color . "Yellow") (cursor-color
>   . "Yellow") (menu-bar-lines . 1) (foreground-color . "Black")
>   (background-color . "LightSteelBlue") (top . 0) (left . 0)
>   (unsplittable . t) (user-position . t) (vertical-scroll-bars
>   . right) (height . 14) (width . 80) (unsplittable . t))) 
>   special-display-popup-frame(#<buffer *Completions*>
>   ((background-color . "LavenderBlush2") (mouse-color . "VioletRed")
>   (cursor-color . "VioletRed") (width . 100))) 
>   1on1-display-*Completions*-frame(#<buffer *Completions*>
>   ((background-color . "LavenderBlush2") (mouse-color . "VioletRed")
>   (cursor-color . "VioletRed") (width . 100))) 
>   apply(1on1-display-*Completions*-frame #<buffer *Completions*>
>   ((background-color . "LavenderBlush2") (mouse-color . "VioletRed")
>   (cursor-color . "VioletRed") (width . 100))) 
>   special-display-popup-frame(#<buffer *Completions*>
>   (1on1-display-*Completions*-frame ((background-color
>   . "LavenderBlush2") (mouse-color . "VioletRed") (cursor-color
>   . "VioletRed") (width . 100)))) 
>   old-display-buffer(#<buffer *Completions*> nil nil)
>   display-buffer(#<buffer *Completions*> nil nil)
>   (with-output-to-temp-buffer "*Completions*" (let* (... ...) (when
>   last ...) (display-completion-list ...))) 
>   (if (and completions (or ... ...)) (with-output-to-temp-buffer
>   "*Completions*" (let* ... ... ...)) (let (...) (when ... ...))
>   (ding) (minibuffer-message (if completions "Sole completion" "No
>   completions"))) 
>   (let* ((string ...) (completions ...)) (message nil) (if (and
>   completions ...) (with-output-to-temp-buffer "*Completions*" ...)
>   (let ... ...) (ding) (minibuffer-message ...)) nil) 
>   minibuffer-completion-help()
>   (if (case completion-auto-help (lazy ...) (t completion-auto-help))
>   (minibuffer-completion-help) (minibuffer-message "Next char not
>   unique")) 
>   (cond ((not exact) (if ... ... ...)) ((eq this-command last-command)
>   (if completion-auto-help ...))) 
>   (if completed nil (cond (... ...) (... ...)))
>   (unless completed (cond (... ...) (... ...)))
>   (let ((exact ...)) (unless completed (cond ... ...))
>   (minibuffer--bitset completed t exact)) 
>   (if (not (or unchanged completed)) (completion--do-completion
>   try-completion-function) (let (...) (unless completed ...)
>   (minibuffer--bitset completed t exact))) 
>   (let* ((comp-pos ...) (completion ...) (completed ...) (unchanged
>   ...)) (unless unchanged (goto-char end) (insert completion)
>   (delete-region beg end)) (goto-char (+ beg comp-pos)) (if (not ...)
>   (completion--do-completion try-completion-function) (let
>   ... ... ...))) 
>   (cond ((null comp) (ding) (minibuffer-message "No match")
>   (minibuffer--bitset nil nil nil)) ((eq t comp) (minibuffer--bitset
>   nil nil t)) (t (let* ... ... ... ...))) 
>   (let* ((beg ...) (end ...) (string ...) (comp ...)) (cond
>   (... ... ... ...) (... ...) (t ...))) 
>   completion--do-completion()
>   (let ((--cl-var-- ...)) (cond (... nil) (... ... ... t)
>   (... ... ... t) (t t))) 
>   (case (completion--do-completion) (0 nil) (1 (goto-char ...)
>   (minibuffer-message "Sole completion") t) (3 (goto-char ...)
>   (minibuffer-message "Complete, but not unique") t) (t t)) 
>   (if (window-live-p window) (with-current-buffer (window-buffer
>   window) (if ... ... ...) nil) (case (completion--do-completion) (0
>   nil) (1 ... ... t) (3 ... ... t) (t t))) 
>   (let ((window minibuffer-scroll-window)) (if (window-live-p window)
>   (with-current-buffer ... ... nil) (case ... ... ... ... ...))) 
>   minibuffer-complete()
>   (unwind-protect (minibuffer-complete) (delete-overlay ol))
>   (let ((ol ...)) (unwind-protect (minibuffer-complete)
>   (delete-overlay ol))) 
>   crm-complete()
>   call-interactively(crm-complete nil nil)
>   read-from-minibuffer("Friends: " nil (keymap (remap keymap
>   (minibuffer-completion-help . crm-completion-help)
>   (minibuffer-complete-word . crm-complete-word) (minibuffer-complete
>   . crm-complete) keymap (mouse-yank-secondary) (yank-pop)
>   (transpose-sexps) (transpose-words) (transpose-chars)
>   (reposition-window) (kill-line) (kill-paragraph)
>   (backward-kill-paragraph) (backward-kill-sentence) (kill-sexp)
>   (backward-kill-sexp) (kill-word) (backward-kill-word) (delete-char)
>   (delete-backward-char) (backward-delete-char-untabify)
>   (digit-argument) (negative-argument) (universal-argument)
>   (self-insert-command)) keymap (24 keymap (124) (119)) (33554464)
>   (33554433) (30) (67108923) (67108899) (67108910) (67108927)
>   (67108900) (67108924) (67108960) (67108908) (67108922) (67108901)
>   (67108987) (67108989) (67108905) (67108904) (67108926) (67108906)
>   (67108907) (67108909) (67108990) (33554444) (12) (insert) (C-insert)
>   (C-pause) (M-pause) (67108988) (67108897) (C-return) (23) (S-delete)
>   (delete) (C-S-next) (C-S-prior) (C-S-down) (C-S-up) (C-S-return)
>   (M-return) (C-M-return) (C-M-f1) (C-f1) (C-M-help) (C-help)
>   (C-M-next) ...) nil nil nil nil) 
>   (let* ((minibuffer-completion-table ...)
>   (minibuffer-completion-predicate predicate)
>   (minibuffer-completion-confirm ...) (crm-completion-table table)
>   (map ...) (input ...)) (and def (string-equal input "") (setq input
>   def)) (split-string input crm-separator)) 
>   completing-read-multiple("Friends: " ("Luke " David "Robert"))
>   eval((completing-read-multiple "Friends: " (quote ("Luke " David
>   "Robert")))) 
>   pp-eval-expression((completing-read-multiple "Friends: " (quote
>   ("Luke " David "Robert")))) 
>   pp-eval-last-sexp(nil)
>   call-interactively(pp-eval-last-sexp nil nil)
> 
> This is my value of `special-display-buffer-names':
>  
> (("*Completions*" 1on1-display-*Completions*-frame
>   ((background-color . "LavenderBlush2")
>    (mouse-color . "VioletRed")
>    (cursor-color . "VioletRed")
>    (width . 100)))
>  ("*Help*" 1on1-display-*Help*-frame
>   ((background-color . "Thistle")
>    (mouse-color . "Blue Violet")
>    (cursor-color . "Blue Violet")
>    (height . 40))))
>  
> And this is `1on1-display-*Completions*-frame':
>  
> (defun 1on1-display-*Completions*-frame (buf &optional args)
>   "Display *Completions* buffer in its own frame.
> `special-display-function' is used to do the actual displaying.
> Completion input events are redirected to `1on1-minibuffer-frame'.
> BUF and ARGS are the arguments to `special-display-function'."
>   (let ((old-ptr-shape x-pointer-shape)
>         return-window)
>     (when (and 1on1-*Completions*-frame-flag
>                (boundp 'x-pointer-box-spiral))
>       (setq x-pointer-shape x-pointer-box-spiral))
>     (setq return-window
>           (select-window
>            (funcall special-display-function buf args)))
>     (when (fboundp 'zoom-frm-out)
>       (condition-case nil
>           (progn (zoom-frm-out) (zoom-frm-out))
>         (error nil)))
>     
>     ;; We reposition frame this way, instead of binding
>     ;; `special-display-frame-alist' with this value, because
>     ;; `after-make-frame-functions' might resize frame.
>     (when 1on1-*Completions*-frame-at-right-flag
>       (modify-frame-parameters
>        (selected-frame)
>        `((left . ,(- (x-display-pixel-width)
>                      (+ (frame-pixel-width) 7))))))
>     (raise-frame)
>     (when (boundp '1on1-minibuffer-frame)
>       (redirect-frame-focus
>          (selected-frame)
>          1on1-minibuffer-frame))
>     (when (and 1on1-*Completions*-frame-flag
>                (boundp 'x-pointer-box-spiral))
>       (setq x-pointer-shape old-ptr-shape))
>     return-window))
>  
> 
> In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
>  of 2008-10-03 on LENNART-69DE564
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --no-opt 
> --cflags -Ic:/g/include
> -fno-crossjumping'
>  
> 
> 
> 
> 
> 
>