From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: raman Newsgroups: gmane.emacs.devel,gmane.emacs.bugs Subject: Re: 24.4.50; called-interactively-p and skip advice: Date: Fri, 01 Aug 2014 09:12:28 -0700 Message-ID: References: <87a97texjg.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1406909569 16411 80.91.229.3 (1 Aug 2014 16:12:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Aug 2014 16:12:49 +0000 (UTC) Cc: tv.raman.tv@gmail.com, emacs-devel@gnu.org To: bug-gnu-emacs@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 01 18:12:40 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XDFRf-0005Qh-N0 for ged-emacs-devel@m.gmane.org; Fri, 01 Aug 2014 18:12:39 +0200 Original-Received: from localhost ([::1]:40516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDFRf-0005xX-8s for ged-emacs-devel@m.gmane.org; Fri, 01 Aug 2014 12:12:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDFRc-0005xB-D1 for emacs-devel@gnu.org; Fri, 01 Aug 2014 12:12:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDFRb-0006hI-GW for emacs-devel@gnu.org; Fri, 01 Aug 2014 12:12:36 -0400 Original-Received: from mail-ie0-x232.google.com ([2607:f8b0:4001:c03::232]:43793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDFRb-0006h0-B7 for emacs-devel@gnu.org; Fri, 01 Aug 2014 12:12:35 -0400 Original-Received: by mail-ie0-f178.google.com with SMTP id rd18so5945983iec.23 for ; Fri, 01 Aug 2014 09:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=t/ZaOE8ZN2fC+gqDsqOK+y6Yhan5C7NQmfu6c9+6a1o=; b=AEQeE79ql0Ry8eX1De5pKb7a7Jsx1pw59fzQB67DwQrmV78PO6fRV7IClM0dx3BqYh wX1WxanuYV3iTjTiIhaVpdPhH//aAwsAWP24eQrjh3dH9LRdYtry93VdlRaqI7yTvsJ8 I9s8e05QyXaQTS3bqMTWHO/ZGewswhwblNXpFcSI/3Z6Ooun/3sBM97tIppuXGKvvHp1 pktbI2A5pzSE7YWTG7izHbeMRL9clnRoaEq2sBdKpCI5dquR9L6I+nWsrQq5KpRYnTPi d6Cmt0itSBYoHrIkvba56dO1kzS7ieXpLAkhGqUeNMi9qOP/h1W83n5DwrycEDIBPf+M XWaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=t/ZaOE8ZN2fC+gqDsqOK+y6Yhan5C7NQmfu6c9+6a1o=; b=ZrzJ8HMUSKzw+TggklUjIDArCnia5ixgLopo43XKWau4AzR5GGfxexvXINsCjRNMez zmZNtf+zuFhsuAe0sfmXcp/F8scMVcEeeZ012ABP/rEiHa/NjueNvncSR9+F9JxSWjH3 YIgcMO+0RSxqwBl1GpCMQIRl3+LiRaPplH5icXArB21D5LnvO+geHiukPJjoHXHyO+qy ufDJ6vw/sPjDAOjE6lsKbsZ3U0dY0kBWRwjYSKbGek0FWBesvDVC6UmsRCPw0GE8eLxn 1s0tvhpzDgblhmcumS88Sm6eIlpmBoMW7tzQrVfxmo3JRpBf/1DGG+HIWQ4Y4nLcZMEW 92Ig== X-Gm-Message-State: ALoCoQlWmCeA+y5T0hqtMpnJnW1Uz/bkvmpca/Hxaa8sVLHbq0iHIEmivc4r8IEwq+YO/h1lODW8 X-Received: by 10.50.80.116 with SMTP id q20mr9493852igx.22.1406909551404; Fri, 01 Aug 2014 09:12:31 -0700 (PDT) Original-Received: from raman-glaptop.roam.corp.google.com.google.com (dhcp-172-19-118-102.cbf.corp.google.com [172.19.118.102]) by mx.google.com with ESMTPSA id ga11sm11711556igd.8.2014.08.01.09.12.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 01 Aug 2014 09:12:30 -0700 (PDT) In-Reply-To: <87a97texjg.fsf@gmail.com> (raman@google.com's message of "Mon, 28 Jul 2014 18:58:11 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173355 gmane.emacs.bugs:92037 Archived-At: Following up on this bug with additional info: I just confirmed that this bug was not present in emacs 24.3 --- where interactive-p was implemented in C -- that function was declared obsolete in 23.2. In 24.4 when we transitioned to nadvice.el is when this appears to have broken. Looking at the code in 24.4; the code for called-interactively-p and its subsequent call through to advice--called-interactively-skip --- one of the functions placed on called-interactively-p-functions -- appears to introduce large level of complexity. advice--called-interactively-skip is defined in nadvice.el Going back to the specific issue from the Emacspeak side: What I really need is a way to tell if an interactive command was called by the user pressing a key e.g. M-f for forward-word -- or M-x forward-word -- those are the only situations in which the emacspeak advice that speaks the "current word" should be invoked. Using (called-interactively-p 'interactive) for this use-case now that I look at what that code does feels extremely tangled. Could we perhaps introduce a C-level variable -- say "interactivep" that is exposed to elisp -- code in callint.c could set that variable appropriately and clear it upon completing command execution. At the time nadvice.el was introduced, Stefane had me check through with emacspeak to make sure that nothing broke -- and I had confirmed it -- admittedly, the current breakage in ruby-mode is caused by a large number of complex recursive calls that are happening within that mode. Note that there is only one emacspeak advice invoked even then -- the one to backward-sexp -- but the call stack is deep enough that called-interactively-p gets very confused. --Raman