unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40576: call-process-region does not accept nil as first argument
@ 2020-04-12 14:25 Pietro Giorgianni
  2020-04-12 16:01 ` Philipp Stephani
  0 siblings, 1 reply; 11+ messages in thread
From: Pietro Giorgianni @ 2020-04-12 14:25 UTC (permalink / raw)
  To: 40576

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1324 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-04-12 18:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-12 14:25 bug#40576: call-process-region does not accept nil as first argument Pietro Giorgianni
2020-04-12 16:01 ` Philipp Stephani
2020-04-12 16:21   ` Eli Zaretskii
2020-04-12 16:44     ` Philipp Stephani
2020-04-12 17:07       ` Eli Zaretskii
2020-04-12 17:09         ` Philipp Stephani
2020-04-12 17:07       ` Philipp Stephani
2020-04-12 17:24         ` Eli Zaretskii
2020-04-12 17:37           ` Philipp Stephani
2020-04-12 18:29             ` Eli Zaretskii
2020-04-12 17:07   ` Philipp Stephani

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).