* args-out-of-range for 'call-process-region'.
@ 2011-09-26 17:26 Oleksandr Gavenko
2011-09-26 19:03 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Oleksandr Gavenko @ 2011-09-26 17:26 UTC (permalink / raw)
To: help-gnu-emacs
I try eval:
(call-process-region 1 6 "cat" nil t)
and get
(args-out-of-range 0 5)
call-process-region(0 5 "cat" nil t)
Also I get same error with such code:
(with-temp-buffer
(insert "hello")
(message "ret: %d" (call-process-region 0 (point-max) "cat" nil t))
(message (buffer-string)))
What is wrong?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: args-out-of-range for 'call-process-region'.
2011-09-26 17:26 args-out-of-range for 'call-process-region' Oleksandr Gavenko
@ 2011-09-26 19:03 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2011-09-26 19:03 UTC (permalink / raw)
To: help-gnu-emacs
> From: Oleksandr Gavenko <gavenkoa@gmail.com>
> Date: Mon, 26 Sep 2011 20:26:43 +0300
>
> I try eval:
>
> (call-process-region 1 6 "cat" nil t)
>
> and get
>
> (args-out-of-range 0 5)
> call-process-region(0 5 "cat" nil t)
This works for me as expected. I cannot see how could it happen that
you specified positions 1 to 6 as the region and got an error about 0
to 5.
> Also I get same error with such code:
>
> (with-temp-buffer
> (insert "hello")
> (message "ret: %d" (call-process-region 0 (point-max) "cat" nil t))
> (message (buffer-string)))
>
> What is wrong?
Buffer positions start from 1, so using zero will definitely and
correctly signal an error.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-26 19:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-26 17:26 args-out-of-range for 'call-process-region' Oleksandr Gavenko
2011-09-26 19:03 ` Eli Zaretskii
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).