From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: raman Newsgroups: gmane.emacs.devel Subject: Re: Brittleness of called-interactively-p Date: Sat, 18 Jul 2015 15:29:55 -0700 Message-ID: References: <871tgeufzt.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1437258625 27727 80.91.229.3 (18 Jul 2015 22:30:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2015 22:30:25 +0000 (UTC) Cc: Dmitri Paduchikh , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 19 00:30:19 2015 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 1ZGacc-0003zb-Ug for ged-emacs-devel@m.gmane.org; Sun, 19 Jul 2015 00:30:19 +0200 Original-Received: from localhost ([::1]:49999 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGacc-00069h-2l for ged-emacs-devel@m.gmane.org; Sat, 18 Jul 2015 18:30:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGacP-00067K-Pe for emacs-devel@gnu.org; Sat, 18 Jul 2015 18:30:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGacK-0004Ij-Rf for emacs-devel@gnu.org; Sat, 18 Jul 2015 18:30:05 -0400 Original-Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]:36483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGacK-0004IV-K1 for emacs-devel@gnu.org; Sat, 18 Jul 2015 18:30:00 -0400 Original-Received: by pdjr16 with SMTP id r16so82199955pdj.3 for ; Sat, 18 Jul 2015 15:29:59 -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=EFNC3DB7eIZ9EeuRUay5ziuSureOt/GQqkyPCbm0EB0=; b=goLvGwL3ZxOwwo832gPMCPp/hiJVogWM04G+Reon6DRiJC0VtpmQpJmnE9uuNVEfAR Xtit5DuTPae4k8k0dIitemjXT7eWO8sAmp/8R664v10QKSFxoLufoEk6XGin0TscXhVD 0BsRyAXW1aIyYjqAg4POlapYUtZlwr0N8skqekJJ/s6ZPAVTr0R5RYhH7bpGt4IDrrDT WRPBwj1OARkmfW7JS6DWmBg+FUV8rpeoUSF7hob3s+QbLYJrDgGy7gGRc/UlqMzFnEIP JwsM7BLAj6MiEXQ4IZ9lhp9P5vuJkdFAYpZMq7oIc+QL+s2O5jJ/AOWMj2raWHDprLcr GmfQ== 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=EFNC3DB7eIZ9EeuRUay5ziuSureOt/GQqkyPCbm0EB0=; b=WTdlIoynbt28YUpRedcFiNTGcNdZDYf2fsEVC7TSNEYP8YWzfPJ+mQlJBKF9ShkKBQ lrFT7nmywrCg0RD1lDGAokL2mF61ZRz3KoeUpbV0KIhxoYjCnUjdnMJfzoQZnAyi3Wcq xgerx/VzTlVEQpvAmlUj3/iBX8pWIEjwXKxOPMYfhRs/c3/Oy0N9PvIP2c2FX8V4HvHq XtxB7lAF6uGncRjrWf1N6HYAeLlJZLhMNWj0d5cG2bNEpqj4Xivah5axsYUI4/zlwGGO kSwWJ2CctxCzFG6knzjljjI6OBJD/ZARbJ4kj+tjyOsJ0xnturFUXSFjkH8CHBdKao6s LN5A== X-Gm-Message-State: ALoCoQlhaVWi2x53UQEoxFz7kgK/ZOlA8woY57nVct625jylWI5p/a1WfR0pnl+/vuStJ1RV2Gkk X-Received: by 10.68.215.66 with SMTP id og2mr42361459pbc.20.1437258598670; Sat, 18 Jul 2015 15:29:58 -0700 (PDT) Original-Received: from raman-glaptop2 (c-73-170-121-60.hsd1.ca.comcast.net. [73.170.121.60]) by smtp.gmail.com with ESMTPSA id ug1sm15275721pbc.39.2015.07.18.15.29.55 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 18 Jul 2015 15:29:56 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sun, 12 Jul 2015 09:53:38 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::230 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:187963 Archived-At: Hi Stefan, See this message on the Emacspeak mailing list: http://www.cs.vassar.edu/~priestdo/emacspeak/2015/msg00086.html At the time I also posted the problem report to bug-emacs. That gives some background on why I had to move away from called-interactive-p and implement my own version of the ems-interactive-p check. Here are the relevant bits from that message: Hi, I've used a check of the form (when (interactive-p) ...) within advice forms in emacspeak to speak *if and only if* a command is called by the user -- as opposed from within other lisp function. When we transitioned to Emacs 24, I replaced that check with (when (called-interactively-p 'interactive) ..) and this has again worked without any issues --- until now. We're seeing a problem now in ruby-mode when command electric-newline-and-maybe-indent is invoked -- that function for ruby-mode goes through a complex dance with smie-next-sexp. The long and short of it is that we eventually deadlock within a call to advice--called-interactively-skip -- the comments in nadvice.el where that function is implemented looks pretty scary. What emacspeak really needs is a clean way of checking whether something is called interactively, and this is the first time in 20 years that the test is failing. --