all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Pietro Giorgianni <giorgian@gmail.com>
Cc: 40576-done@debbugs.gnu.org
Subject: bug#40576: call-process-region does not accept nil as first argument
Date: Sun, 12 Apr 2020 19:07:03 +0200	[thread overview]
Message-ID: <CAArVCkTVb5ZmmOpTjDr+wQJGfehqJm+DymgnmeXHbux-qe6veQ@mail.gmail.com> (raw)
In-Reply-To: <CAArVCkSnSWVrBU536b_+JksEU8XMyWqBLHcMWGT_gLUJ_DxrfA@mail.gmail.com>

Am So., 12. Apr. 2020 um 18:01 Uhr schrieb Philipp Stephani
<p.stephani2@gmail.com>:
>
> Am So., 12. Apr. 2020 um 17:44 Uhr schrieb Pietro Giorgianni
> <giorgian@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).





      parent reply	other threads:[~2020-04-12 17:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAArVCkTVb5ZmmOpTjDr+wQJGfehqJm+DymgnmeXHbux-qe6veQ@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=40576-done@debbugs.gnu.org \
    --cc=giorgian@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.