all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Semantically grepping Emacs Lisp sources?
@ 2019-06-29 22:01 Tim Landscheidt
  2019-06-29 22:32 ` Noam Postavsky
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Landscheidt @ 2019-06-29 22:01 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

from time to time, I'm looking for examples on how to solve
some problem in Emacs Lisp.  I have a Git checkout of Emacs
and ELPA, i. e. "good" code en masse.

So suppose I'm interested in actual uses of define-skeleton
or insert-skeleton where the skeleton's interactor is not a
string, or the skeleton contains some invocation of
completing-read; this is quite hard (and theoretically im-
possible) to turn into a regular expression.

In similar cases in the past, I have sometimes built ad-hoc
greps with directory-files, find-file-noselect and read, but
this is definitely overkill for just browsing around.

Is there a utility either integrated in Emacs or external
that instead of a regular expression accepts some form of
"predicate" and then highlights all Lisp structures that
match it?  I. e., something like (pseudo-code) "(and (eql
(car s) 'define-skeleton) (not (string-p (whatever s))))"?

TIA,
Tim




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

* Re: Semantically grepping Emacs Lisp sources?
  2019-06-29 22:01 Semantically grepping Emacs Lisp sources? Tim Landscheidt
@ 2019-06-29 22:32 ` Noam Postavsky
  2019-07-19  3:10   ` Michael Heerdegen
  0 siblings, 1 reply; 3+ messages in thread
From: Noam Postavsky @ 2019-06-29 22:32 UTC (permalink / raw)
  To: Tim Landscheidt; +Cc: Help Gnu Emacs mailing list

On Sat, 29 Jun 2019 at 18:02, Tim Landscheidt <tim@tim-landscheidt.de> wrote:

> Is there a utility either integrated in Emacs or external
> that instead of a regular expression accepts some form of
> "predicate" and then highlights all Lisp structures that
> match it?  I. e., something like (pseudo-code) "(and (eql
> (car s) 'define-skeleton) (not (string-p (whatever s))))"?

I think el-search in GNU ELPA does something like this.

https://elpa.gnu.org/packages/el-search.html



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

* Re: Semantically grepping Emacs Lisp sources?
  2019-06-29 22:32 ` Noam Postavsky
@ 2019-07-19  3:10   ` Michael Heerdegen
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Heerdegen @ 2019-07-19  3:10 UTC (permalink / raw)
  To: Tim Landscheidt; +Cc: Help Gnu Emacs mailing list

Noam Postavsky <npostavs@gmail.com> writes:

> I think el-search in GNU ELPA does something like this.

Yes.  If you happen to try it and find bugs or you have problems getting
started please report back.

Michael.



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

end of thread, other threads:[~2019-07-19  3:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-29 22:01 Semantically grepping Emacs Lisp sources? Tim Landscheidt
2019-06-29 22:32 ` Noam Postavsky
2019-07-19  3:10   ` Michael Heerdegen

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.