From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 35702@debbugs.gnu.org, juri@linkov.net
Subject: bug#35702: xref revert-buffer
Date: Mon, 27 May 2019 17:54:21 +0300 [thread overview]
Message-ID: <6d64213c-75f2-ab84-7ec3-2fee4e3742e0@yandex.ru> (raw)
In-Reply-To: <83ef4l2mii.fsf@gnu.org>
On 26.05.2019 19:44, Eli Zaretskii wrote:
>> It's akin to asking what values could revert-buffer-function have:
>> different ones.
>
> Although in theory there could indeed be an infinite number of values,
> in practice the current actual set is very small, and can be easily
> described.
And yet, it's not hugely important to the code that's calling it. Or for
understanding of said code (call the function, show the returned items;
call it again if the user wants to refresh the list). All that as long
as the function adheres to its protocol. It's like 'cons' in that
regard. Or 'seq-map.'
So previously, we passed a list of xrefs to xref--show-xrefs. Now we
pass a function that returns said list instead. It's a fairly trivial
change by itself, so if the previous state of affairs was okay, the new
one shouldn't require a lot of new documentation.
> If you want to avoid the (IMO imaginary) danger of
> implying there could be no other values, you can say explicitly that
> other values are possible.
That depends on the level of detail you would like. The minimal level
description is in the docstring, and it should be fine for understanding
any code that uses FETCHER.
There is some intermediate description in xref--create-fetcher's
docstring, though I don't know how much it helped.
But if you want a description that goes to the lower level and describes
*everything*, like how it uses obarray for Elisp and usually scans the
contents of TAGS otherwise... I don't think it's helpful for
understanding of the xref--create-fetcher variable, or the corresponding
function arguments.
It's simply not the appropriate place for it (not sure if an "overview"
section would be better, but the manual seems like the best place; we
could add some extra commentary in elisp-mode.el or etags.el if the
existing ones seem not enough).
> IOW, useful documentation should be general, but not too general. If
> being general means refraining saying something that could potentially
> help the reader understand the software and use it, then you are
> probably on the wrong side of "too general".
On the other hand, I wouldn't want to bog the description of a fairly
clean abstraction (if I do say that myself) with incidental details. Or
duplicate information that's already available elsewhere.
The general way we describe our code could, of course, be improved, but
I don't subscribe to the idea that we can have a general overview of the
system no matter where we start reading the code.
next prev parent reply other threads:[~2019-05-27 14:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-12 19:45 bug#35702: xref revert-buffer Juri Linkov
2019-05-24 1:51 ` Dmitry Gutov
2019-05-24 8:36 ` Eli Zaretskii
2019-05-24 10:09 ` Dmitry Gutov
2019-05-24 12:25 ` Eli Zaretskii
2019-05-24 12:57 ` Dmitry Gutov
2019-05-24 14:10 ` Eli Zaretskii
2019-05-24 14:26 ` Dmitry Gutov
2019-05-24 15:02 ` Eli Zaretskii
2019-05-24 22:35 ` Dmitry Gutov
2019-05-24 15:15 ` Dmitry Gutov
2019-05-24 19:35 ` Eli Zaretskii
2019-05-24 20:51 ` Dmitry Gutov
2019-05-25 7:39 ` Eli Zaretskii
2019-05-25 15:47 ` Dmitry Gutov
2019-05-25 16:06 ` Eli Zaretskii
2019-05-25 16:14 ` Dmitry Gutov
2019-05-25 16:49 ` Eli Zaretskii
2019-05-25 21:33 ` Dmitry Gutov
2019-05-26 16:44 ` Eli Zaretskii
2019-05-27 14:54 ` Dmitry Gutov [this message]
2019-05-27 16:31 ` Eli Zaretskii
2019-05-28 14:10 ` Dmitry Gutov
2019-05-28 18:41 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d64213c-75f2-ab84-7ec3-2fee4e3742e0@yandex.ru \
--to=dgutov@yandex.ru \
--cc=35702@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=juri@linkov.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.