[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A read-based grep-like for symbols (el-search?) (was Do shorthands b
From: |
Michael Heerdegen |
Subject: |
Re: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)) |
Date: |
Fri, 01 Oct 2021 01:23:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
João Távora <joaotavora@gmail.com> writes:
> The "searching for symbols" problem is one of those embarrassingly parallel
> ones, right?
> Also, I can of course imaging that the `read' ing sexps is lower than
> reading
> lines, but once you fill up an obarray with all the symbols you read,
> you don't
> pay for the string comparison, since matching symbols to the search pattern
> (presumably also a symbol) should be much faster since you can just use
> the hashing of the obarray.
Actually, el-search searches expressions. The search "pattern" is a
description (predicate) for expressions, and it searches for matching
expressions. I made it so that search patterns are pcase patterns -
while this fits perfectly, it's also the most deterring aspect for most
people :-P
Symbols are compared with `eq', so I think the answer to the question of
fast symbol comparison is "yes". One surprisingly time consuming part
in simple cases is setting up buffers (to support read and sexp-based
scanning).
IIRC, "elisp-refs" (Melpa) copied the basic approach and created
something more lightweight but easier to use (a bit like xref I think, I
don't use xref - not sure). I think adding shorthand support to that
package would also be trivial.
Michael.
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), (continued)
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Gregory Heytings, 2021/09/30
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/09/30
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Gregory Heytings, 2021/09/30
- RE: [External] : Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Drew Adams, 2021/09/30
- Re: [External] : Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/09/30
- Re: [External] : Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Michael Heerdegen, 2021/09/30
- Re: [External] : Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Michael Heerdegen, 2021/09/30
- A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)), João Távora, 2021/09/30
- Re: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)),
Michael Heerdegen <=
- Re: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)), João Távora, 2021/09/30
- Re: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)), Michael Heerdegen, 2021/09/30
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Tomas Hlavaty, 2021/09/30
Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Eli Zaretskii, 2021/09/28