From: Arthur Miller <arthur.miller@live.com>
To: "Daniel Martín" <mardani29@yahoo.es>
Cc: me@wilfred.me.uk, Stefan Kangas <stefan@marxist.se>,
Emacs developers <emacs-devel@gnu.org>
Subject: Re: Helpful in Emacs?
Date: Thu, 09 Sep 2021 22:23:08 +0200 [thread overview]
Message-ID: <AM9PR09MB49776136CF7247B2A985A8A196D59@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <m1a6klu64l.fsf@yahoo.es> ("Daniel Martín"'s message of "Thu, 09 Sep 2021 17:21:30 +0200")
Daniel Martín <mardani29@yahoo.es> writes:
> Showing references to a symbol is an interesting feature (for example,
> to learn how to use an ELisp API by looking at examples). I see that
> Helpful provides this feature via the separate package elisp-refs
> (https://github.com/Wilfred/elisp-refs). The closest package I know
> that actually understands ELisp is el-search from ELPA, but elisp-refs
> is a more specific package for the concrete use case of searching for
> references.
About elisp-refs, I have looked at that library this evening, after your
mail, and I think it does the right thing.
It uses read function to parse lisp files to find defs. I wrote a blog post just
yesterday about doing similar, but it was about collecting autoloads since I am
unhappy with built-in funcionality in autoload.el. I don't use
package-quickstart.el but build my own autoloads file that suits my use pattern
better. This request for helpful in Emacs started as I realized that helpful
lookups functions in source code rather than using docs stuffed in autoloads, so
I can have the cake and eat it too. Built in help can't show docs for a
autoloaded function that is not loaded yet.
My blog post is here: http://www.nextpoint.se/?p=890 (if you are interested and
have time :))
What do you need to build xref backend you mention? As mentioned on elisp-refs
gh page:
"xref-find-references: This command is included in Emacs 25.1, but it's based on
a text search. It is confused by comments and strings, and cannot distinguish
between functions and variables."
Would rebuilding this command to use read instead of text search do the thing?
I have never looked at xref code, so I have no idea how much work it is to
re-build it though.
Otherwise, about the read function and reading stuff from lisp files, two days
ago I have built a small program to extract all defined symbols (defvars,
defcustoms, defuns and defmacros) from all lisp files in a directory tree, and I
save them in above mentioned database. I thought it would be slow, but it really
is fast. All symbols in Emacs lisp subdirectory are indexed in like 2 seconds
and my entire elpa dir with ~200+ packages takes about 0.5 secs.
next prev parent reply other threads:[~2021-09-09 20:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 10:57 Helpful in Emacs? Arthur Miller
2021-09-09 11:34 ` Stefan Kangas
2021-09-09 12:35 ` Arthur Miller
2021-09-09 15:21 ` Daniel Martín
2021-09-09 15:48 ` Arthur Miller
2021-09-10 6:20 ` Stefan Kangas
2021-09-10 7:11 ` Arthur Miller
2021-09-10 7:19 ` Stefan Kangas
2021-09-10 7:58 ` Arthur Miller
2021-09-10 8:14 ` Jean-Christophe Helary
2021-09-10 12:32 ` Stefan Monnier
2021-09-10 7:26 ` Eli Zaretskii
2021-09-10 8:00 ` Arthur Miller
2021-09-10 11:14 ` Eli Zaretskii
2021-09-10 11:41 ` Arthur Miller
2021-09-09 19:21 ` Eduardo Ochs
2021-09-09 19:51 ` Arthur Miller
2021-09-09 20:23 ` Arthur Miller [this message]
2021-09-09 22:55 ` Dmitry Gutov
2021-09-10 0:52 ` Arthur Miller
2021-09-10 6:16 ` Eli Zaretskii
2021-09-10 6:06 ` Eli Zaretskii
2021-09-10 6:21 ` Arthur Miller
2021-09-10 6:30 ` Juri Linkov
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=AM9PR09MB49776136CF7247B2A985A8A196D59@AM9PR09MB4977.eurprd09.prod.outlook.com \
--to=arthur.miller@live.com \
--cc=emacs-devel@gnu.org \
--cc=mardani29@yahoo.es \
--cc=me@wilfred.me.uk \
--cc=stefan@marxist.se \
/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.