unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 50599@debbugs.gnu.org
Subject: bug#50599: [PATCH] Don't recommend against "\[...]" substitutions for performance
Date: Wed, 15 Sep 2021 16:13:59 +0200	[thread overview]
Message-ID: <CADwFkmn84oZCWfXY-w_1qiv2gCq_woGQbGc8Jb=Nwq5W9pkXrQ@mail.gmail.com> (raw)
In-Reply-To: <83tuimb61d.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

> We have no idea what could Lisp programmers out there want to do with
> this.  For example, I could envision some programmatically generated
> help text with many such references.  Where there are limitations due
> to the implementation, we should strive to let people know about them.

But not every such limitation belongs in `(elisp) Documentation Tips'.

Even if one can imagine that there exists specialized applications
where this limitation will become a problem, that does not mean that
we should mention it here.   This section should IMO be about general
advice for Emacs Lisp programming, and this is not a general problem.

> I disagree with the "completely irrelevant" part, the general advice
> to keep the use of \\[..] to the minimum is still valid,

I see no reason to keep use of "\\[...]" to the minimum.  In any
realistic use, my investigation has demonstrated that there is no
problem with using it for reasons of performance.

Instead of discouraging it, we should encourage its use, as it leads
to better documentation.  For example, compare the current
'ibuffer-mode' docstring to what you get if you replace the list of
commands (with its categories, explanations, etc.) with a blanket
"\\{ibuffer-mode-map}".  So I find the advice not only irrelevant but
misleading.

How about this:

We change, in my patch, 'checkdoc-max-keyref-before-warn' to a value
like 1000 or 500 instead of nil.  This would make me happy by not
impacting any real use-cases [none of which will have 500+ commands in
its docstring, or at least none of the ones that I care about will]
and it would (hopefully) make you happy by sufficiently calling
attention to any possible performance issues in some other cases.

With that, perhaps we could agree that it is okay to delete the
paragraph in `(elisp) Documentation Tips'.  Running 'checkdoc' is
after all recommended in that section as well.  WDYT?





  reply	other threads:[~2021-09-15 14:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  6:27 bug#50599: [PATCH] Don't recommend against "\[...]" substitutions for performance Stefan Kangas
2021-09-15  6:38 ` Eli Zaretskii
2021-09-15  7:11   ` Stefan Kangas
2021-09-15  8:24     ` Eli Zaretskii
2021-09-15 14:13       ` Stefan Kangas [this message]
2021-09-15 15:41         ` Eli Zaretskii
2021-09-15 18:37           ` Stefan Kangas
2021-09-15 19:03             ` Eli Zaretskii
2021-09-16 14:08               ` Lars Ingebrigtsen
2021-09-15 15:46         ` bug#50599: [External] : " Drew Adams

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='CADwFkmn84oZCWfXY-w_1qiv2gCq_woGQbGc8Jb=Nwq5W9pkXrQ@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=50599@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).