GNU bug report logs - #40576
call-process-region does not accept nil as first argument

Previous Next

Package: emacs;

Reported by: Pietro Giorgianni <giorgian <at> gmail.com>

Date: Sun, 12 Apr 2020 15:44:01 UTC

Severity: normal

Done: Philipp Stephani <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Pietro Giorgianni <giorgian <at> gmail.com>
Subject: bug#40576: closed (Re: bug#40576: call-process-region does not
 accept nil as first argument)
Date: Sun, 12 Apr 2020 17:08:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#40576: call-process-region does not accept nil as first argument

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 40576 <at> debbugs.gnu.org.

-- 
40576: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40576
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Pietro Giorgianni <giorgian <at> gmail.com>
Cc: 40576-done <at> debbugs.gnu.org
Subject: Re: bug#40576: call-process-region does not accept nil as first
 argument
Date: Sun, 12 Apr 2020 19:07:03 +0200
Am So., 12. Apr. 2020 um 18:01 Uhr schrieb Philipp Stephani
<p.stephani2 <at> gmail.com>:
>
> Am So., 12. Apr. 2020 um 17:44 Uhr schrieb Pietro Giorgianni
> <giorgian <at> gmail.com>:
> >
> > 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 #<buffer *scratch*>)
> >   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?
>
> Nope, looks like a genuine bug (that happens only if DELETE is non-nil).

I've now fixed this on master (commit 42306747d8).

[Message part 3 (message/rfc822, inline)]
From: Pietro Giorgianni <giorgian <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: call-process-region does not accept nil as first argument
Date: Sun, 12 Apr 2020 16:25:33 +0200
[Message part 4 (text/plain, inline)]
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 #<buffer *scratch*>)
  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
[Message part 5 (text/html, inline)]

This bug report was last modified 5 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.