From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Brittleness of called-interactively-p Date: Thu, 16 Jul 2015 10:36:41 -0700 (PDT) Message-ID: <56ffd903-483b-49cf-acf1-f17c1231537e@default> References: <871tgeufzt.fsf@gmail.com> <87r3odtngi.fsf@gmail.com> <87380st7c1.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1437068232 21347 80.91.229.3 (16 Jul 2015 17:37:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jul 2015 17:37:12 +0000 (UTC) Cc: Dmitri Paduchikh , emacs-devel@gnu.org To: raman , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 16 19:37:00 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 1ZFn5f-0005GR-EV for ged-emacs-devel@m.gmane.org; Thu, 16 Jul 2015 19:36:59 +0200 Original-Received: from localhost ([::1]:41297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFn5e-0004jc-Tr for ged-emacs-devel@m.gmane.org; Thu, 16 Jul 2015 13:36:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFn5c-0004jW-3s for emacs-devel@gnu.org; Thu, 16 Jul 2015 13:36:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFn5Y-00072Z-Sf for emacs-devel@gnu.org; Thu, 16 Jul 2015 13:36:56 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:44298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFn5Y-00071k-Lp for emacs-devel@gnu.org; Thu, 16 Jul 2015 13:36:52 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t6GHajtT024512 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Jul 2015 17:36:45 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t6GHah7I024036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 16 Jul 2015 17:36:43 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t6GHahbc019640; Thu, 16 Jul 2015 17:36:43 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:187905 Archived-At: > Speaking from the perspective of developing Emacspeak: >=20 > Emacspeak uses the "is this an interactive call" heavily -- it provides > spoken feedback only if the call is interactive. >=20 > I originally implemented emacspeak starting in late 1994 and used the > test (when (interactive-p)...) in all my code. >=20 > When interactive-p was deprecated and we moved to the new > called-interactive-p -- I was unable to get the behavior I wanted using > (called-interactive-p 'interactive) as the test; -- the code ended up > chasing its tail given the heavy use of advice. >=20 > I worked around the problem by defining my own version of the > interactive test -- see http://github.com/tvraman/emacspeak -- > specifically the implementation of function ems-interactive-p. You might want to say which of the many (!) files in that directory contains the definition of `ems-interactive-p'. And perhaps tell us why you mention it and, in particular, what is the "behavior [you] wanted", and why. You mention that `called-interactively-p' doesn't work well enough for you when advice is involved, but some more info about `ems-interactive-p' might be helpful. FWIW, I still use `interactive-p' in much of my code, because the code needs to work also with older Emacs versions. And because I have never noticed any problem, for this code anyway, with `interactive-p'. What's more, the doc for `interactive-p' does not really tell you how to replace it - it just says to use `called-interactively-p', without any mention of which argument gives you the behavior you had previously with `interactive-p' or similar-but-somehow-improved behavior. `interactive-p' was indeed used heavily, over decades. And it is no doubt still in use quite a bit. Too bad there is next-to-no guidance on how to use `called-interactively-p' to replace it.