From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu-maintenance: update-package-source: Only update the desired package. Date: Tue, 05 Apr 2016 22:20:58 +0200 Message-ID: <874mbfzu1h.fsf@gnu.org> References: <1459830946-2583-1-git-send-email-iyzsong@gmail.com> <87h9fgfomg.fsf@igalia.com> <87shz0v13q.fsf@gnu.org> <87inzwe4y2.fsf@igalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anXTF-0006Oe-D2 for guix-devel@gnu.org; Tue, 05 Apr 2016 16:21:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anXTB-0004XY-DP for guix-devel@gnu.org; Tue, 05 Apr 2016 16:21:05 -0400 In-Reply-To: <87inzwe4y2.fsf@igalia.com> (Andy Wingo's message of "Tue, 05 Apr 2016 12:16:21 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andy Wingo Cc: guix-devel@gnu.org, =?utf-8?B?5a6L5paH5q2m?= Andy Wingo skribis: > In that case I think the ideal is something like "edit-expression", > which takes a source location that starts an expression, uses "read" to > advance to the end of the expression, then edits the intervening string > using whatever but verifies that the result can still be read as one > expression. Having recorded the absolute byte positions of the start > and end of the expression, you can then create the output by doing an > efficient bytevector read of the prologue, then display the string for > the edited expression, then the bytevector tail. Indeed, that sounds like the right abstraction! Thanks, Ludo=E2=80=99.