From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.devel Subject: Re: input-pending-p after make-frame-visible Date: Wed, 29 Sep 2021 08:16:32 -0400 Message-ID: References: <786eca99-bb42-c744-af26-b0435a745a81@gmx.at> <1d7cee7a-6137-609c-1400-f161dc8c860e@gmx.at> <2b2c2a7f-4c4a-a293-361e-86911e9f88b7@gmx.at> <276e1863-1110-3a71-7092-a62491d2d003@gmx.at> <83czotluc3.fsf@gnu.org> <83lf3hjf9n.fsf@gnu.org> <83lf3fio1n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16486"; mail-complaints-to="usenet@ciao.gmane.io" Cc: martin rudalics , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 29 14:18:39 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVYXn-00046n-MG for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Sep 2021 14:18:39 +0200 Original-Received: from localhost ([::1]:43108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVYXm-00056X-Lb for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Sep 2021 08:18:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVYW1-0004Bb-G9 for emacs-devel@gnu.org; Wed, 29 Sep 2021 08:16:49 -0400 Original-Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:35508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVYVz-0003FY-2r; Wed, 29 Sep 2021 08:16:49 -0400 Original-Received: by mail-pg1-x533.google.com with SMTP id e7so2513673pgk.2; Wed, 29 Sep 2021 05:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kQCSQqBASD5Xcy0CKZT3ZmxzowZmfiuTpst1O1vD9dU=; b=jAELeX08AScK6GqUWy99lXR6RwFA4gfaaldMRB+IOTVjBVuhI1KrlWRW3Dv6hIIwEb chsmgfKfhWHUf+MAYyIOiezIeagqtW5JGRQ0Va32Jh2g5bPeVi1ky9M1IIZaC/9WjPyP tlFZu+VSsVWLr6WQtzf4zEx0uWn04D/yyREe4JWugCX4U5syVzc1G+YTeLBlzN/J63LN L38xj+hJ2+zZpby18uohAf4U8KH+EXGIrlTsbDlgoZEdL8BHbtE/HQlITq/M/qQalgdt wZtoCltZVP3v4f6776PrjDJCoR/Mo5LtKkqEPC4g55Q6CVa2djrujbf1HAVmbTx8sJbs AIjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kQCSQqBASD5Xcy0CKZT3ZmxzowZmfiuTpst1O1vD9dU=; b=XlN5H/wnSuN1Z1uLCdyGDFO+Yor+RdK+kcVXVpCgEuQyx25B6UD3Shh+84eEHgaJzO Yng6TZhmrzWH6HTPa40eDKK4BEk9U9BDFvsTk5pgDEwPoQvhfKoGPO3E/wjRTcG9vhgj yuReIL3xhZbV2srh8hwVIg4pOh9sRh/8HeU4mKN5RoUF2yOAVpeATpZEUF2hq4gUWoem beBMDJ+GKcx5PxuHcMz1Ei33MxQXFQPjUiCWY4yd/APfbhhDUJnwRNzF6w+IRh/ql6m+ 9/MLmZThDTsgBvILZqc8wozzwy35QB8KVeIwwYETdbZqoW2awmy50GGkjFVFMVGFn1GU vTjA== X-Gm-Message-State: AOAM532mwajkvs0Gq7W6wg2h251+BMGYYZ6nOta0aznYd0T+QZKstJ6b +R2Xhm2KblrnP95pCpY/leWC9LYpkW8lZr2kZ0zxot2cglM= X-Google-Smtp-Source: ABdhPJxW2Vp1hlk3iwDAv16sY/xbS9K9xnhDieAJibqEUersv6wiYoNg+hU1bhySF/AEiU8hbwT03oqI9KQ3eR+Aews= X-Received: by 2002:a63:7447:: with SMTP id e7mr9343756pgn.46.1632917804175; Wed, 29 Sep 2021 05:16:44 -0700 (PDT) In-Reply-To: <83lf3fio1n.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=aaronjensen@gmail.com; helo=mail-pg1-x533.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275779 Archived-At: On Tue, Sep 28, 2021 at 1:50 AM Eli Zaretskii wrote: > But where does that M-x come from in the recipe in question? Unfortunately my recipe at the moment involves a couple third party packages. M-x is what I hit to trigger M-x, with mini-frame enabled, which is what produces the problem. Specifically it's something about how mini-frame raises the child frame that causes input-pending-p to become t On Wed, Sep 29, 2021 at 5:28 AM martin rudalics wrote: > Could you please try to tell in a few sentences what you did and what > happened so maybe someone else can understand the issue and chime in. > I'm meanwhile completely lost. Also, unfortunately, my recipe involves using Emacs normally for a day or so with my configuration until the issue starts to manifest itself. I'm not the only person with this same problem, but no one else has a repro either. This is the code that evaluates, with make-frame-visible being the thing that changes the value of input-pending-p: (defun mini-frame--display (fn args) "Show mini-frame and call FN with ARGS." (let* ((selected-frame (selected-frame)) (selected-window (selected-window)) (selected-is-mini-frame (memq selected-frame (list mini-frame-frame mini-frame-completions-frame))) (dd default-directory) (parent-frame-parameters `((parent-frame . ,(unless mini-frame-standalone selected-frame)))) (show-parameters (if (functionp mini-frame-show-parameters) (funcall mini-frame-show-parameters) mini-frame-show-parameters)) (show-parameters (append (unless (alist-get 'background-color show-parameters) `((background-color . ,(funcall mini-frame-background-color-function)))) show-parameters))) (if (frame-live-p mini-frame-frame) (unless selected-is-mini-frame (setq mini-frame-selected-frame selected-frame) (setq mini-frame-selected-window selected-window) (modify-frame-parameters mini-frame-frame parent-frame-parameters)) (setq mini-frame-selected-frame selected-frame) (setq mini-frame-selected-window selected-window) (setq mini-frame-frame (mini-frame--make-frame (append '((minibuffer . only)) parent-frame-parameters show-parameters)))) (mini-frame--move-frame-to-frame mini-frame-frame mini-frame-selected-frame) (modify-frame-parameters mini-frame-frame show-parameters) (when (and (frame-live-p mini-frame-completions-frame) (frame-visible-p mini-frame-completions-frame)) (make-frame-invisible mini-frame-completions-frame)) (message "before: %S" (input-pending-p)) (make-frame-visible mini-frame-frame) (message "after: %S" (input-pending-p)) (redirect-frame-focus mini-frame-selected-frame mini-frame-frame) (select-frame-set-input-focus mini-frame-frame) (setq default-directory dd) (apply fn args))) On Wed, Sep 29, 2021 at 8:06 AM Eli Zaretskii wrote: > Can this be done from GDB instead? For me, it'd be lldb. Would putting a breakpoint in input-pending-p tell us anything? Aaron