unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: simenheg@runbox.com, 44303@debbugs.gnu.org
Subject: bug#44303: 28.0.50; json-pretty-print-buffer creates spurious lock file
Date: Sun, 01 Nov 2020 13:06:00 +0100	[thread overview]
Message-ID: <874km9ffiv.fsf@gnus.org> (raw)
In-Reply-To: <83r1pfalc4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Oct 2020 15:34:51 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> But we then have this:
>
>   if (modification_hooks_inhibited)
>     {
>       signal_after_change (BEGV, size_a, ZV - BEGV);
>       update_compositions (BEGV, ZV, CHECK_INSIDE);
>     }
>
> Does this not work, or fail to unlock the file?

This does not unlock the file in the test case.

>> But is that even needed here?  Don't the later
>> Finsert_buffer_substring/del_range_both functions do the necessary
>> bookkeeping?
>
> We disable that by binding inhibit_modification_hooks, and we do that
> for speed, see the comment before that code.

Ah, I see.  The missing piece of the puzzle was this bit, which I wasn't
aware of:

----
Setting this variable non-nil also inhibits file locks and checks
whether files are locked by another Emacs session, as well as
handling of the active region per ‘select-active-regions’.
----

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-11-01 12:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29  9:59 bug#44303: 28.0.50; json-pretty-print-buffer creates spurious lock file Simen Heggestøyl
2020-10-30 13:28 ` Lars Ingebrigtsen
2020-10-30 13:31   ` Lars Ingebrigtsen
2020-10-30 13:34   ` Eli Zaretskii
2020-11-01 12:06     ` Lars Ingebrigtsen [this message]
2020-11-07 10:32       ` Eli Zaretskii
2020-11-09  8:24         ` Simen Heggestøyl
2020-11-09 15:58           ` Eli Zaretskii
2020-11-09 16:36             ` Simen Heggestøyl
2020-11-14 13:25             ` Eli Zaretskii
2020-11-09 14:03         ` Lars Ingebrigtsen
2020-11-09 16:08           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874km9ffiv.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=44303@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=simenheg@runbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).