From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Brittleness of called-interactively-p Date: Fri, 07 Aug 2015 13:18:16 -0400 Message-ID: References: <871tgeufzt.fsf@gmail.com> <87r3odtngi.fsf@gmail.com> <87380st7c1.fsf@gmail.com> <87fv3v43xj.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438967918 3408 80.91.229.3 (7 Aug 2015 17:18:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Aug 2015 17:18:38 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org To: Dmitri Paduchikh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 07 19:18:27 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 1ZNlHm-0006KF-KO for ged-emacs-devel@m.gmane.org; Fri, 07 Aug 2015 19:18:26 +0200 Original-Received: from localhost ([::1]:50056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNlHl-0001kw-KQ for ged-emacs-devel@m.gmane.org; Fri, 07 Aug 2015 13:18:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNlHh-0001kl-PB for emacs-devel@gnu.org; Fri, 07 Aug 2015 13:18:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNlHd-0002zk-JY for emacs-devel@gnu.org; Fri, 07 Aug 2015 13:18:21 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:51763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNlHd-0002z5-Ey; Fri, 07 Aug 2015 13:18:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AyFgA731xV//gFNJ1cgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBBwEBAQEeizqFBQeELQWLRKlAI4QUIoJ4AQEB X-IPAS-Result: A0AyFgA731xV//gFNJ1cgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLDiYSFBgNJIg3CM8jAQEBBwEBAQEeizqFBQeELQWLRKlAI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="159096318" Original-Received: from 157-52-5-248.cpe.teksavvy.com (HELO pastel.home) ([157.52.5.248]) by ironport2-out.teksavvy.com with ESMTP; 07 Aug 2015 13:18:16 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C2FD161710; Fri, 7 Aug 2015 13:18:16 -0400 (EDT) In-Reply-To: <87fv3v43xj.fsf@gmail.com> (Dmitri Paduchikh's message of "Fri, 07 Aug 2015 18:35:20 +0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:188571 Archived-At: > Exactly, see above. I thought that may be it is better to associate > interactive form with function symbol rather than with function itself. That'd be a major change. > Yes, indeed, and this method is described in the doc string of > called-interactively-p. This means however that one odd argument is added to > the function interface which plays only technical role. That's one way to look at it. The way I look at it, instead, is that this extra argument is just as important as the others and that it shouldn't be called `called-interactively' or `interactive' but instead it should have a name that describes how it affects the behavior of the command, e.g. `emit-message' if it is used to decide whether or not to call `message'. > And also advices which need this information will have to modify the > argument list of the original function if it does not provide > it already. By default advices preserve all arguments already, so that's no problem. The novelty is that advices can now decide whether the inner function will behave as if called interactively or not. Stefan