From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: LdBeth Newsgroups: gmane.emacs.bugs Subject: bug#52509: 27.2; `call-process-region' won't accept nil as START argument Date: Wed, 15 Dec 2021 18:59:59 +0800 Message-ID: Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33678"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-apple-darwin18.7.0) MULE/6.0 (HANACHIRUSATO) To: 52509@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 15 14:53:10 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 1mxUiT-0008Uq-GW for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Dec 2021 14:53:09 +0100 Original-Received: from localhost ([::1]:51806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxUiR-000617-P8 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Dec 2021 08:53:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxTpE-0000cD-AU for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 07:56:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxTpD-0004sq-UN for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 07:56:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxTpD-0006gl-U1 for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 07:56:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: LdBeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Dec 2021 12:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52509 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.163957292925632 (code B ref -1); Wed, 15 Dec 2021 12:56:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Dec 2021 12:55:29 +0000 Original-Received: from localhost ([127.0.0.1]:60443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxToZ-0006fA-PG for submit@debbugs.gnu.org; Wed, 15 Dec 2021 07:55:29 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:55702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxS4K-0001NK-2M for submit@debbugs.gnu.org; Wed, 15 Dec 2021 06:03:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxS4I-000740-Di for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 06:03:31 -0500 Original-Received: from out162-62-57-64.mail.qq.com ([162.62.57.64]:33691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxS49-00082q-I4 for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 06:03:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1639566194; bh=XFSHo1IdY8orSEoFrgsRtN2oiUQog4us1mU1Gv29+u4=; h=Date:From:To:Subject; b=UjyPUjxI0V/BF08OFCA+dxD2sDQhFOud8O294GwwxT0xzg/UpHEhTUcSFkyaO3he+ I32jrHcJ1MvopAhNW75IEe4HVt302k9+NLc5KGDNXXLv8wmVbE44bIH0Vt53tYYbQu 3NW/Wu2r13wzis0rsp/HESHi/xdKFCALinM0+RnM= Original-Received: from Costume-Party.local ([39.189.56.217]) by newxmesmtplogicsvrszb7.qq.com (NewEsmtp) with SMTP id 207686; Wed, 15 Dec 2021 19:00:02 +0800 X-QQ-mid: xmsmtpt1639566002tdancy8wd X-QQ-XMAILINFO: MRR5Jod2qmrXLShWi5At25IIkd+JKVmSyGF1e6G0KUFXEH6xhpIDqBpPkFutEV mc74przDhNIoLGTSP4FiHJkLPYrPBn4+6Po98M3zPCHV4k3rB4OQPEQk5lJrMkEqXWA/nc87Eyf+ zz3HkiTHqDqapgZTyPB1BtryQuUbfF1KCswcB/qMDLGJlxN79APdTL19KVv+vPnlLhJq/hQVJGnC 9IMjVEQazQgOumgmk8ZwE8finykP8jLtoYI55WPEI4HSDJjvr1In27fbIqUNZPhH+Bs/RLS96gsg 2NWk139uJ07D3cYCqJt4ZCVrFtfYpPVx+h+XKuCMzuSEZybsrGSEX/mpMasWLsR6dpGH2y8cTPdX V3ozZgYSvhGD0+H2URwsy5N1coEggFawudjn4I225iDcwCvzZeo8McqaSfLwn+VBe0aApnqvfDt5 1da0knZnFMAoVjf/L/IUP2ARiJt0QckVR8WBLEs38CQKQIrnbyVJu9FaZSi3qme6bDaofoNQ+qjE SlBuCKjCYxN05wxXCEDti+aF6GS2JuST7UX1ED0CK9nILKI+BhN8VKs7t3+RNcD7/pn15YYXps9H bTeiJKysZ9C/aXz1GZ4dhuGbengw9tBFbC0u/s3m8JtOnX+HIjqpSRV4lwvwCPRRtMj0GmBgr3Cu 9w3lp4+JsKQpacjeTV61bpJPTCHyVjeBShdLvVhx7eS/75z6io4t5gfT/B87H2Gju3WPnvVGO+nf dlO/D9IkYlxCxXXfxLKuIp8ro2AO+MbSWOqnoWhK8FKrMAfJ/Ht2i5t3eYheQaMdBtREMnQNM5TG 74cMLdrQFP9+tMQ+ZIroqz Original-Received: by Costume-Party.local (Postfix, from userid 501) id 81060203CEA8A4; Wed, 15 Dec 2021 18:59:59 +0800 (CST) X-OQ-MSGID: X-Face: $7|yD%Lji?.p'#Ya#/C7iZ!+-!NJjcGAgDR]\PSw$5:"t{7P+VEqKM:>~f#x)H2jckGF($u h>W~_Qc/,O|&mg(HAmk,P?*}P]1w1Y6R_Eu/njc; o>(_\1T$MB3M3oPTM:cv83P$`O)F{ID*m}x3S# }+?w!"kF@h<68U0'ti>$=J2.&mQw~Z^#:2FP(bF)(Y:}1r~W~@(5IR!|_C*Fy*gERgk6F!; m"e"hC`I;TMK1O_l&i+Ja)s9d2;{xTNv&gp/>w>#aSg)P:%$oVI*V[LFED=+xNrHX-!#}\U] Received-SPF: pass client-ip=162.62.57.64; envelope-from=andpuke@foxmail.com; helo=out162-62-57-64.mail.qq.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HELO_DYNAMIC_IPADDR=1.951, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TO_NO_BRKTS_DYNIP=0.251 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 15 Dec 2021 07:55:18 -0500 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:222420 Archived-At: 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. -- LDB