From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePbas-0006e7-II for guix-patches@gnu.org; Thu, 14 Dec 2017 17:03:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePbao-0004jt-Am for guix-patches@gnu.org; Thu, 14 Dec 2017 17:03:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:53792) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePbao-0004jk-7H for guix-patches@gnu.org; Thu, 14 Dec 2017 17:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ePban-00074N-TL for guix-patches@gnu.org; Thu, 14 Dec 2017 17:03:01 -0500 Subject: [bug#29509] [PATCH 1/6] progress: Factorize erase-in-line. Resent-Message-ID: Date: Thu, 14 Dec 2017 23:01:53 +0100 From: Danny Milosavljevic Message-ID: <20171214230153.34dc95d4@scratchpost.org> In-Reply-To: <20171130135702.4321-1-ludo@gnu.org> References: <20171130134620.3877-1-ludo@gnu.org> <20171130135702.4321-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 29509@debbugs.gnu.org > +(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 then erase the rest of the line - which then means: whole line) Otherwise LGTM!