From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ? Date: Fri, 12 Jan 2018 09:49:39 +0100 Message-ID: <5A5876A3.10402@gmx.at> References: <3341a4c3.36ca.160e851bdbd.Coremail.tumashu@163.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1515746895 25774 195.159.176.226 (12 Jan 2018 08:48:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 12 Jan 2018 08:48:15 +0000 (UTC) To: tumashu , "emacs-devel@gnu.org" , Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 12 09:48:11 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 1eZv0R-0006DX-5f for ged-emacs-devel@m.gmane.org; Fri, 12 Jan 2018 09:48:07 +0100 Original-Received: from localhost ([::1]:54484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZv2Q-0002rZ-NN for ged-emacs-devel@m.gmane.org; Fri, 12 Jan 2018 03:50:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZv2F-0002pH-EG for emacs-devel@gnu.org; Fri, 12 Jan 2018 03:50:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZv2C-0003WM-90 for emacs-devel@gnu.org; Fri, 12 Jan 2018 03:49:59 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:57593) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZv2B-0003Vh-Uo for emacs-devel@gnu.org; Fri, 12 Jan 2018 03:49:56 -0500 Original-Received: from [192.168.1.100] ([46.125.249.101]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M0smx-1erJYh26eN-00v62R; Fri, 12 Jan 2018 09:49:40 +0100 In-Reply-To: <3341a4c3.36ca.160e851bdbd.Coremail.tumashu@163.com> X-Provags-ID: V03:K0:L92tqgK92RxBSmLNWAMJHVZJNlBdifjYShOTD0JMTT5kjqilZH6 wsn58OSN9P36DIWpmEhQ4QQHck9IZegxA7aaiRlf6El2z2wYMYmIKgXWfpXVmrADkIUwUgW 27aQ5SYDAOK7hnOQrvZxN0Wv5StZDoSfz4Hj7nRot4zrNwbRfLZ6plqHsQMU2w/w8V5pDw8 YuLMwautGR18YMA40zkSw== X-UI-Out-Filterresults: notjunk:1;V01:K0:eeAiihZExes=:qva0KJ6lSH0EByCB5WDu2j lEePBZRri0TEYVXMsddL6o7kWYHabES9kVxlA/EB6LqsPTbGG69RaInZOukd7w3rzOx/5WTOn dI253jz0fqpx2NSs/h6Y3WA2Q143inhtQLu1OoUiwhGbEeQrzT0i8CTFx8jSrEo+/jjlPPlao rRZcP1QnkCH6j2lIPSvGkNvK/fbcOpeiVH/eTENhmD35woCRB99CjiHxuZVZZu4cf0M1RUAVd 93xICKQrsoODSpK0TUk9bc0hWLGj79ruSFYXqlJI7g2Mi8DAYpcvcBxJodMffzwkRxIlRFUE3 yWpu3/xmiJipgtTFb3QhNBDxQNJ1JEER9JiW7Ntea6k0djFrUgfdRMtwFWTt4wFQ6XsfzygWo n9SMSK5QnWYvrxXNif88HqYYzVLArBo4KcXxY5+stwoTQNaumFF5vmma3sKMrspfb0BnBdrOH z6lvySi5Uh1K76W689O8JVyaCF0O7rYplyqjrqbiY3YduB+jK9FxSfRbjtGBkWDkpWJ16nnZy 43++KEUxutX53v1L3c2OfVD10Ard9CnTwEkznif3V0hK3fj9WPJ82VEVtPoxz7GU8qI+DDq64 yx2/fayjqA1ULMtjX8y9FTsE0Q5U0oQ+LKjb5loCQpDTcX14jyVtB0BlSe57S8fH3KhWFDd2g +ob7GjMqDjXrEw2U9IbJuyNrNya/FMiddbhhImeXPAAdSyR3GcwcU4YHfxfY1sBj2bHQN13Mu UY+cI27RGKPR7GlK85jdROAFdhwyiMOw6uPFvpNUpHNSlTeqhSxUs2r9nHePa+brHPuW/bH+ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.20 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:221878 Archived-At: > 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. 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 (co= ns (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-fram= e (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 b= efore point; print value in the echo area.\nInteractively, with a non `-'= prefix argument, print output into\ncurrent buffer.\n\nNormally, this fu= nction truncates long output according to the\nvalue of the variables `ev= al-expression-print-length' and\n`eval-expression-print-level'. With a p= refix argument of zero,\nhowever, there is no such truncation. Such a pr= efix argument\nalso causes integers to be printed in several additional f= ormats\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." (interactiv= e "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) #) #f(compiled-function (&rest args2) #) #f(compil= ed-function (&rest args2) #) #f(compiled-function (&= rest args2) #)) > ad-Advice-eval-last-sexp(#f(compiled-function (eval-last-sexp-arg-i= nternal) "Evaluate sexp before point; print value in the echo area.\nInte= ractively, with a non `-' prefix argument, print output into\ncurrent buf= fer.\n\nNormally, this function truncates long output according to the\nv= alue of the variables `eval-expression-print-length' and\n`eval-expressio= n-print-level'. With a prefix argument of zero,\nhowever, there is no su= ch truncation. Such a prefix argument\nalso causes integers to be printe= d in several additional formats\n(octal, hexadecimal, and character when = the prefix argument is\n-1 or the integer is `eval-expression-print-maxim= um-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-ni= l, which is the default,\nthis command arranges for all errors to enter t= he 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\ncurre= nt buffer.\n\nNormally, this function truncates long output according to = the\nvalue of the variables `eval-expression-print-length' and\n`eval-exp= ression-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 e= nter 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 #) Alan, please have a look. Thanks, martin