From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#25117: 25.1.90; Result of called-interactively-p differs WRT file contents Date: Mon, 21 Oct 2019 11:15:33 +0200 Message-ID: <8736fmpih6.fsf@web.de> References: <5cd2a353-4594-52bd-6a70-7efa5145e2f3@easy-emacs.de> <87wpfez6vu.fsf@web.de> <01a3dabd-7fc1-7fe7-c066-15b0c02008d5@easy-emacs.de> <87vauycny9.fsf@web.de> <87r35mcm23.fsf@web.de> <2fa5d878-bb33-dd57-3a52-c6b7779cf15b@easy-emacs.de> <87woczcd8t.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="125833"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 25117@debbugs.gnu.org, Stefan Monnier To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 21 11:16:47 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMTnx-000Wa9-Ka for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 11:16:45 +0200 Original-Received: from localhost ([::1]:36418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMTnv-0007Pw-E3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 05:16:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33862) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMTnI-0007Pn-R9 for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 05:16:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMTnG-0007kT-Ro for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 05:16:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMTnG-0007kF-8r for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 05:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMTnG-0000f1-12 for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 05:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2019 09:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25117 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 25117-submit@debbugs.gnu.org id=B25117.15716493451635 (code B ref 25117); Mon, 21 Oct 2019 09:16:01 +0000 Original-Received: (at 25117) by debbugs.gnu.org; 21 Oct 2019 09:15:45 +0000 Original-Received: from localhost ([127.0.0.1]:55721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMTmy-0000Q0-J6 for submit@debbugs.gnu.org; Mon, 21 Oct 2019 05:15:44 -0400 Original-Received: from mout.web.de ([212.227.15.4]:41613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMTmv-0000Fo-0z for 25117@debbugs.gnu.org; Mon, 21 Oct 2019 05:15:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1571649327; bh=/8E1XxzUaZ3/4GMiC/pidc9TWxnaMvGEAS4jfTZ1arE=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=CNXcC3lLmoZHyKaBEZq22Tm2PcppjrcPa0QaPg9U4coO4g1n26MRhHxMQyiJ+0/oX K+JocsL5ECT/aMrSuPDkbDRgmWQ2dUn6GeN1GLPwq0tS/TnLRWBl0u8bPkpQM3IV+k I7V3v+AiHwpqboGvSgcszVEhlKEy6cc2bs5kHbiw= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([94.218.222.9]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LsQQK-1htvOx1PVA-0121dk; Mon, 21 Oct 2019 11:15:27 +0200 In-Reply-To: <87woczcd8t.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 20 Oct 2019 23:34:42 +0200") X-Provags-ID: V03:K1:Qe4kibMA6rZtT13JWLWSpS1j/mOjieSlAWxV2A3Pl/i9vsq0FkU pbMUAyN9ieyFoB4C+Uw0sxa2sGwJyve2KG3vN+g8aHd+b1BM1LDqk4r9H3iczoGJArQR5/y Iz3S2APmVksN6kajxJgTS2OmHIroD4jqcrGd5Fxjp0YtQREsmF+D4hpKrAD9ubSqNZAQAtL LQvOgqqKrRqEiQw7h5TRQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:KX3tc2a9EJ4=:ocHjPZWUGbcMIYyWJYKBTj iG2IYE6Hp/r3Obv29WZFIoHh9W6PI2tl5yvMY6uWZA4gdrnJRPMB4TClPD/iPOdAqPEcWJ4nC 85OEm9T0KZiN8M3gafytVsQKJNwMfX7wqurZi8PhTH0B4vJB0MWAL45I4gYGIUCdE2OpP7g4w zodaIQwI9K60SKCnfmu45I5YXPeEO4G6K8ARLH5ictp4WYvrM5s03R1W94eJVpF3v9bkCAuSr HQKMDYIcTGAt5ZyzjqinJj5cJNrg7wz+wQuypf8Z7dnyREqslgyC7NN3lz2GM1Z7EIuUJ2FbO 9tTJztGbyy/Yat6sOnuQCBUIchxyXrR4srhfg87c30wktxA6V9MeJSCagSrzxFd9VA+uDzQYk OZ8CquHBi9W5S8ixzme8pUPaMyDgGzoN8rvb9deKmlGsdLZpg3NefJ3mvQeeFkhduuBnOuBRH m98JXGzVA1K6yVwxtHL+7m9hKaE+cMbPxpGjmYRh0uXRwdkxD2KNf+/zdNVkGXeM5RDhComoZ sMEUA6rWxH5iVt9KbyKlg7r/giJg6916ye+3hTsPL0t+o2sWklEArJzAGLNmiFVz0kcChK9Wk WNpzGGI8xnGs4GvoBepHyT2PJjGxRYBKic5rdgHA0ItskLnzZm50M69uJYvPkCnlI5xDjxwEl hO/TXXrzNzU+8A7EsyIvqUYWvb8oH3g+r5rVA8nEeFfCzcQzsuy1T56XVzow6/6Dzl8/yRiLp CIJSTwQW587L3kcXR46u+/y/ZX7BqlpklYJSwbRjR1zXuMe1hMfDUw/Lm5EKwPH56tRuxgPQ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169891 Archived-At: Lars Ingebrigtsen writes: > If I understand edebug.el correctly, this code is supposed to make > called-interactively-p work? > > ;; When edebugging a function, some of the sub-expressions are > ;; wrapped in (edebug-enter (lambda () ..)), so we need to teach > ;; called-interactively-p that calls within the inner lambda should refer to > ;; the outside function. > (add-hook 'called-interactively-p-functions > #'edebug--called-interactively-skip) > (defun edebug--called-interactively-skip (i frame1 frame2) > (when (and (eq (car-safe (nth 1 frame1)) 'lambda) > (eq (nth 1 (nth 1 frame1)) '()) > (eq (nth 1 frame2) 'edebug-enter)) > ;; `edebug-enter' calls itself on its first invocation. > (if (eq (nth 1 (backtrace-frame i 'called-interactively-p)) > 'edebug-enter) > 2 1))) I think so, yes. > But I'm not familiar enough with `backtrace-frame' to say whether this, > like, makes sense. Anybody? It makes sense. Stefan wrote that, but it seems it just doesn't yet handle the (eq (car-safe (nth 1 frame1)) 'closure) case - Stefan? > The test case is edebug-defun this, and then `M-x foo'. The > (called-interactively-p) form will return nil when you step through the > function. > > (defun foo () > (interactive) > (let ((iact (called-interactively-p 'any))) > (message "%s" iact))) Michael.