From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#72405: 29.4; Doc string of `org-indent-mode' Date: Thu, 01 Aug 2024 09:18:11 +0300 Message-ID: <86zfpwwyu4.fsf@gnu.org> References: <86cymsyguu.fsf@gnu.org> <877cd0iyw4.fsf@gmail.com> <8734noiy1b.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7268"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72405@debbugs.gnu.org, drew.adams@oracle.com To: Visuwesh , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 01 08:19:09 2024 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 1sZP9Y-0001gv-76 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Aug 2024 08:19:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZP9E-0003PK-23; Thu, 01 Aug 2024 02:18:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZP9C-0003OS-25 for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2024 02:18:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZP9B-0007nx-PG for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2024 02:18:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=MnBEdwfMqdasdkQmMrlBsQJQnH0zkxeI1i1T4n3B5hw=; b=ZOfx8FygtaO+87AoPcxRLhDv0gbfsCSz5ePD3CNTjriLRO8/3u9xkT9R+N2HYhbiemmNP9NcRdKZ0SXtusNlvGKz2rbtr5cLmkJc8rQUo1VhRYIICtbX23lB5B/O3B38ppq4EemhsyO+zAhwu856tn2B9myIhAznT3sJnnMST2MjYs41Ma9ztW+Vqi9vqAlB/80qG1G91ZorV5BodeQDsSmEjRggJK5NwjrWfhCuyIlHBg9YpKZcTb/UtlWOCwiV25eR43oU1MmISwO7pJD9qL5gZFvollbwxdORem5hsssv2NtYTB/HU1+lFrdPcn5eVtQedRBICj63qRpNoGICQQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sZP9S-0001BR-4M for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2024 02:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Aug 2024 06:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72405 X-GNU-PR-Package: emacs Original-Received: via spool by 72405-submit@debbugs.gnu.org id=B72405.17224931184510 (code B ref 72405); Thu, 01 Aug 2024 06:19:02 +0000 Original-Received: (at 72405) by debbugs.gnu.org; 1 Aug 2024 06:18:38 +0000 Original-Received: from localhost ([127.0.0.1]:50705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZP93-0001Ag-UM for submit@debbugs.gnu.org; Thu, 01 Aug 2024 02:18:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:32842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZP92-0001AT-Ee for 72405@debbugs.gnu.org; Thu, 01 Aug 2024 02:18:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZP8f-0007kZ-AD; Thu, 01 Aug 2024 02:18:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=MnBEdwfMqdasdkQmMrlBsQJQnH0zkxeI1i1T4n3B5hw=; b=bxUGlgF8VU+KSMvs5hPP ZU3SJOc56HdxQbeGKUUxMIFauORyCLUhcxx1OLLEhfB5/XWCwKAaqFjA2nJ+tIxZhGMWhlV6RVE9f BneqasgTpBougdIdi05qjh0T5OHOjYC2eybyTZv19YXyqQ8uxPWLpQNZehE/a167KtKnzeCCfbeXq weqMpDoECU99n3VAM7Bx8e4NAGNRligMEExzjInZKp/xrJE4oN+n/R/lGnh1zW1URU5H5cPM03bOE 8gp1Q8EfwOQ1VH2SVx0nf8E0MIXu3C2k1mVl8rN7GwOiyhlDjHMqwmh1rPlaGak1l5UFlI2cCILSF LX1B78y7nq/Wyg==; In-Reply-To: <8734noiy1b.fsf@gmail.com> (message from Visuwesh on Thu, 01 Aug 2024 11:29:12 +0530) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289603 Archived-At: > From: Visuwesh > Cc: 72405@debbugs.gnu.org, Drew Adams > Date: Thu, 01 Aug 2024 11:29:12 +0530 > > [வியாழன் ஆகஸ்ட் 01, 2024] Visuwesh wrote: > > > [வியாழன் ஆகஸ்ட் 01, 2024] Eli Zaretskii wrote: > > > >>> Date: Wed, 31 Jul 2024 20:23:59 +0000 > >>> From: Drew Adams via "Bug reports for GNU Emacs, > >>> the Swiss army knife of text editors" > >>> > >>> Likely applies also to other minor-mode doc strings. > >>> > >>> emacs -Q > >>> C-h f org-indent-mode > >>> ____ > >>> > >>> That shows you doc that includes this, where `org-indent-mode' is a link > >>> intended to give you information about the _variable_ of that name: > >>> > >>> To check whether the minor mode is enabled in the current buffer, > >>> evaluate 'org-indent-mode'. > >>> > >>> Clicking that link doesn't take you to the _variable_ part of the *Help* > >>> buffer; it just puts you back at the start of the buffer (after > >>> redrawing it uselessly). > >>> > >>> It should take you to the description of the variable. And the sentence > >>> should include the word "variable" before `org-indent-mode'; otherwise, > >>> it makes little sense to speak of evaluating that symbol, and the text > >>> can confuse or mislead users. > >> > >> Thanks, but please report Org issues to the Org mailing list first. > >> If the Org developers determine it's a core Emacs problem (which is > >> hardly possible in this case, but who knows?), then it should be > >> reported here. > > > > That sentence is part of easy-mmode--arg-docstring that gets added to > > all the minor-mode docstrings. So it is not org-mode specific. For > > example, font-lock-mode also has the following text: > > > > To check whether the minor mode is enabled in the current buffer, > > evaluate ‘font-lock-mode’. > > Here's a patch to make it insert "the variable " after evaluate. But > I'm not sure if (symbolp getter) will catch all non-variable cases. > AFAIU, GETTER can be any generalised variable. > > diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el > index ba0f8bad393..2262fb8ed5b 100644 > --- a/lisp/emacs-lisp/easy-mmode.el > +++ b/lisp/emacs-lisp/easy-mmode.el > @@ -91,7 +91,7 @@ easy-mmode--arg-docstring > Disable the mode if ARG is a negative number. > > To check whether the minor mode is enabled in the current buffer, > -evaluate `%s'. > +evaluate %s`%s'. > > The mode's hook is called both when the mode is enabled and when > it is disabled.") > @@ -128,6 +128,7 @@ easy-mmode--mode-docstring > easy-mmode--arg-docstring > (if global "global " "") > mode-pretty-name > + (if (symbolp getter) "the variable " "") > ;; Avoid having quotes turn into pretty quotes. > (string-replace "'" "\\='" (format "%S" getter))))) > (let ((start (point))) Stefan, any comments to this suggestion?