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: Thu, 19 May 2022 21:49:21 +0800 Message-ID: <87czg94opq.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20444"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 55451@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 19 15:49:15 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 1nrgWh-00059E-EY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 15:49:15 +0200 Original-Received: from localhost ([::1]:50404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrgWg-0000M9-Ab for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 May 2022 09:49:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrgWU-0000Gd-L3 for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 09:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrgWU-00009X-Bh for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 09:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrgWU-0001W9-6U for bug-gnu-emacs@gnu.org; Thu, 19 May 2022 09:49: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: Thu, 19 May 2022 13:49: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.16529681295810 (code B ref 55451); Thu, 19 May 2022 13:49:02 +0000 Original-Received: (at 55451) by debbugs.gnu.org; 19 May 2022 13:48:49 +0000 Original-Received: from localhost ([127.0.0.1]:34841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrgWH-0001Ve-2I for submit@debbugs.gnu.org; Thu, 19 May 2022 09:48:49 -0400 Original-Received: from mail-pf1-f169.google.com ([209.85.210.169]:47028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrgWG-0001VS-9e for 55451@debbugs.gnu.org; Thu, 19 May 2022 09:48:48 -0400 Original-Received: by mail-pf1-f169.google.com with SMTP id j6so5190620pfe.13 for <55451@debbugs.gnu.org>; Thu, 19 May 2022 06:48:48 -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=I0xEJwDD07Q4xUbfCwu0YVOrX9FsfDVqwGQoY8VGnw8=; b=VLccqpsPrtpwGMp2l1SlzS7bhFHvhK+DWsJTOU8N/skMbWAKQWDBa6kqoRcFpGCt1f Vqu1aUwan5b3nn5A7NpiL9jS6AN2fm+uXUtBMhEyDBJnXaCCgkv65MzOBMet4F0fObDq 0flINn/F5AGwquUmxA32sZrPUkUNaoUKAaVnmHi4PI6Yn/yNkGBGZOXDDTv1FJHXTBRP hZlzIF3XUzCI8iVoXIrMFPd0vfdp8UU1eqlxIcJhNcIz7vlDQsy2oX/huZcR4Jvcb79d Ciuwdzu0kDmsHQSU6NdsJ9kLphCmq9kWbQaAE69Rg2aDX5Mg8gKxtEMkZUrj2X44LaPi ZwoA== 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=I0xEJwDD07Q4xUbfCwu0YVOrX9FsfDVqwGQoY8VGnw8=; b=o437fQp8QTjmTbCqWIirQR7VtPFqB0Ugv9JXaGKdVK3q1F5749/GmGGPwUa7lXcOqS AFTdkXdbP10EerOqsR5pjFHIjOwi3gSOErr3FQ8ns6MKnzBquk4QYaY3HjQjzDPzzbXw q8ztNrfOQQ0nbfrDA4cuHn5NF7l7glwUhfgcC/OhIyBtoQg7DPubURHNSjmgGH0o7uNA TRAlp/UiGE74G0KnV9R+T1Nx2EgzekhTx5KZ6zvRoxVQJ5s3hPPFugC2e6stR3Rcksqm wPDsH5BEZCPiawVl9U0eyr6i6bFseXriUD99qYfUrSNSnXspmU/HlQF5fw6q//lESJwm BPDg== X-Gm-Message-State: AOAM532JGVjLHc+oFNriFYZlgBp/iHnFR3+mtg2j/UyusF8hF+ALqj0Y he++TrZhqJwwIJavMP4QjiE= X-Google-Smtp-Source: ABdhPJwN/BhxhZxXyJI5acfTahTVUltEntzjRK6lZcqncqMPvR4PSXkJfbB2LZbaUhNXAI0usImlaA== X-Received: by 2002:a63:f003:0:b0:3db:84d3:743d with SMTP id k3-20020a63f003000000b003db84d3743dmr4108725pgh.97.1652968122297; Thu, 19 May 2022 06:48:42 -0700 (PDT) Original-Received: from localhost ([104.223.87.12]) by smtp.gmail.com with ESMTPSA id ep1-20020a17090ae64100b001d96bc27a57sm3511656pjb.54.2022.05.19.06.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 06:48:41 -0700 (PDT) In-Reply-To: <83ilq2eo26.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:232646 Archived-At: Eli Zaretskii writes: >> From: Lars Ingebrigtsen >> Cc: Eli Zaretskii , 55451@debbugs.gnu.org >> Date: Wed, 18 May 2022 19:27:58 +0200 >> >> Ihor Radchenko writes: >> >> > However, I am confused why it is impossible to follow +1/-1 convention. >> > Looking through jit-lock.el I do not see any place where any value other >> > than non-nil/nil is considered. >> >> It would be incompatible -- all non-nil values switch jit-lock on >> presently, including -1. > > Yes. Moreover, it's hardly worth the hassle: who would switch off > jit-lock, except for debugging jit-lock? Most people will never do, > which is very unlike every minor mode out there -- those are switched > on and off all the time. It isn't an accident that we don't have the > "M-x jit-lock-mode" command. 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. So, similar to other Elisp conventions, I do expect everything called minor mode to follow the calling convention with +1/-1. Not doing so is a surprise. Not doing so without a clear indication (like an error) is a recipe for confusion. I would not expect users to read minor mode docstring every time to check if the usual convention is broken. There should be some kind of indication at least, be it an unusual symbol name, a user error, or something similarly noticeable. Best, Ihor