From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56425: 28.1; post-command-hook is triggered on y-or-n-p Date: Wed, 06 Jul 2022 22:03:45 +0300 Message-ID: <83tu7u5ai6.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28679"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56425@debbugs.gnu.org To: Bhavin Gandhi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 06 21:18:55 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1o9AY2-0007Gm-Ii for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 21:18:54 +0200 Original-Received: from localhost ([::1]:55382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9AY1-0002Dx-LR for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 15:18:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9AJh-0003zX-T6 for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 15:04:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9AJe-0004aL-MW for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 15:04:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o9AJe-0001R9-GU for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 15:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jul 2022 19:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56425 X-GNU-PR-Package: emacs Original-Received: via spool by 56425-submit@debbugs.gnu.org id=B56425.16571342385514 (code B ref 56425); Wed, 06 Jul 2022 19:04:02 +0000 Original-Received: (at 56425) by debbugs.gnu.org; 6 Jul 2022 19:03:58 +0000 Original-Received: from localhost ([127.0.0.1]:55189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9AJa-0001Qs-Kd for submit@debbugs.gnu.org; Wed, 06 Jul 2022 15:03:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9AJY-0001Qc-6f for 56425@debbugs.gnu.org; Wed, 06 Jul 2022 15:03:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9AJS-0004ZS-Sx; Wed, 06 Jul 2022 15:03:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=cgfXDJ/78UBQ82pzwdyQ4K5jmcwpv88toqZQGDfQ67I=; b=V33AAPqjlrgE Ys93KuJfwA6p8sisEt01CS+eU8Lwvwtgdqyae2IKtGoJZUI7uNHjGTU70qGki0BlkYvAUGMpSCzKt 88FGxbxkgIcKVKsxIlfqdyvRIxwlaHZyr5BE23qzMFTo+OIqjJNzduuTQ9lxWktIOR5tPQ7gb4bsv n5DuhgG2pTXJvWI8S0kbJ0fkVJF3VNwl3RgpDa78owiFgWT5WaR3sWYLTHJ9bbycUaLjnVIzLdCqP WIWzhA2OEeZnLYc/+GqP+6gFsJ2lQQCsDcxFB0/p4Ag0j+U4ACkc8+m+3yS1Ww1azhQ6qgVbSQktf JODhMtYi4YjY7dPchMD43A==; Original-Received: from [87.69.77.57] (port=4252 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9AJS-0001gk-BN; Wed, 06 Jul 2022 15:03:50 -0400 In-Reply-To: (message from Bhavin Gandhi on Wed, 6 Jul 2022 23:25:34 +0530) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236294 Archived-At: > From: Bhavin Gandhi > Date: Wed, 6 Jul 2022 23:25:34 +0530 > > Also, my-test-command has not finished executing yet, it is waiting for > user input, so how does it trigger the post-command-hook? I'm not able > to understand what causes it to trigger the post-command-hook, is it an > expected behavior? Yes. > I'm I missing something here? Is read-from-minibuffer > triggering the post-command-hook? Yes. Why are you surprised? y-or-n-p invokes read-from-minibuffer, which invokes recursive-edit, which starts a recursive command loop. And the command loop calls post-command-hook on each iteration.