From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#52509: 27.2; `call-process-region' won't accept nil as START argument Date: Wed, 15 Dec 2021 15:09:08 +0100 Message-ID: <87fsquc64b.fsf@rub.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25641"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 52509@debbugs.gnu.org To: LdBeth Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 15 15:15:17 2021 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 1mxV3s-0006Rv-Sa for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Dec 2021 15:15:16 +0100 Original-Received: from localhost ([::1]:35062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxV3r-0000pW-Uj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Dec 2021 09:15:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxUyo-0001Ql-Fu for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 09:10:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49039) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxUyn-0002fl-RY for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 09:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxUyn-0002Vn-Jf for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 09:10:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Dec 2021 14:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52509 X-GNU-PR-Package: emacs Original-Received: via spool by 52509-submit@debbugs.gnu.org id=B52509.16395773649598 (code B ref 52509); Wed, 15 Dec 2021 14:10:01 +0000 Original-Received: (at 52509) by debbugs.gnu.org; 15 Dec 2021 14:09:24 +0000 Original-Received: from localhost ([127.0.0.1]:60585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxUyB-0002Uk-Nd for submit@debbugs.gnu.org; Wed, 15 Dec 2021 09:09:23 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:49687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxUy8-0002UV-Bt for 52509@debbugs.gnu.org; Wed, 15 Dec 2021 09:09:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1639577349; bh=Sz2r65BWpCzmwlE0XWp24tgJClEp5qOB0kohWMud/E0=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=l1t4TUyqPHvrLwu37Gnkb+NvA6QyTi6zZL3/WEOToWc4R0fd8zez7sIHJjsGwytfV k6HQWBoiiXqBgef3W75bWPSH03soc0u9zjT4+6qFbO9TdICQ1XimGrImb/L6LQgPOC gLSJsQspX2HoPHX3RU/t9aUo0IyqXYtdn2E8tNHc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobelfs ([89.246.38.61]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3KTy-1mXPNP2ufa-010Nvh; Wed, 15 Dec 2021 15:09:09 +0100 In-Reply-To: (LdBeth's message of "Wed, 15 Dec 2021 18:59:59 +0800") X-Provags-ID: V03:K1:i/yyzsdYy4IhriX3PLi/ibFC6Tlr6GN6UwuSzanFi0v92fx0qPU JoReMDDS1NHI2Q12v/u8IVxouAYvhHMj+PVCNoe8ePOuXG43VJjcygOpmTtDHK8UId6S0yT BxT95mNn5kXqRJXuhkAk0EIC18aJTG8rcUPbZfgsUJk2kLlUNPaAM6QePAYurImWeuqiuVX S9NGEC3vOc76zTeyJU3Tg== X-UI-Out-Filterresults: notjunk:1;V03:K0:KzTBZLD3/nA=:PGTJa7KNR8HRoP7SFLi9OO 1QgMx8sGUzrfrPQEWBoS3emFA7IBUTp5aKNsStOgMx3ntrXd7Uqol88/SlTOxJe78RV9WCLKM i3teZIxUYBA3cwHsI8xsa456S9NgSNOPzIgxmjSDVShWHMDlE7Tvy1Cc9C0Kdmq6kl9gYQWFm zdEvkr0HXdKMDDBargaiX5qBDvAs3WHuD0zJKIoMxtgKE6v34SakH+kD5GTUOHJOF3uVNBCAU hWCNyThYxgQVD58BVUDmpuUty3dzcmn0kPWrNkRvWPXIOgmPn6vH817CQgi421SJMmj7KN09g Ah3YGlnXodG9+vFpG9qWw/n/pmBObDXY2if4HMICrmKA9ebfHisiTfBk9iFJqGcPjMjcKp+XO d0dybFz3iSdJKQBXu85XWx2ZJEW/4zv5ymH/AZVUfBR0v2tSUczIlsCCAVGiRbzBSllLITZcj CpgAkFtbzggoad5/M9H3Ik0SWmYAhTHtYiRuDnxHxBb5Swlqz2OKf/ASMoyIn6k9JETrrEP7i btE5GQZWeqvLoUmW2JlDqjnZplfhDaluVRh1qYjvQ6nWz1PXx5PUPmoyOV2XmdeEaM/0on2jZ 59V1MY5FnTWIl9VrivnDScS77mAktCWZGKSQO9D7/oUjIlE3w/vdHmSezyAXMaHRnIMLw7BWZ 6snmZNhyYT9PDWROwvXa+lbe1aI33pfTMnyVo0iUtBJgHttk9G4OxPSrpnCfZVOr2BkQtLyTP 7eUAdR7mfOTu5aI5CfSBVPLS0/5vaCvlHxGe6tcxo5QDb0LZvQuHoBBtihnHcItk0A2mwDpO X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:222423 Archived-At: On Wed, 15 Dec 2021 18:59:59 +0800 LdBeth wrote: > The docstring of `call-process-region' writes: > > START and END are normally buffer positions specifying the part of the > buffer to send to the process. > If START is nil, that means to use the entire buffer contents; END is > ignored. > If START is a string, then send that string to the process > instead of any buffer contents; END is ignored. > The remaining arguments are optional. > Delete the text if fourth arg DELETE is non-nil. > > To reproduce this bug, define these functions: > > ``` > (defun this-works () > (call-process-region (point-min) (point-max) "/bin/cat" > t t)) > > (defun this-wont () > (call-process-region nil 0 "/bin/cat" > t t)) > ``` > > and use `M-:` to execute these two function. The second one would give > the error trace: > > ``` > Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) > call-process-region(nil 0 "/bin/cat" t t) > this-wont() > eval((this-wont) t) > eval-expression((this-wont) nil nil 127) > funcall-interactively(eval-expression (this-wont) nil nil 127) > call-interactively(eval-expression nil nil) > command-execute(eval-expression) > ``` > > While if my understanding to the docstring is right, these two should > give identical effect. > > The Emacs version I'm using is 27.2, however I suspect this can also > be reproduced in master branch. Nope: commit 42306747d8dece897805e89c36c3741bfb8d5e7c Author: Philipp Stephani Commit: Philipp Stephani CommitDate: Sun Apr 12 19:04:11 2020 +0200 Fix error in 'call-process-region' when START is nil (Bug#40576) Steve Berman