From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pietro Giorgianni Newsgroups: gmane.emacs.bugs Subject: bug#40576: call-process-region does not accept nil as first argument Date: Sun, 12 Apr 2020 16:25:33 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ee449805a318bd97" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="73146"; mail-complaints-to="usenet@ciao.gmane.io" To: 40576@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 12 17:44:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNemL-000Ix9-SA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Apr 2020 17:44:13 +0200 Original-Received: from localhost ([::1]:34510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNemK-0004lC-UQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Apr 2020 11:44:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40397) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNemB-0004l5-MN for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 11:44:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNemA-0006YD-MV for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 11:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNemA-0006Y9-Ji for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 11:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jNemA-0003jE-1K for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 11:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pietro Giorgianni Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Apr 2020 15:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40576 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158670623914315 (code B ref -1); Sun, 12 Apr 2020 15:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Apr 2020 15:43:59 +0000 Original-Received: from localhost ([127.0.0.1]:58684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNem6-0003ip-OU for submit@debbugs.gnu.org; Sun, 12 Apr 2020 11:43:59 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:49318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNdYU-0001pB-58 for submit@debbugs.gnu.org; Sun, 12 Apr 2020 10:25:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33928) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNdYQ-0008PT-VI for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 10:25:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNdYP-0007uj-UK for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 10:25:46 -0400 Original-Received: from mail-vk1-xa29.google.com ([2607:f8b0:4864:20::a29]:34865) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNdYP-0007uV-P6 for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 10:25:45 -0400 Original-Received: by mail-vk1-xa29.google.com with SMTP id u8so1341616vkl.2 for ; Sun, 12 Apr 2020 07:25:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=cpRSbCCwezKukndl0zlEmKAdRv1fsuJLrx60Z9ZL8Js=; b=J5+VrphER6iXb2b5xZCUgN9N2zw9mrV46QegNiTn1QhDHGRgsbWW+VI6JG5yMerdqB irfVMRP5qpeVWxnphwwAW2+6B5Aj8K4/+kvJB5g3ppDTNfYEK/NZyHJT4eRy67pq8RAJ JNK20f2+yz9D1TIyq/NvSDjiPspn9hDrvwOuhRKWi1vlo7O7VS+zNnEYTjnVle2UIz3M Id4zX2ZF28YYNwYf+R0s4/5g4AYMTtQFy+50DBitV5ljHW9Sez3JRZWkW8/cZQU48BOC ioX+hounTisDWb9DklShP8MZHZ0PaT4NMdrYYeL+8rprTtR1f4JPfZUSfx6oBx0LwiDv GV2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=cpRSbCCwezKukndl0zlEmKAdRv1fsuJLrx60Z9ZL8Js=; b=rZ1xi+cUCypUjaPwyd+laSpq4iplQrQZbnqst1blNVKpr8Av32TmcpVlOwmoPPDvy9 mm00ZAnvZnzrn1Bd+g1LPEt97QJG/x6xd/8ohteFQsHZZi5UV+tlNgUWkjBVpbjdG7tV 4MwPvOgPkh+MAIRs/YmYkFrasznu8diQzsIoZgdBJjGFRRgH8hYv2vL6/7pQQ5XMOrEV 7Wu6vmnuP/AwiF9JV3yLLUu7FGvJ0HC2BTWt7LETyrAvKhMFmTc3YOdl7KmYFNt6n4SY V7io4G64L99uFdGjRjnrfy96SUKp4dIxWv/DL/6oxbB4PoEQU+hhHKTi+Sioq1owV5/x YLIg== X-Gm-Message-State: AGi0PuaGHDvFjJzGy18oJbG14o+DxDIfDB1HkSVRloxF/08kKAjH8CuC 6YF5O5YpJ9xUk6JElY0gXFgDGOXEwoa9AmTyDeoD+gjH X-Google-Smtp-Source: APiQypJsHU0HvkTezPWBIASwWzhhH76TEhKKXgnb1P5jg0F6DByVQjGhSi6nU0rFQXiqbBt6ZJCleGemxSojy1HyvrI= X-Received: by 2002:a1f:d841:: with SMTP id p62mr8677262vkg.13.1586701544603; Sun, 12 Apr 2020 07:25:44 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Sun, 12 Apr 2020 11:43:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178253 Archived-At: --000000000000ee449805a318bd97 Content-Type: text/plain; charset="UTF-8" Hi, According to the documentation of call-process-region, If START is nil, that means to use the entire buffer contents; END is ignored. But when I run: (call-process-region nil nil "/bin/cat" t (current-buffer)) I get: Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) call-process-region(nil nil "/bin/cat" t #) eval((call-process-region nil nil "/bin/cat" t (current-buffer)) nil) elisp--eval-last-sexp(t) eval-last-sexp(t) eval-print-last-sexp(nil) funcall-interactively(eval-print-last-sexp nil) call-interactively(eval-print-last-sexp nil nil) command-execute(eval-print-last-sexp) If, instead, I run: (call-process-region (point-min) (point-max) "/bin/cat" t (current-buffer)) It works. Am I interpreting the documentation wrong? Emacs version: GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-09-02 Thank you --000000000000ee449805a318bd97 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

According to the documen= tation of call-process-region,
=C2=A0 If START is nil, that = means to use the entire buffer contents; END is
ignored.
<= br>
But when I run:
(call-process-region nil nil "= /bin/cat" t (current-buffer))
I get:
Debugger ente= red--Lisp error: (wrong-type-argument integer-or-marker-p nil)
=C2=A0 ca= ll-process-region(nil nil "/bin/cat" t #<buffer *scratch*>)=
=C2=A0 eval((call-process-region nil nil "/bin/cat" t (curren= t-buffer)) nil)
=C2=A0 elisp--eval-last-sexp(t)
=C2=A0 eval-last-sexp= (t)
=C2=A0 eval-print-last-sexp(nil)
=C2=A0 funcall-interactively(eva= l-print-last-sexp nil)
=C2=A0 call-interactively(eval-print-last-sexp ni= l nil)
=C2=A0 command-execute(eval-print-last-sexp)

=
If, instead, I run:
(call-process-region (point-min) (point-= max) "/bin/cat" t (current-buffer))

It w= orks.

Am I interpreting the documentation wrong?

Emacs version:
GNU Emacs 26.3 (build= 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D= 109)) of 2019-09-02


Thank you
--000000000000ee449805a318bd97--