[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?
From: |
Feng Shu |
Subject: |
Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ? |
Date: |
Fri, 12 Jan 2018 20:13:00 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) |
martin rudalics <address@hidden> 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
>> ‘parent-frame’")
>> modify-frame-parameters(#<frame Emacs 0x114d8b960> ((parent-frame .
>> #<frame *scratch* 0x106815a30>)))
>> set-frame-parameter(#<frame Emacs 0x114d8b960> parent-frame #<frame
>> *scratch* 0x106815a30>)
>> (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") #<bytecode 0x400d4227>)(nil)
>> #f(compiled-function (&rest _it) #<bytecode 0x413d1275>)()
>> eval-sexp-fu-flash-doit-simple(#f(compiled-function (&rest _it)
>> #<bytecode 0x413d1275>) #f(compiled-function (&rest args2)
>> #<bytecode 0x45362dbd>) #f(compiled-function (&rest args2)
>> #<bytecode 0x45362ddd>))
>> eval-sexp-fu-flash-doit(#f(compiled-function (&rest _it)
>> #<bytecode 0x413d1275>) #f(compiled-function (&rest args2)
>> #<bytecode 0x45362dbd>) #f(compiled-function (&rest args2)
>> #<bytecode 0x45362ddd>))
>> esf-flash-doit(#f(compiled-function (&rest _it) #<bytecode
>> 0x413d1275>) #f(compiled-function (&rest args2) #<bytecode
>> 0x45362dbd>) #f(compiled-function (&rest args2) #<bytecode
>> 0x45362ddd>) #f(compiled-function (&rest args2) #<bytecode
>> 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") #<bytecode 0x400d4227>) 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") #<bytecode 0x400d4227>) 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
> ‘parent-frame’")
> modify-frame-parameters(#<frame Emacs 0x11571e7d0> ((parent-frame .
> #<frame *Warnings* 0x10982e5b0>)))
> set-frame-parameter(#<frame Emacs 0x11571e7d0> parent-frame #<frame
> *Warnings* 0x10982e5b0>)
>
> Alan, please have a look.
>
> Thanks, martin
>
--
- set-frame-parameter a child-frame's 'parent-frame error on macOS ?, tumashu, 2018/01/11
- Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?, martin rudalics, 2018/01/12
- Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?,
Feng Shu <=
- Re:Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?, tumashu, 2018/01/12
- Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?, martin rudalics, 2018/01/13
- Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?, Feng Shu, 2018/01/13
- Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?, martin rudalics, 2018/01/13
- Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?, Dmitry Gutov, 2018/01/13
- Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?, martin rudalics, 2018/01/13
- Re: set-frame-parameter a child-frame's 'parent-frame error on macOS ?, Dmitry Gutov, 2018/01/13