From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.bugs
Subject: bug#40576: call-process-region does not accept nil as first argument
Date: Sun, 12 Apr 2020 19:09:12 +0200
Message-ID:
References:
<83zhbgk74d.fsf@gnu.org>
<83y2r0k4zu.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202";
logging-data="33421"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 40576@debbugs.gnu.org, Pietro Giorgianni
To: Eli Zaretskii
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 12 19:10:13 2020
Return-path:
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92)
(envelope-from )
id 1jNg7Z-0008ae-8M
for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Apr 2020 19:10:13 +0200
Original-Received: from localhost ([::1]:35338 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jNg7Y-0004wE-Ax
for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Apr 2020 13:10:12 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47710)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from ) id 1jNg7P-0004vy-HQ
for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 13:10:04 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1jNg7O-0004ci-DF
for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 13:10:03 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:47224)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1jNg7O-0004cW-9u
for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 13:10:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1jNg7O-0005v8-6i
for bug-gnu-emacs@gnu.org; Sun, 12 Apr 2020 13:10:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 12 Apr 2020 17:10:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 40576
X-GNU-PR-Package: emacs
Original-Received: via spool by 40576-submit@debbugs.gnu.org id=B40576.158671137122681
(code B ref 40576); Sun, 12 Apr 2020 17:10:02 +0000
Original-Received: (at 40576) by debbugs.gnu.org; 12 Apr 2020 17:09:31 +0000
Original-Received: from localhost ([127.0.0.1]:58766 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jNg6s-0005tl-Ny
for submit@debbugs.gnu.org; Sun, 12 Apr 2020 13:09:30 -0400
Original-Received: from mail-ot1-f47.google.com ([209.85.210.47]:45761)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jNg6r-0005tU-Dh
for 40576@debbugs.gnu.org; Sun, 12 Apr 2020 13:09:29 -0400
Original-Received: by mail-ot1-f47.google.com with SMTP id 60so6911746otl.12
for <40576@debbugs.gnu.org>; Sun, 12 Apr 2020 10:09:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=ZJ+kuPEz55pafV2xLDkOuxpwhYuF8xGbRfgN93Fsn4E=;
b=c5vKtzeZRTnVny6QHyla8jEb8GB4W7ZJr2k7KJLdA70HcTngrivqixBKlEG0T6fzu+
Es3l/pFIViA5R4WPDt01PRAHhr/dVK4pA9B5y0j9zg3F+wtIJFnnL+nlnddnsBr4SVkA
dU3LsmlhkWjj61aZk7UEAYGXZ/3HZnZ+7AqiEXsByHmvfMco3bYr7v/UeXqNSk1/cqgy
Y1xbWwhcaA8kln+lQX2+D91D8ipVBHN7c8XhZ2XMaVE7R8WSd1Bg3e0fjhNXGt5s3cny
8YBPhFyKiz8ny9Vwd+j3z3ZFtehsBNnYlMklHNR9RD8ZXqIfa1ajpVOD02CjMTySDJ6x
LHtA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=ZJ+kuPEz55pafV2xLDkOuxpwhYuF8xGbRfgN93Fsn4E=;
b=GQ37xjdkFKt5N/lsh420Oc6IDDoBf5Ee2965BZEuyfASzU7CoopdGE4w3mBp7FEf10
xr5XmYMscM6GQpTQm0oqLF/5iPW5ogEnyr9Ap037KkIOS8kxv2h2fNdqEK2796Exiv5p
ltAI9qGgF91lDwIDwhCfuBacUCr7i0xk0u5BiazwLkF+Ieqsods/IvAYbGklugMYzSaa
UQWhc1v3C27dU2Fc0zup8LVW5Omha2DiULMps7atklUwWmiki1H2/4Y8TlxkbBN1qlyx
59mrx8r+MPO3IR/msT+A1iNvOlQT06hUaS3//zx1LiNKNcRjp00YcXKv8cvKdNFbZM8k
Z+iA==
X-Gm-Message-State: AGi0Pubi3Q5YnpIBaeWlASP8SbQqLbXtuzHm7A9Fl+8Q6VJiuKnj6cO3
42d7OSLV/r1uOCFirx/gV0hmrPOdSJlDQjJG4HU=
X-Google-Smtp-Source: APiQypIdtT78K0/xKcWZRDgBp2KFcfB1cdCY8dNl/zijtJWuUp3n0/m+SShtZD/Q08Awf7TR6LtmiZG0qeBnze+QpT8=
X-Received: by 2002:a05:6830:1e79:: with SMTP id
m25mr11421539otr.36.1586711363966;
Sun, 12 Apr 2020 10:09:23 -0700 (PDT)
In-Reply-To: <83y2r0k4zu.fsf@gnu.org>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 209.51.188.43
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
the Swiss army knife of text editors"
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
Xref: news.gmane.io gmane.emacs.bugs:178265
Archived-At:
Am So., 12. Apr. 2020 um 19:07 Uhr schrieb Eli Zaretskii :
>
> > From: Philipp Stephani
> > Date: Sun, 12 Apr 2020 18:44:58 +0200
> > Cc: Pietro Giorgianni , 40576@debbugs.gnu.org
> >
> > > Right. But there's more here than meets the eye, because the change
> > > after which we started advertising the special meaning of nil for
> > > START exposed a problem: write_region, called from create_temp_file,
> > > has special meaning for START = nil: it widens the buffer and writes
> > > the entire buffer contents to the temp file. Which isn't right when
> > > write_region is called from call-process-region, as it allows access
> > > to inaccessible portion of the buffer, something we shouldn't do.
> >
> > I think that's pretty much intentional. The documentation says
> >
> > "If START is nil, that means to use the entire buffer contents"
>
> That sentence is an addition made in 2016, AFAICT.
Sure, but the behavior has been around for so long that it's very
likely somebody already relies on it.
>
> > It specifically doesn't say to only use the accessible portion of the
> > buffer. Given that this behavior probably has been in place since
> > commit 561cb8e159e7eff7a6487a45a1cfab47ba456030 from 1994, it would be
> > rather unwise to introduce such a breaking change.
>
> But then START = nil would work, whereas START = 2 will signal an
> error if the buffer is narrowed. Does that make sense?
No, absolutely not. But I think it's too late to change it.