From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Re: Emacs 25.0.04: Feature Request: Make called-interactively-p's argument optional Date: Wed, 6 Jul 2016 01:03:03 -0400 Message-ID: References: Reply-To: rswgnu@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1467781466 5455 80.91.229.3 (6 Jul 2016 05:04:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2016 05:04:26 +0000 (UTC) Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 06 07:04:21 2016 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 1bKf0W-00074C-Et for ged-emacs-devel@m.gmane.org; Wed, 06 Jul 2016 07:04:20 +0200 Original-Received: from localhost ([::1]:59266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKf0V-0001B8-BH for ged-emacs-devel@m.gmane.org; Wed, 06 Jul 2016 01:04:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKezr-0001Ar-7j for emacs-devel@gnu.org; Wed, 06 Jul 2016 01:03:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKezn-00078B-G9 for emacs-devel@gnu.org; Wed, 06 Jul 2016 01:03:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKezn-000780-D6 for emacs-devel@gnu.org; Wed, 06 Jul 2016 01:03:35 -0400 Original-Received: from mail-oi0-f42.google.com ([209.85.218.42]:35772) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bKezl-0001mo-RS for emacs-devel@gnu.org; Wed, 06 Jul 2016 01:03:34 -0400 Original-Received: by mail-oi0-f42.google.com with SMTP id r2so257591227oih.2 for ; Tue, 05 Jul 2016 22:03:33 -0700 (PDT) X-Gm-Message-State: ALyK8tKM535wNsVYgwb9yN8snLo3s6I9/yeGkmBobkTbLrMolX3yPEscZTB3Hd4lN8wBbEv8BCe6MoBEusVZCQ== X-Received: by 10.202.83.9 with SMTP id h9mr11836468oib.25.1467781412940; Tue, 05 Jul 2016 22:03:32 -0700 (PDT) Original-Received: by 10.202.212.143 with HTTP; Tue, 5 Jul 2016 22:03:03 -0700 (PDT) In-Reply-To: X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:205232 Archived-At: On Tue, Jul 5, 2016 at 8:24 PM, Noam Postavsky wrote: > The recommended way to test whether the function was called using > =E2=80=98call-interactively=E2=80=99 is to give it an optional argume= nt > =E2=80=98print-message=E2=80=99 and use the =E2=80=98interactive=E2= =80=99 spec to make it > non-=E2=80=98nil=E2=80=99 in interactive calls. Here=E2=80=99s an ex= ample: > > (defun foo (&optional print-message) > (interactive "p") > (when print-message > (message "foo"))) This makes little sense to me. Every time I have a function that needs to test whether it was called interactively you want me to add essentially an interactive-flag to its argument signature and then never send this argument when called non-interactively since the caller won't care and the argument is optional so it will be nil by default. Again, why should we name and have to look at an argument to the function when the interactive test we want is internal to it. This is similar to the argument that we shouldn't have to send the default 'interactive argument to called-interactively-p. I'm with John, let's simplify this. Let's undeprecate (interactive-p). Did people actually have problems with that that kept coming up? Raman and I seemed to have used it for years without encountering any. And John, if you undeprecate it do you really need a patch or can you just change it? Bob