all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)
@ 2016-10-15  3:26 Wilfred Hughes
  2016-10-15  3:38 ` Drew Adams
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Wilfred Hughes @ 2016-10-15  3:26 UTC (permalink / raw)
  To: emacs-devel

Hi emacs-devel

I've written a package [elisp-refs] that does a semantic search of all
the elisp in the current Emacs instance.

elisp-refs works by parsing all the code on `load-path', then walking
the sexps. This allows it to precisely find relevant forms.

For example, you can use elisp-refs-function to find all the calls to
the function `format', ignoring any variables of the same name. It's
even smart enough to understand that (apply #'format ...) is a
function call.

Unlike xrefs, elisp-refs is sexp-oriented, so it always shows full
sexp that matched your search, even if the result is on multiple
lines. Results are also syntax highlighted.

I hope this package is useful to some of you. I'd like to put it on
GNU ELPA, and I already have copyright assignment sorted. Would this
be possible?

Thanks
Wilfred

[elisp-refs]: https://github.com/Wilfred/elisp-refs



^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)
  2016-10-15  3:26 [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Wilfred Hughes
@ 2016-10-15  3:38 ` Drew Adams
  2016-10-15  5:28 ` el-search 1.0 (was: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)) Michael Heerdegen
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Drew Adams @ 2016-10-15  3:38 UTC (permalink / raw)
  To: Wilfred Hughes, emacs-devel

Sounds interesting.

> semantic search of all the elisp in the current Emacs instance.

When I read that, I thought you meant the code in all _loaded_
Lisp libraries.

> parsing all the code on `load-path',

But this seems to be something entirely different - all the
code on disk under all the directories in `load-path'.

I don't see why someone would want to do the latter, instead
of the former.  I, for one, have tons of stuff on my `load-path'
that I rarely, if ever, load/use.  My `load-path' is just a
way to tell Emacs where to look for a library IF I should
happen to ask for it.

A quick look at the code suggests that you do in fact mean
the former.  In that case, better not speak of "load path".
What you are talking about are the "files that have been
loaded in Emacs", as your `elisp-refs--loaded-files' doc
string says.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* el-search 1.0 (was: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request))
  2016-10-15  3:26 [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Wilfred Hughes
  2016-10-15  3:38 ` Drew Adams
@ 2016-10-15  5:28 ` Michael Heerdegen
  2016-10-15  6:07 ` [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Eli Zaretskii
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Michael Heerdegen @ 2016-10-15  5:28 UTC (permalink / raw)
  To: Wilfred Hughes; +Cc: emacs-devel

Hi Wilfred,

> I've written a package [elisp-refs] that does a semantic search of all
> the elisp in the current Emacs instance.

Cool, inspired by el-search...looks very nice.  Will have a closer look.


FWIW, I decided to publish el-search 1.0 on Elpa now, though I wanted to
do so originally in a few days (hoping I left nothing half-baked), so
that we see where both packages complement each other, or if we even
should consider to merge them sometime later.  I've implemented
multi-searches now, but I don't have an occur like summary view, and it
would probably be too slow for its approach anyway.


Regards,

Michael.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)
  2016-10-15  3:26 [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Wilfred Hughes
  2016-10-15  3:38 ` Drew Adams
  2016-10-15  5:28 ` el-search 1.0 (was: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)) Michael Heerdegen
@ 2016-10-15  6:07 ` Eli Zaretskii
  2016-10-15  6:09 ` Michael Heerdegen
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2016-10-15  6:07 UTC (permalink / raw)
  To: Wilfred Hughes; +Cc: emacs-devel

> From: Wilfred Hughes <me@wilfred.me.uk>
> Date: Fri, 14 Oct 2016 23:26:01 -0400
> 
> I've written a package [elisp-refs] that does a semantic search of all
> the elisp in the current Emacs instance.
> 
> elisp-refs works by parsing all the code on `load-path', then walking
> the sexps. This allows it to precisely find relevant forms.
> 
> For example, you can use elisp-refs-function to find all the calls to
> the function `format', ignoring any variables of the same name. It's
> even smart enough to understand that (apply #'format ...) is a
> function call.
> 
> Unlike xrefs, elisp-refs is sexp-oriented, so it always shows full
> sexp that matched your search, even if the result is on multiple
> lines. Results are also syntax highlighted.

Can this package be adapted to be used as one back-end of xref?  I
think this is what we prefer as the future direction of xref-based
development of similar tools.

> I hope this package is useful to some of you. I'd like to put it on
> GNU ELPA, and I already have copyright assignment sorted. Would this
> be possible?

I don't see why not, but I don't know the details, so I'll let other
brief you about them.

Thanks.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)
  2016-10-15  3:26 [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Wilfred Hughes
                   ` (2 preceding siblings ...)
  2016-10-15  6:07 ` [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Eli Zaretskii
@ 2016-10-15  6:09 ` Michael Heerdegen
  2016-10-15 14:53 ` raman
  2016-10-15 15:30 ` Stefan Monnier
  5 siblings, 0 replies; 8+ messages in thread
From: Michael Heerdegen @ 2016-10-15  6:09 UTC (permalink / raw)
  To: Wilfred Hughes; +Cc: emacs-devel

Hi Wilfred,

> Hi emacs-devel
>
> I've written a package [elisp-refs] that does a semantic search of all
> the elisp in the current Emacs instance.

Works well - incredibly fast!  Nice summary (in some cases, when testing
with my setup, the summary failed to pop up, however; repeating the same
command worked then).

But aren't there dependencies to packages outside of Gnu Elpa ("loop"
for example)?


Regards,

Michael.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)
  2016-10-15  3:26 [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Wilfred Hughes
                   ` (3 preceding siblings ...)
  2016-10-15  6:09 ` Michael Heerdegen
@ 2016-10-15 14:53 ` raman
  2016-10-15 15:30 ` Stefan Monnier
  5 siblings, 0 replies; 8+ messages in thread
From: raman @ 2016-10-15 14:53 UTC (permalink / raw)
  To: Wilfred Hughes; +Cc: emacs-devel

I've been using this the last few weeks, it's really nice.
-- 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)
  2016-10-15  3:26 [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Wilfred Hughes
                   ` (4 preceding siblings ...)
  2016-10-15 14:53 ` raman
@ 2016-10-15 15:30 ` Stefan Monnier
  2016-10-15 19:25   ` Dmitry Gutov
  5 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2016-10-15 15:30 UTC (permalink / raw)
  To: emacs-devel

> I've written a package [elisp-refs] that does a semantic search of all
> the elisp in the current Emacs instance.

Sounds great!

> Unlike xrefs, elisp-refs is sexp-oriented, so it always shows full
> sexp that matched your search, even if the result is on multiple
> lines. Results are also syntax highlighted.

xref.el was designed with the hope that it could accommodate "any" tool, so
it would be really helpful if you could try and make elisp-refs work via
xref.el.  And if there's some problem doing so, please report it as
a bug so we can improve xref.el.

> I hope this package is useful to some of you.  I'd like to put it on
> GNU ELPA, and I already have copyright assignment sorted. Would this
> be possible?

Of course.  If you don't have write access yet to the repository, ask
for it by requesting membership in the "emacs" group from your
Savannah account.


        Stefan




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)
  2016-10-15 15:30 ` Stefan Monnier
@ 2016-10-15 19:25   ` Dmitry Gutov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Gutov @ 2016-10-15 19:25 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

On 15.10.2016 18:30, Stefan Monnier wrote:

>> Unlike xrefs, elisp-refs is sexp-oriented, so it always shows full
>> sexp that matched your search, even if the result is on multiple
>> lines. Results are also syntax highlighted.

xref doesn't prevent one from having syntax highlighting, at least.

> xref.el was designed with the hope that it could accommodate "any" tool, so
> it would be really helpful if you could try and make elisp-refs work via
> xref.el.  And if there's some problem doing so, please report it as
> a bug so we can improve xref.el.

I second that request. The problems of the "doesn't fit the model" kind 
should be the most interesting.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-10-15 19:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-15  3:26 [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Wilfred Hughes
2016-10-15  3:38 ` Drew Adams
2016-10-15  5:28 ` el-search 1.0 (was: [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request)) Michael Heerdegen
2016-10-15  6:07 ` [Ann] elisp-refs, a semantic elisp search tool (GNU ELPA request) Eli Zaretskii
2016-10-15  6:09 ` Michael Heerdegen
2016-10-15 14:53 ` raman
2016-10-15 15:30 ` Stefan Monnier
2016-10-15 19:25   ` Dmitry Gutov

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.