From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#55451: 28.1.50; Executing (jit-lock-mode -1) does not disable jit-lock-mode Date: Fri, 20 May 2022 16:13:58 +0800 Message-ID: <87y1yw39kp.fsf@localhost> References: <871qwtshk5.fsf@localhost> <83sfp9iie5.fsf@gnu.org> <87bkvwjatb.fsf@gnus.org> <871qwr2hd0.fsf@localhost> <87zgjeagyp.fsf@gnus.org> <83ilq2eo26.fsf@gnu.org> <87czg94opq.fsf@localhost> <83mtfdd3ln.fsf@gnu.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="24962"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 55451@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 20 10:14:38 2022 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 1nrxmP-0006Ll-Dq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 10:14:37 +0200 Original-Received: from localhost ([::1]:34932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrxmN-0000H6-Ru for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 04:14:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrxlq-0000Gi-Qm for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 04:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43573) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrxlq-0003Sn-Go for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 04:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrxlq-00038T-9f for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 04:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 May 2022 08:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55451 X-GNU-PR-Package: emacs Original-Received: via spool by 55451-submit@debbugs.gnu.org id=B55451.165303440311958 (code B ref 55451); Fri, 20 May 2022 08:14:02 +0000 Original-Received: (at 55451) by debbugs.gnu.org; 20 May 2022 08:13:23 +0000 Original-Received: from localhost ([127.0.0.1]:37470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrxlC-00036o-O6 for submit@debbugs.gnu.org; Fri, 20 May 2022 04:13:23 -0400 Original-Received: from mail-pf1-f174.google.com ([209.85.210.174]:46996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrxlB-00036S-0n for 55451@debbugs.gnu.org; Fri, 20 May 2022 04:13:21 -0400 Original-Received: by mail-pf1-f174.google.com with SMTP id j6so7131432pfe.13 for <55451@debbugs.gnu.org>; Fri, 20 May 2022 01:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=vXwK7/fbEyLO+eLRzjWG5aXgZry85fBpdvl7HHA8mIE=; b=a48kGJHKY2ejTKY6CZ87P1JSYDZuojO43znZFlRD2BLjbQ0Du6clQPyJqolNMtMiKj SDRWSnkyNTAltunsOJVxaLsWx6s2S4AtN2FW9/7IbJLOl/mTKWxCpjXkuvfrYStej5MG 6o/GqN8fM3WGyFJ0lcNxSmhkl9RIbMqVNEoy2QTmE9JdvYaVfQqh8W3fC9I79lokmcak MUdRHtWONRA3mAPpuW+YBj6MUoEcCwWz938nW97tAYyFXC4t9f4XDbQ6+CvGbNSHxVP0 yvKWN8cCG/8SAMOb4aExYTvHfUVzVlsQg39RckpphOjyPtRY/TREGLKtm+wQhxwLXHOC F8Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=vXwK7/fbEyLO+eLRzjWG5aXgZry85fBpdvl7HHA8mIE=; b=55H42/oKWB3FUd0Bl6sX1urLe5ROL3xvKlkoK6v8AaSsFtH/kVwnL0k0/FXcHg40gm jypssB/q5Z0IfT+tSZ4kje3f68epAaaKZK+xeo14+jIZ5FRVCQmN2kif0TtZIwIj/CUh loqudjMDa3ujuYNHh5wGaIAC7ocuTfC+lTwTnIBf9PYNJeGq+IbKmsxD5wlp1Muqh8DU s3vym2IdpvYMWXOIIQ0KCM7hL1geJqezzKpsRz2oWvDIKiIyvPm01g1EAfNoOQ7KNBWC Ing9S2Sdkayiodsn2Jn5ponjDG13hRTs9EoXw5N2umhiQTWdGlsTcXaKkdT00luqCMoG eOmg== X-Gm-Message-State: AOAM530cUGikj/TTWyZBHnLCLMcCAi76SUuH6ciUAQ6THqnQ75/CmzlW zxAw0tcJqpalcl6o3TenDbQ= X-Google-Smtp-Source: ABdhPJyH8WJ9REad6nHprPzAYnGaBqDh43GzH0wXC7qBt0Gm/1+2j/aK76u0MxOCqUmdVxJ4CUAPjw== X-Received: by 2002:a63:7d48:0:b0:3db:33fd:b227 with SMTP id m8-20020a637d48000000b003db33fdb227mr7739872pgn.194.1653034395130; Fri, 20 May 2022 01:13:15 -0700 (PDT) Original-Received: from localhost ([134.73.242.163]) by smtp.gmail.com with ESMTPSA id r10-20020a170902e3ca00b00161929fb1adsm4969821ple.54.2022.05.20.01.13.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:13:14 -0700 (PDT) In-Reply-To: <83mtfdd3ln.fsf@gnu.org> 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:232705 Archived-At: Eli Zaretskii writes: >> That's exactly the situation I had: >> 1. Tried M-x jit-lock-mode. Did not work. Understandable - special minor >> mode. >> 2. M-: (jit-lock-mode -1). No error. Executed. >> 3. Tried to debug something assuming that jit-lock is disabled. >> 4. After several minutes, realised that jit-lock is still working. > > But the doc string already caters to your use case: > > If you need to debug code run from jit-lock, see `jit-lock-debug-mode' To clarify, I was trying to debug race condition in font-lock itself. jit-lock made things even more complex and I just wanted to quickly disable it. I did not want to debug jit-lock behaviour at all. >> I would not expect users to read minor mode docstring every time to >> check if the usual convention is broken. > > Users don't need to turn off jit-lock. People who want to debug it, > OTOH, _are_ expected to read the doc string. I understand. I do not consider the described issue critical. However, from a perspective of Elisp developer, minor mode docstrings rarely contain low-level information. Rather general minor mode description + standard boilerplate generated by define-minor-mode. That boilerplate is well-known an is usually not worth checking out multiple times: >>> This is a minor mode. If called interactively, toggle the >>> Org-Indent mode mode. If the prefix argument is positive, >>> enable the mode, and if it is zero or negative, disable the mode. >>> >>> If called from Lisp, toggle the mode if ARG is toggle. Enable >>> the mode if ARG is nil, omitted, or is a positive number. >>> Disable the mode if ARG is a negative number. >>> >>> To check whether the minor mode is enabled in the current buffer, >>> evaluate ... So, I would not expect that habituated developers actually check out the docstring regarding enabling/disabling the mode. At least I did not until I realised that something is strange and jit-lock-mode was not disabled after M-: (jit-lock-mode -1) Again, it is just my perspective consisting of a single personal datapoint. If you think that the current state is ok, feel free to disregard my complaint. Best, Ihor