From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePmb8-0006ZC-8D for guix-patches@gnu.org; Fri, 15 Dec 2017 04:48:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePmb5-0004ue-6l for guix-patches@gnu.org; Fri, 15 Dec 2017 04:48:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:54187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePmb5-0004uG-2Q for guix-patches@gnu.org; Fri, 15 Dec 2017 04:48:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ePmb4-0003P9-8z for guix-patches@gnu.org; Fri, 15 Dec 2017 04:48:02 -0500 Subject: [bug#29509] [PATCH 1/6] progress: Factorize erase-in-line. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20171130134620.3877-1-ludo@gnu.org> <20171130135702.4321-1-ludo@gnu.org> <20171214230153.34dc95d4@scratchpost.org> Date: Fri, 15 Dec 2017 10:47:56 +0100 In-Reply-To: <20171214230153.34dc95d4@scratchpost.org> (Danny Milosavljevic's message of "Thu, 14 Dec 2017 23:01:53 +0100") Message-ID: <87o9n0l3ub.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 29509@debbugs.gnu.org Danny Milosavljevic skribis: >> +(define (erase-in-line port) >> + "Write an ANSI erase-in-line sequence to PORT to erase the whole line= and >> +move the cursor to the beginning of the line." >> + (display "\r\x1b[K" port)) >> + > > Hmm, with the "\r" in front it's more like erase-current-line, no? (f.e. = the order is different: move the cursor to the beginning of the line and th= en erase the rest of the line - which then means: whole line) Yes you=E2=80=99re right: it uses the =E2=80=9Cerase-in-line=E2=80=9D ANSI = sequence but what it does is more appropriately described as =E2=80=9Cerase current line=E2=80= =9D (which is what the docstring says.) I=E2=80=99ve renamed it to =E2=80=98erase-current-line=E2=80=99. Thanks, Ludo=E2=80=99.