From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0LBdEkDV32JZcAEAbAwnHQ (envelope-from ) for ; Tue, 26 Jul 2022 13:51:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SNQ/EkDV32JxGwAAauVa8A (envelope-from ) for ; Tue, 26 Jul 2022 13:51:28 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 12D001C055 for ; Tue, 26 Jul 2022 13:51:28 +0200 (CEST) Received: from localhost ([::1]:59686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGJ5y-0001ou-Nj for larch@yhetil.org; Tue, 26 Jul 2022 07:51:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGJ36-0001nW-EW for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 07:48:28 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:44876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGJ34-0001Tm-S2 for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 07:48:28 -0400 Received: by mail-pj1-x102f.google.com with SMTP id e8-20020a17090a280800b001f2fef7886eso371055pjd.3 for ; Tue, 26 Jul 2022 04:48:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=p79FnBH+j6rIjqcBtpMlfVcnAwijaVVpWiUYBMz7nns=; b=bsrCLZn3RzOjYABqfZNAE01EzcmQmzX9o22UCfDGCSURf9udQtMnm18VUUWSoyHI4I aDIFWDh/Z+M4z/BD2WU+vHtRrJmbO/iyJQh8rzYZoabz2/mRzIoKI13BE/6LQ59MnTgd V5g/cPCtcHM4FSYh+8h20slWz/DX7zhRToElom6iZFu1FNHYEfDcbfdqn65bbVaBaKR4 HDdW3cafJwuQ6D1ls7SE9jpaq9MvYv3VX4k2tCKygOmsQAddMjhj7kl43x4B2bL4ln9f DmU5Dh5T02uDFPKy0By1wn+rl4WO68PqtGdJ+aPanuKJTnZ2PjvXugmttojS3Um3klD+ yR2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=p79FnBH+j6rIjqcBtpMlfVcnAwijaVVpWiUYBMz7nns=; b=e6Gw7zFywpnBqrWp5nzhpfB22qAKT4bMMwJYcgfJvPjl05QqACoHNreGU6LfEv6qpq FMoebdvk9F4i35rnpPVeRJuCRUoDRXvvGVVOjf61ETAFyJGovNRVpDUpVaaF4PwpZ7sd w38xXZNghI+hwsyRG4gylJDD1xjXi6Gk44vvSIAEWO8ki72LVN26Cue+oxjnyIDieewO QOvEh4GV9U4fRXCgGewXFnreik7hqAGlBAp5pSw6guCZ1aGL+14x2zcmbn/WGXZD5RFZ X6la2xwthUXj/lUxXHqXlbNUbmlA/dZ6hp0oD5VCz7eM7rxCJrE1kIXW7OnNk4YNnM15 CeFA== X-Gm-Message-State: AJIora+fbumk2FUjUE5agyh4/EAQQP+bdE5q1nopOcwgvh16QsPAicdR en5i3E7qK75xy5ekaKRnHqI= X-Google-Smtp-Source: AGRyM1vgZ/DmJfbYsR7fKNkEzhYC0ewZ9E/EtQgM2qnGQ32GEceDHpImNCWGyzT8ZM4psKXDPpiSPw== X-Received: by 2002:a17:902:ce8c:b0:16c:4be6:254d with SMTP id f12-20020a170902ce8c00b0016c4be6254dmr16420605plg.51.1658836104863; Tue, 26 Jul 2022 04:48:24 -0700 (PDT) Received: from localhost ([2409:8a70:217:4f80:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id d17-20020a170902ced100b0016c59b38254sm3994581plg.127.2022.07.26.04.48.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 04:48:23 -0700 (PDT) From: Ihor Radchenko To: Bhavin Gandhi Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-auto-repeat-maybe: error =?utf-8?Q?=22Can=E2=80=99t?= expand minibuffer to full frame" and missing log note In-Reply-To: References: <413e82eb-db3b-8fac-7edb-35aded973dfd@ctpowe.net> <87y1xdk2a7.fsf@localhost> <87bku5nkz2.fsf@localhost> <8735f8s96b.fsf@localhost> <87zgh9ct01.fsf@localhost> Date: Tue, 26 Jul 2022 19:49:28 +0800 Message-ID: <871qu8ccvr.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658836288; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=p79FnBH+j6rIjqcBtpMlfVcnAwijaVVpWiUYBMz7nns=; b=JowqDh22rZfXwW2LPTZMPXrwg7DcCsX+eU96jHzK7tTe9FIRdbLYjz3HPTlDzO6yWdCucq rmDDd6HmbbkeGA35H6HowLRTqxdLtZSaTEn4fYpSyitiWDU2OkEe4k5yFE4Xtxo5LystI+ cJVf7cZzLFQUWwzKMRnIuBwc7Tleup4ECSI2xCVxYuJpQdTMbjwTs7QT/mn9yXwJ5387P6 +MeSVh756KNH1xvdGbceIS9PscLibz+W/OKVH8J9PFRt7QEl5j0ybhtetyxPw24UqfgZS4 /3GRLyUbZBeitYN5ETlrtZHrqXfkInmeBaJJjZnD/bGWSWFdFGM8FJIYgbxVdw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658836288; a=rsa-sha256; cv=none; b=qiAz0sfWbFrp0AL4Ln0HIsiQwhPAqjveVMGaPe5bAsNqeueT4t3fRcAf8Rgnbs0OQATDaq TZaxJoHjhOV/EWBx8IB4NVrIm2cry27DUlOcNvLHXV4ogVo5eoAu7j+8ZQv3jQaAfTodUs BMKWB4UdL84NbmvQFWw+zjQP0XV9cPdrl40TK8e9esCXzQYNSZbRr/7bAU3V0A+OnqPmGg Lm4PbrdZ1mqMZeFUp++tshhwe4zg1ViZb3tC4EweWnjLGjN5q50qg5WfusedYn0Jv1znnU T/moCWoXYx5x11PT2u34szs2Zz0n+xWzr5eJWpID0i1iRAaQ9IB1aNs+4pFFwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=bsrCLZn3; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -8.43 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=bsrCLZn3; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 12D001C055 X-Spam-Score: -8.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4CCbuQmKDllC Bhavin Gandhi writes: >> Thanks for the idea, I'm exploring (recursion-depth), >> (minibuffer-depth). I will come up with a patch to fix this bug. > > So, I saved this-command and (recursion-depth) value, and I'm checking > for it in the org-add-log-note (attaching diff of my changes). But this > doesn't guarantee that we are not in the minibuffer when the > post-command-hook runs. > > This is what I did, and it failed after answering the question about 10 > repeated intervals: > 1. M-: (y-or-n-p "Some question") > 2. Now I switched to Org mode buffer. > 3. Did C-c C-t on the entry. > > When org-log-add-setup runs, (recursion-depth) is 1, and > (minibuffer-depth) is also 1. > Now, the question about 10 repeated intervals is asked, once I answer > it, post-command-hook runs. And it runs while we are in the minibuffer > waiting for 'Some question'. Yikes! Then, can also check for window-minibuffer-p, but I feel that it will be a fight against all kinds of edge cases. > So, I changed the second condition to (= (minibuffer-depth) 0). > This has a different effect when org-todo finishes the execution and we > are still in minibuffer: > this-command won't be org-todo again unless it is invoked again by the > user. org-add-log-note post-command-hook is never removed, and it keeps > executing as the condition is not fulfilled. > > I'm going through the code of org-add-log-note to see if we can avoid > calling (delete-other-windows) in the minibuffer. Or move out of minibuffer > and then proceed. what about (when (or (and (equal org-log-note-this-command this-command) (= org-log-note-recursion-depth (recursion-depth))) (> org-log-note-recursion-depth (recursion-depth))) Best, Ihor