[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Text property searching
From: |
Lars Ingebrigtsen |
Subject: |
Re: Text property searching |
Date: |
Mon, 16 Apr 2018 22:11:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Drew Adams <address@hidden> writes:
> What if someone doesn't want to gather strings but instead
> wants the match-zone limits?
Then use the match-zone limits that are returned by the function? I
don't quite understand what you're asking here.
> The current design sounds a bit analogous to tossing out
> `match-data' in favor of just `match-string'. Except that
> you even _return_ the strings, in a defstruct no less.
No, no strings are returned in the structs, only the start/end points
and the text property found.
> Similarly, I'd think we would want all of the same optional
> args and behavior as are provided by `search-forward':
> limiting the search scope, raising or suppressing an error,
> and repeating for a given count. That's a proven and widely
> used Emacs interface.
Yes, and it's rather superfluous since you already have primitives like
`narrow-to-region'. If the search functions didn't have those weird
parameters, the source of Emacs would be reduced by at least 67% by just
eliding all those " nil t"'s from every `{re-,}search-forward' call.
My math may be off by a couple of percent.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Re: Text property searching, (continued)
- Re: Text property searching, Lars Ingebrigtsen, 2018/04/16
- Re: Text property searching, Eli Zaretskii, 2018/04/16
- Re: Text property searching, Clément Pit-Claudel, 2018/04/16
- Re: Text property searching, Lars Ingebrigtsen, 2018/04/16
- Re: Text property searching, João Távora, 2018/04/16
- Re: Text property searching, Clément Pit-Claudel, 2018/04/16
- Re: Text property searching, Lars Ingebrigtsen, 2018/04/16
- Re: Text property searching, Eli Zaretskii, 2018/04/16
- Re: Text property searching, Lars Ingebrigtsen, 2018/04/16
- RE: Text property searching, Drew Adams, 2018/04/16
- Re: Text property searching,
Lars Ingebrigtsen <=
- Re: Text property searching, Lars Ingebrigtsen, 2018/04/16
- Re: Text property searching, Stefan Monnier, 2018/04/16
- Re: Text property searching, João Távora, 2018/04/16
- Re: Text property searching, Lars Ingebrigtsen, 2018/04/16
- Message not available
- Re: Text property searching, Lars Ingebrigtsen, 2018/04/16
- Re: Text property searching, Alan Mackenzie, 2018/04/17
- Re: Text property searching, Lars Ingebrigtsen, 2018/04/17
- Re: Text property searching, Alan Mackenzie, 2018/04/17
- Re: Text property searching, Lars Ingebrigtsen, 2018/04/17
- Re: Text property searching, Alan Mackenzie, 2018/04/16