[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: args-out-of-range for 'call-process-region'.
From: |
Eli Zaretskii |
Subject: |
Re: args-out-of-range for 'call-process-region'. |
Date: |
Mon, 26 Sep 2011 22:03:50 +0300 |
> 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.