From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#18409: 24.3; call-process-shell-command doc Date: Thu, 04 Sep 2014 21:22:49 -0400 Message-ID: References: <65311DC8-1CA5-4E16-B2C7-7E261C36615E@jovi.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409880208 6241 80.91.229.3 (5 Sep 2014 01:23:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Sep 2014 01:23:28 +0000 (UTC) Cc: 18409-done@debbugs.gnu.org To: Devon Sean McCullough Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 05 03:23:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XPiFD-0000WI-4h for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Sep 2014 03:23:19 +0200 Original-Received: from localhost ([::1]:54876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPiFC-0000KQ-Nv for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Sep 2014 21:23:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPiF3-0000JF-V6 for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 21:23:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPiEx-0004J1-2u for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 21:23:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPiEx-0004Ix-02 for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 21:23:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XPiEw-0001xg-Ob for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 21:23:02 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Sep 2014 01:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 18409 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 18409@debbugs.gnu.org, monnier@IRO.UMontreal.CA, Emacs-Hacker2014@jovi.net Original-Received: via spool by 18409-done@debbugs.gnu.org id=D18409.14098801747513 (code D ref 18409); Fri, 05 Sep 2014 01:23:02 +0000 Original-Received: (at 18409-done) by debbugs.gnu.org; 5 Sep 2014 01:22:54 +0000 Original-Received: from localhost ([127.0.0.1]:59178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPiEn-0001x6-MG for submit@debbugs.gnu.org; Thu, 04 Sep 2014 21:22:54 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:49760) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPiEk-0001wv-ON for 18409-done@debbugs.gnu.org; Thu, 04 Sep 2014 21:22:51 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s851MnUJ017418; Thu, 4 Sep 2014 21:22:49 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 43FD160BEC; Thu, 4 Sep 2014 21:22:49 -0400 (EDT) In-Reply-To: <65311DC8-1CA5-4E16-B2C7-7E261C36615E@jovi.net> (Devon Sean McCullough's message of "Thu, 4 Sep 2014 18:54:15 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5054=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5054> : inlines <1245> : streams <1281642> : uri <1810413> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93051 Archived-At: > Make the rest args easier to spot in the documentation On the contrary, this `args' is just asking for trouble. Don't use it. We obsoleted it for start-process-shell-command in Emacs-23 and forgot to do it for the call-process variant, which I just fixed with the patch below. Thanks for bringing it up. Stefan === modified file 'etc/NEWS' --- etc/NEWS 2014-09-03 16:13:17 +0000 +++ etc/NEWS 2014-09-05 01:17:23 +0000 @@ -200,6 +200,9 @@ * Lisp Changes in Emacs 24.5 +*** call-process-shell-command and process-file-shell-command +don't take "&rest args" an more. + ** New function `funcall-interactively', which works like `funcall' but makes `called-interactively-p' treat the function as (you guessed it) called interactively. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-09-05 01:04:47 +0000 +++ lisp/ChangeLog 2014-09-05 01:19:21 +0000 @@ -1,3 +1,10 @@ +2014-09-05 Stefan Monnier + + * subr.el (call-process-shell-command, process-file-shell-command): + Make the `args' obsolete (bug#18409). + (start-process-shell-command, start-file-process-shell-command): + Use `declare'. + 2014-09-05 Jay Belanger * calc/calc-forms.el (math-normalize-hms): Do a better check for === modified file 'lisp/subr.el' --- lisp/subr.el 2014-09-03 04:21:40 +0000 +++ lisp/subr.el 2014-09-05 01:12:43 +0000 @@ -2877,23 +2877,21 @@ An old calling convention accepted any number of arguments after COMMAND, which were just concatenated to COMMAND. This is still supported but strongly discouraged." + (declare (advertised-calling-convention (name buffer command) "23.1")) ;; We used to use `exec' to replace the shell with the command, ;; but that failed to handle (...) and semicolon, etc. (start-process name buffer shell-file-name shell-command-switch (mapconcat 'identity args " "))) -(set-advertised-calling-convention 'start-process-shell-command - '(name buffer command) "23.1") (defun start-file-process-shell-command (name buffer &rest args) "Start a program in a subprocess. Return the process object for it. Similar to `start-process-shell-command', but calls `start-file-process'." + (declare (advertised-calling-convention (name buffer command) "23.1")) (start-file-process name buffer (if (file-remote-p default-directory) "/bin/sh" shell-file-name) (if (file-remote-p default-directory) "-c" shell-command-switch) (mapconcat 'identity args " "))) -(set-advertised-calling-convention 'start-file-process-shell-command - '(name buffer command) "23.1") (defun call-process-shell-command (command &optional infile buffer display &rest args) @@ -2909,13 +2907,18 @@ t (mix it with ordinary output), or a file name string. Fourth arg DISPLAY non-nil means redisplay buffer as output is inserted. -Remaining arguments are strings passed as additional arguments for COMMAND. Wildcards and redirection are handled as usual in the shell. If BUFFER is 0, `call-process-shell-command' returns immediately with value nil. Otherwise it waits for COMMAND to terminate and returns a numeric exit status or a signal description string. -If you quit, the process is killed with SIGINT, or SIGKILL if you quit again." +If you quit, the process is killed with SIGINT, or SIGKILL if you quit again. + +An old calling convention accepted any number of arguments after DISPLAY, +which were just concatenated to COMMAND. This is still supported but strongly +discouraged." + (declare (advertised-calling-convention + (command &optional infile buffer display) "24.5")) ;; We used to use `exec' to replace the shell with the command, ;; but that failed to handle (...) and semicolon, etc. (call-process shell-file-name @@ -2927,6 +2930,8 @@ &rest args) "Process files synchronously in a separate process. Similar to `call-process-shell-command', but calls `process-file'." + (declare (advertised-calling-convention + (command &optional infile buffer display) "24.5")) (process-file (if (file-remote-p default-directory) "/bin/sh" shell-file-name) infile buffer display