From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Feng Shu" Newsgroups: gmane.emacs.devel Subject: Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ? Date: Fri, 12 Jan 2018 20:13:00 +0800 Message-ID: <87fu7b6zsj.fsf@163.com> References: <3341a4c3.36ca.160e851bdbd.Coremail.tumashu@163.com> <5A5876A3.10402@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1515759386 7795 195.159.176.226 (12 Jan 2018 12:16:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 12 Jan 2018 12:16:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: Feng Shu , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 12 13:16:22 2018 Return-path: Envelope-to: ged-emacs-devel@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 1eZyFs-0001ML-CF for ged-emacs-devel@m.gmane.org; Fri, 12 Jan 2018 13:16:16 +0100 Original-Received: from localhost ([::1]:36593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZyHs-0007pJ-0M for ged-emacs-devel@m.gmane.org; Fri, 12 Jan 2018 07:18:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZyCu-0003Tz-GX for emacs-devel@gnu.org; Fri, 12 Jan 2018 07:13:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZyCr-0002eS-QF for emacs-devel@gnu.org; Fri, 12 Jan 2018 07:13:12 -0500 Original-Received: from m12-11.163.com ([220.181.12.11]:57275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZyCq-0002XZ-U4 for emacs-devel@gnu.org; Fri, 12 Jan 2018 07:13:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=wPBAn M9QcUto2lTbrGyCvs71ubM+R661faNsmMKr4TQ=; b=BzeHg6pY5A1MdILUcjBUk OkQgbzksewavUJnnhASRsLR+UU2THaJDBKacQi4Zp9eggouSdFnSMS23tfT7N1IX 55FA0NCRJrE2sYgC7C7P8twvrZTaIOiMQIHg97FNGXRAHxrTiogtR5H8BXXVsvTr jbSP4sC2QljsBmZaWNZp9E= Original-Received: from tumashu (unknown [36.149.169.145]) by smtp7 (Coremail) with SMTP id C8CowAA3vKdMplhaHq5dCQ--.7735S2; Fri, 12 Jan 2018 20:13:01 +0800 (CST) In-Reply-To: <5A5876A3.10402@gmx.at> (martin rudalics's message of "Fri, 12 Jan 2018 09:49:39 +0100") X-CM-TRANSID: C8CowAA3vKdMplhaHq5dCQ--.7735S2 X-Coremail-Antispam: 1Uf129KBjvJXoW3WFW5GFy7tFW3Cw1kAr43KFg_yoWxJr1Dpa ySywnrur4UJr4Fyw4kXF4rZrn5Z393ur4jkr4vkw10v3y5Arn2qFWakr4Yy345Cr18X34r WanIvw13Crs0yrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0ziahFfUUUUU= X-Originating-IP: [36.149.169.145] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiSg3L1FO-8lQrpgAAsf X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 220.181.12.11 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:221887 Archived-At: martin rudalics writes: >> The test code: >> >> ---------------- >> (let ((test (let ((after-make-frame-functions nil)) >> (make-frame >> `((parent-frame . ,(window-frame)) >> (width . 10) >> (height . 10)))))) >> (set-frame-parameter test 'parent-frame (window-frame))) >> ---------- > > I'm not sure what this code is supposed to do. First you make a new > child frame named 'test' with the selected frame as its parent. Then > you want to set the parent frame of 'test' to the selected frame. > The above just a example to show bug. I want to use child-frame as popup menu of company. so I want reuse exist child-frame instead of recreate a new one. for the speed. when I switch to other frame, child-frame's parent-frame must be reseted. > But I'm afraid that the implementation of x_set_parent_frame in > nsterm.m has a bug which I didn't notice before. It uses FRAME_X_P > although it probably should use FRAME_NS_P. And this > >> Debugger entered--Lisp error: (error "Invalid specification of =E2=80=98= parent-frame=E2=80=99") >> modify-frame-parameters(# ((parent-frame . #= ))) >> set-frame-parameter(# parent-frame #) >> (let ((test (let ((after-make-frame-functions nil)) (make-frame >> (cons (cons 'parent-frame (window-frame)) '((width . 10) (height >> . 10))))))) (set-frame-parameter test 'parent-frame (window-frame))) >> eval((let ((test (let ((after-make-frame-functions nil)) >> (make-frame (cons (cons 'parent-frame (window-frame)) '((width . 10) >> (height . 10))))))) (set-frame-parameter test 'parent-frame >> (window-frame))) nil) >> elisp--eval-last-sexp(nil) >> #f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp >> before point; print value in the echo area.\nInteractively, with a >> non `-' prefix argument, print output into\ncurrent >> buffer.\n\nNormally, this function truncates long output according >> to the\nvalue of the variables `eval-expression-print-length' >> and\n`eval-expression-print-level'. With a prefix argument of >> zero,\nhowever, there is no such truncation. Such a prefix >> argument\nalso causes integers to be printed in several additional >> formats\n(octal, hexadecimal, and character when the prefix argument >> is\n-1 or the integer is `eval-expression-print-maximum-character' >> or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which >> is the default,\nthis command arranges for all errors to enter the >> debugger." (interactive "P") #)(nil) >> #f(compiled-function (&rest _it) #)() >> eval-sexp-fu-flash-doit-simple(#f(compiled-function (&rest _it) >> #) #f(compiled-function (&rest args2) >> #) #f(compiled-function (&rest args2) >> #)) >> eval-sexp-fu-flash-doit(#f(compiled-function (&rest _it) >> #) #f(compiled-function (&rest args2) >> #) #f(compiled-function (&rest args2) >> #)) >> esf-flash-doit(#f(compiled-function (&rest _it) #> 0x413d1275>) #f(compiled-function (&rest args2) #> 0x45362dbd>) #f(compiled-function (&rest args2) #> 0x45362ddd>) #f(compiled-function (&rest args2) #> 0x45362dfd>)) >> ad-Advice-eval-last-sexp(#f(compiled-function >> (eval-last-sexp-arg-internal) "Evaluate sexp before point; print >> value in the echo area.\nInteractively, with a non `-' prefix >> argument, print output into\ncurrent buffer.\n\nNormally, this >> function truncates long output according to the\nvalue of the >> variables `eval-expression-print-length' >> and\n`eval-expression-print-level'. With a prefix argument of >> zero,\nhowever, there is no such truncation. Such a prefix >> argument\nalso causes integers to be printed in several additional >> formats\n(octal, hexadecimal, and character when the prefix argument >> is\n-1 or the integer is `eval-expression-print-maximum-character' >> or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which >> is the default,\nthis command arranges for all errors to enter the >> debugger." (interactive "P") #) nil) >> apply(ad-Advice-eval-last-sexp #f(compiled-function >> (eval-last-sexp-arg-internal) "Evaluate sexp before point; print >> value in the echo area.\nInteractively, with a non `-' prefix >> argument, print output into\ncurrent buffer.\n\nNormally, this >> function truncates long output according to the\nvalue of the >> variables `eval-expression-print-length' >> and\n`eval-expression-print-level'. With a prefix argument of >> zero,\nhowever, there is no such truncation. Such a prefix >> argument\nalso causes integers to be printed in several additional >> formats\n(octal, hexadecimal, and character when the prefix argument >> is\n-1 or the integer is `eval-expression-print-maximum-character' >> or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which >> is the default,\nthis command arranges for all errors to enter the >> debugger." (interactive "P") #) nil) >> eval-last-sexp(nil) >> eros-eval-last-sexp(nil) >> funcall-interactively(eros-eval-last-sexp nil) >> call-interactively(eros-eval-last-sexp nil nil) >> command-execute(eros-eval-last-sexp) > > looks very similar to Bug#30019's > > Debugger entered--Lisp error: (error "Invalid specification of =E2=80=98p= arent-frame=E2=80=99") > modify-frame-parameters(# ((parent-frame . > #))) > set-frame-parameter(# parent-frame # *Warnings* 0x10982e5b0>) > > Alan, please have a look. > > Thanks, martin > --=20