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#44303: 28.0.50; json-pretty-print-buffer creates spurious lock file Date: Fri, 30 Oct 2020 14:31:32 +0100 Message-ID: <87k0v7hmbv.fsf@gnus.org> References: <87wnz9pd2j.fsf@runbox.com> <87o8kjhmg4.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33181"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44303@debbugs.gnu.org To: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 30 14:32: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 1kYUVl-0008TR-1R for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 14:32:09 +0100 Original-Received: from localhost ([::1]:59116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYUVj-000826-Vn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Oct 2020 09:32:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYUVe-00081w-Ne for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 09:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYUVe-0008LM-E0 for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 09:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYUVe-0007wF-BS for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2020 09:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Oct 2020 13:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44303 X-GNU-PR-Package: emacs Original-Received: via spool by 44303-submit@debbugs.gnu.org id=B44303.160406470630490 (code B ref 44303); Fri, 30 Oct 2020 13:32:02 +0000 Original-Received: (at 44303) by debbugs.gnu.org; 30 Oct 2020 13:31:46 +0000 Original-Received: from localhost ([127.0.0.1]:56664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYUVO-0007vh-I9 for submit@debbugs.gnu.org; Fri, 30 Oct 2020 09:31:46 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:37878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYUVN-0007vV-Fn for 44303@debbugs.gnu.org; Fri, 30 Oct 2020 09:31:45 -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=kY4MaPc/gtmCAjgeTLFiNjXTpoZWBPJkSbfvF23gQKc=; b=GcJZtRI8bBSAGr3QYDwpbMEXRk F6RY4jBanmKbS7kR51k7m18TTlzK7dMMlZAG+bZtwc/VSp1oo6H9u3w41PBJgu3fmniAUBM3v5BZF JaML5A17xtcuMwmYXJO/b/33q0yK5L5KVJ2jqu3JC8ezhUfdnvN3VQl+jY0MXB/VvL+w=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYUVB-0000aG-W4; Fri, 30 Oct 2020 14:31:39 +0100 X-Now-Playing: Noveller's _Arrow_: "Landscape" In-Reply-To: <87o8kjhmg4.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 30 Oct 2020 14:28:59 +0100") 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:192097 Archived-At: Lars Ingebrigtsen writes: > But is that even needed here? Don't the later > Finsert_buffer_substring/del_range_both functions do the necessary > bookkeeping? Aha, it was previously: - /* If k >= l, it means nothing needs to be deleted. */ - if (k < l) - prepare_to_modify_buffer (from, to, NULL); + prepare_to_modify_buffer (from, to, NULL); So it needs to be done in the del_range_both case? Which makes some sense. Perhaps it can just be moved down into the loop (and done once if it hasn't been done before)? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no