unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Search Elisp buffers with pcase patterns
@ 2015-08-01 15:57 Michael Heerdegen
  2015-08-03 10:38 ` Stefan Monnier
  2015-08-19 14:14 ` Ted Zlatanov
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Heerdegen @ 2015-08-01 15:57 UTC (permalink / raw)
  To: Emacs Development

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

Hello,

I implemented a buffer search tool for emacs-lisp buffers based on pcase
patterns.  I would like to add it to Gnu Elpa if it's welcome when it is
completed.

Here is the prototype; for instructions see the header.  Comments on the
realization and improvement suggestions are very welcome!



[-- Attachment #2: el-search.el --]
[-- Type: application/emacs-lisp, Size: 20107 bytes --]

[-- Attachment #3: Type: text/plain, Size: 21 bytes --]




Thanks,

Michael.

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

* Re: Search Elisp buffers with pcase patterns
  2015-08-01 15:57 Search Elisp buffers with pcase patterns Michael Heerdegen
@ 2015-08-03 10:38 ` Stefan Monnier
  2015-08-04  0:47   ` Michael Heerdegen
  2015-08-19 14:14 ` Ted Zlatanov
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2015-08-03 10:38 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Emacs Development

> I implemented a buffer search tool for emacs-lisp buffers based on pcase
> patterns.  I would like to add it to Gnu Elpa if it's welcome when it is
> completed.

Cool!  Can you put it up in elpa.git?


        Stefan



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

* Re: Search Elisp buffers with pcase patterns
  2015-08-03 10:38 ` Stefan Monnier
@ 2015-08-04  0:47   ` Michael Heerdegen
  2015-08-05 12:56     ` Michael Heerdegen
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Heerdegen @ 2015-08-04  0:47 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Cool!  Can you put it up in elpa.git?

Done, thanks.

I've released this one quite early because feedback is very valuable in
this case.  The thing can be used beneficially, but expect some raw
edges (or how was that saying?).


Thanks,

Michael.




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

* Re: Search Elisp buffers with pcase patterns
  2015-08-04  0:47   ` Michael Heerdegen
@ 2015-08-05 12:56     ` Michael Heerdegen
  2015-08-07 15:13       ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Heerdegen @ 2015-08-05 12:56 UTC (permalink / raw)
  To: emacs-devel

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Done, thanks.

Why doesn't it appear in the package manager?  Is the reason that the
version "0.0.2" starts with a zero?  The README says only a version of
"0" would indicate that a package should not yet be released.


Thanks,

Michael.



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

* Re: Search Elisp buffers with pcase patterns
  2015-08-05 12:56     ` Michael Heerdegen
@ 2015-08-07 15:13       ` Stefan Monnier
  2015-08-07 15:26         ` Michael Heerdegen
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2015-08-07 15:13 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: emacs-devel

>> Done, thanks.
> Why doesn't it appear in the package manager?  Is the reason that the
> version "0.0.2" starts with a zero?  The README says only a version of
> "0" would indicate that a package should not yet be released.

No, it was the failure to follow the usual formatting conventions
(missing semi-colon on the first line, and missing final line).
M-x checkdoc-current-buffer would have helped.


        Stefan



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

* Re: Search Elisp buffers with pcase patterns
  2015-08-07 15:13       ` Stefan Monnier
@ 2015-08-07 15:26         ` Michael Heerdegen
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Heerdegen @ 2015-08-07 15:26 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> M-x checkdoc-current-buffer would have helped.

Indeed.  Sorry, I just forgot that.  Thanks.


Michael.




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

* Re: Search Elisp buffers with pcase patterns
  2015-08-01 15:57 Search Elisp buffers with pcase patterns Michael Heerdegen
  2015-08-03 10:38 ` Stefan Monnier
@ 2015-08-19 14:14 ` Ted Zlatanov
  2015-08-19 18:33   ` Michael Heerdegen
  2015-08-20 15:26   ` raman
  1 sibling, 2 replies; 9+ messages in thread
From: Ted Zlatanov @ 2015-08-19 14:14 UTC (permalink / raw)
  To: emacs-devel

On Sat, 01 Aug 2015 17:57:55 +0200 Michael Heerdegen <michael_heerdegen@web.de> wrote: 

MH> I implemented a buffer search tool for emacs-lisp buffers based on pcase
MH> patterns.  I would like to add it to Gnu Elpa if it's welcome when it is
MH> completed.

MH> Here is the prototype; for instructions see the header.  Comments on the
MH> realization and improvement suggestions are very welcome!

I would love a lot more examples.  This is a terrific tool, thank you
for writing it.

I'd love it to be generalized for other languages. I don't know if you
think that makes sense, but I can imagine doing similar search or
search+replace work against XML, HTML, JSON, or other structured data
formats.

Ted




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

* Re: Search Elisp buffers with pcase patterns
  2015-08-19 14:14 ` Ted Zlatanov
@ 2015-08-19 18:33   ` Michael Heerdegen
  2015-08-20 15:26   ` raman
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Heerdegen @ 2015-08-19 18:33 UTC (permalink / raw)
  To: emacs-devel

Ted Zlatanov <tzz@lifelogs.com> writes:

> I would love a lot more examples.

You mean examples of usage?  That should be doable.  Any suggestions?

> I'd love it to be generalized for other languages. I don't know if you
> think that makes sense, but I can imagine doing similar search or
> search+replace work against XML, HTML, JSON, or other structured data
> formats.

The package cries for that generalization, but I don't know how to do it
in a reasonable and efficient way.

For Elisp, I can just call `read' to get a suitable syntax tree.  For
other languages, I would also need something like an abstract syntax
tree.

Prior versions of semantic could generate ASTs, but they dismissed it
because it was too slow.  AFAIK I can maximally get something like a
flat tag list from semantic.  That's not enough to expand the thing to
other languages in a reasonable way.

But if someone has an enlightening idea...


Regards,

Michael.




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

* Re: Search Elisp buffers with pcase patterns
  2015-08-19 14:14 ` Ted Zlatanov
  2015-08-19 18:33   ` Michael Heerdegen
@ 2015-08-20 15:26   ` raman
  1 sibling, 0 replies; 9+ messages in thread
From: raman @ 2015-08-20 15:26 UTC (permalink / raw)
  To: emacs-devel

That would be awesome -- support for other structured data
formats. Another thing I'd love to have would be occur-like filtering
but using pcase patterns - would let one filter down large  data files
and explore efficiently -- 
-- 



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

end of thread, other threads:[~2015-08-20 15:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-01 15:57 Search Elisp buffers with pcase patterns Michael Heerdegen
2015-08-03 10:38 ` Stefan Monnier
2015-08-04  0:47   ` Michael Heerdegen
2015-08-05 12:56     ` Michael Heerdegen
2015-08-07 15:13       ` Stefan Monnier
2015-08-07 15:26         ` Michael Heerdegen
2015-08-19 14:14 ` Ted Zlatanov
2015-08-19 18:33   ` Michael Heerdegen
2015-08-20 15:26   ` raman

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).