From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#18: Fine-grained revert-buffer Date: Sun, 20 Sep 2020 01:08:38 +0200 Message-ID: <874kntjrex.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38083"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 18@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 20 01:09:10 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 1kJlyf-0009ov-F8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Sep 2020 01:09:09 +0200 Original-Received: from localhost ([::1]:41376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJlye-0007yX-IS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 19:09:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJlyY-0007yR-9l for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 19:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJlyY-0005JE-0D for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 19:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJlyX-00020l-PF for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 19:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Sep 2020 23:09:01 +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.16005569377722 (code B ref 18); Sat, 19 Sep 2020 23:09:01 +0000 Original-Received: (at 18) by debbugs.gnu.org; 19 Sep 2020 23:08:57 +0000 Original-Received: from localhost ([127.0.0.1]:48401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJlyT-00020U-Jt for submit@debbugs.gnu.org; Sat, 19 Sep 2020 19:08:57 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:53384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJlyR-00020A-VQ for 18@debbugs.gnu.org; Sat, 19 Sep 2020 19:08:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LU/SWBLPDqwv1XkD68/2PZbZLOF4hG/tvz9kpwDTDgI=; b=TClPZJghw/7TOyn6f+hvYIdGfE j8wdUHVH3jwVSjHfgYAPhEUbaSFtE8fPBXBgrEwY7Wick0dEsmBr6e7qnuhneiQKrAIjv9Sl64/w/ n1nxJEc2K+h1Uuvr557iChXBV2Qk8gO9+aWaawQRRJQdmeJJR/PZ4yqMJXwsAL8n3/9U=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJlyB-0007oT-7t; Sun, 20 Sep 2020 01:08:49 +0200 X-Now-Playing: Andrew Poppy's _On Zang Tuum Tumb (1): The Beating Of Wings_: "32 Frames for Amplified Orchestra" In-Reply-To: (Mauro Aranda's message of "Wed, 15 May 2019 20:10:00 -0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:188452 Archived-At: Mauro Aranda writes: > I spent some time thinking on how to get this new revert command > integrated with the rest of revert-buffer functions, and I came up with > the attached patch. > > Since the difference between revert-buffer and > revert-buffer-with-fine-grain lies at the insert-file-contents level, I > wrote an alternative to > revert-buffer-insert-file-contents--default-function, that uses > replace-buffer-contents, as Eli suggested. I named it > revert-buffer-insert-file-contents-delicately. [...] > Corrections and comments are welcome. Better names too. This was the final message in this thread (which is the oldest still-open bug report in debbugs!). I tried the patch out, and it almost worked flawlessly for me -- it did the "really edit the buffer?" userlock thing, but that was easy enough to disable, so I did that. And I pushed the patch set to the trunk. I agree that perhaps the command name isn't the most intuitive, so somebody with stronger ideas about what the name of the command should be should go ahead and change it. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no