From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#18: Fine-grained revert-buffer Date: Sat, 27 Apr 2019 14:46:50 -0300 Message-ID: References: <83d0l7x5og.fsf@gnu.org> <83h8ajv29z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009059cc058786a3e6" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="34539"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 18@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 27 19:48:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKRQq-0008rw-Ka for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2019 19:48:12 +0200 Original-Received: from localhost ([127.0.0.1]:34778 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKRQp-0005rf-Lr for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2019 13:48:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKRQh-0005rT-G4 for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 13:48:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKRQg-0000UE-8r for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 13:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50659) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hKRQg-0000U8-60 for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 13:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hKRQg-0003X4-2h for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 13:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2019 17:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18 X-GNU-PR-Package: emacs Original-Received: via spool by 18-submit@debbugs.gnu.org id=B18.155638723112653 (code B ref 18); Sat, 27 Apr 2019 17:48:02 +0000 Original-Received: (at 18) by debbugs.gnu.org; 27 Apr 2019 17:47:11 +0000 Original-Received: from localhost ([127.0.0.1]:35970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKRPq-0003Hb-GY for submit@debbugs.gnu.org; Sat, 27 Apr 2019 13:47:10 -0400 Original-Received: from mail-lf1-f46.google.com ([209.85.167.46]:35324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKRPp-0003Bm-0j for 18@debbugs.gnu.org; Sat, 27 Apr 2019 13:47:09 -0400 Original-Received: by mail-lf1-f46.google.com with SMTP id j20so4878635lfh.2 for <18@debbugs.gnu.org>; Sat, 27 Apr 2019 10:47:08 -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=es8lmcdqgyw9MmXdfvFBGOl7s5HlDtiIsZPOmtUeWfA=; b=KXSaw0Lnq/t+4mCs5ZfeA6WssGC/lgEgjj1F/7JtquwDPEY9P++9Hzq+VmZOySoB/r hA2UOjAP7DPn8nSGwK0pdrL6roIguoyrHWZyo1Giq/nkf6AjzF24/eiSO2/GgISx07Fy Uz+7yTs3j+pxRyFW01wPW+tPp8JQPmNt0MVsKPKXalK5LJJbIDVx/aIaVyJlAxx4cXz3 UrpBpiZg7diJltND0ilMpvOqPQQLY9svvuWm/Ok+vSAJgzQQn5Sw5BdS9xPHzOhSIY9V XunYa8eVzFoWU3XWmoLO9DF7VuAmEDz5Me07nLsIQ7+o7XUVv2lbXkLI3oJaSV68q4tA TAtQ== 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=es8lmcdqgyw9MmXdfvFBGOl7s5HlDtiIsZPOmtUeWfA=; b=CWaIORrDGV8iBwMfL/D7XH/le2UK4oI2WdG4jBQt6aoE5bTVYz6szweItU297hQGQq C3ZL/SKgAUiH28IMuHacCudUf5wsIDJJLylfU9FxTXLAueX4iPoJ+9pP4Yi+ezRlymow 9F5pU2DWPNh88prZ7olvKFUWadjGhyy+HbcBwtxYagFgaH3CoQGYTCErCgC8k+81bhmo A391Yom9/aFB+yWHHD6uLBUrIiKBZxjpvAIwj9VKcDTVtJ6mvdCtpTvESqDBQtuHoaxN hEGBAraAko1nHl2nWIDNDTcaeXYsU1oLxl+uJ8noIAhA6dPrJo/9lx0znC/IwxvduXiO Ef+w== X-Gm-Message-State: APjAAAUrUE54Zlwoo1XTRSh9oRgaeyfzME9bNgGuozIotgqBX3kJnPp3 whoSl8hIn0/0RCPRGbaTSiWBpQuT5LEX4bWNOOg= X-Google-Smtp-Source: APXvYqxQ8STvIC9AgcX23CH33z24zILbiMTLHro0/mOaDt1yGti2BM0xizheK4mtLW0TUa7LBhWI97/t1RAbnepj5ms= X-Received: by 2002:ac2:523a:: with SMTP id i26mr23219883lfl.118.1556387223065; Sat, 27 Apr 2019 10:47:03 -0700 (PDT) In-Reply-To: <83h8ajv29z.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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158368 Archived-At: --0000000000009059cc058786a3e6 Content-Type: text/plain; charset="UTF-8" Eli Zaretskii writes: > Is there a requirement to be able to undo the revert piecemeal? What > would be the use case for that? Your questions made me open my eyes, so thanks. I originally thought that it would be a good thing, for example if the user wants to revert some of the changes but keep others. But that use case is already covered by using diff-buffer-with-file, for example, and applying (or not) each hunk separately. Even better, the undo process doesn't have to be from the Nth hunk to the 1st, in order. So please, ignore what I said about that problem, using replace-buffer-contents seems to be a great choice to address this wishlist item. >> I haven't timed it yet. I didn't know if it would be considered good >> enough, to time it. For a week, I've been testing it manually with some >> of the changes in the Emacs sources, and the experience has been >> satisfactory. Are there, by any chance, such tests for >> replace-buffer-contents? > > You can find one in bug#31888. > > Also, this discussion: > > http://lists.gnu.org/archive/html/help-gnu-emacs/2019-02/msg00000.html > > indicates that using JSON pretty-printer might produce a good test > case. Thanks. I'll keep working on the potential fallback for replace-buffer-contents, and report back when I feel I've made some progress. Best regards, Mauro. --0000000000009059cc058786a3e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Eli Zaretskii <eliz@gnu.org> writes:

> Is there= a requirement to be able to undo the revert piecemeal? What
> would = be the use case for that?

Your questions made me open my eyes, so th= anks.=C2=A0 I originally thought
that it would be a good thing, for exam= ple if the user wants to revert some
of the changes but keep others.=C2= =A0 But that use case is already covered by
using diff-buffer-with-file,= for example, and applying (or not) each hunk
separately.=C2=A0 Even bet= ter, the undo process doesn't have to be from
the Nth hunk to the 1s= t, in order.=C2=A0 So please, ignore what I said about
that problem, usi= ng replace-buffer-contents seems to be a great choice
to address this wi= shlist item.

>> I haven't timed it yet.=C2=A0 I didn't= know if it would be considered good
>> enough, to time it.=C2=A0 = For a week, I've been testing it manually with some
>> of the = changes in the Emacs sources, and the experience has been
>> sati= sfactory.=C2=A0 Are there, by any chance, such tests for
>> replac= e-buffer-contents?
>
> You can find one in bug#31888.
>> Also, this discussion:
>
>=C2=A0=C2=A0 http://li= sts.gnu.org/archive/html/help-gnu-emacs/2019-02/msg00000.html
>> indicates that using JSON pretty-printer might produce a good test> case.

Thanks.

I'll keep working on the potential f= allback for replace-buffer-contents,
and report back when I feel I'v= e made some progress.

Best regards,
Mauro.
--0000000000009059cc058786a3e6--