From: Lars Ingebrigtsen <larsi@gnus.org>
To: Protesilaos Stavrou <info@protesilaos.com>
Cc: "James N. V. Cash" <james.cash@occasionallycogent.com>,
emacs-devel@gnu.org, Dmitry Gutov <dgutov@yandex.ru>
Subject: Re: [PATCH] Add option COUNT argument to text-property-search functions
Date: Sat, 31 Jul 2021 13:36:59 +0200 [thread overview]
Message-ID: <87o8aiiujo.fsf@gnus.org> (raw)
In-Reply-To: <87mtq30y5w.fsf@protesilaos.com> (Protesilaos Stavrou's message of "Sat, 31 Jul 2021 09:56:11 +0300")
Protesilaos Stavrou <info@protesilaos.com> writes:
> The idea is to have a command that moves point. So it could accept a
> numeric argument to go to the COUNTth match, like 're-search-forward'.
I grepped through the Emacs sources, and the COUNT parameter to
`re-search-forward' was used in 2% of the usage cases, which is about
10000% more than I had imagined -- so perhaps it does make sense to add
a COUNT parameter to `text-property-search-*' (especially for symmetry
with `re-search-*').
But I'm for composability and trying to keeping function interfaces
simple and easy to reason about -- there's a tendency to stuff more and
more functionality down into functions when it's trivial to just use the
functions instead. And these functions already have plenty of optional
parameters (and will probably grow even more in the future, if Emacs
history repeats itself), so I'm still not very excited about adding
COUNT.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-07-31 11:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 19:20 [PATCH] Add option COUNT argument to text-property-search functions James N V Cash
2021-07-30 19:51 ` Lars Ingebrigtsen
2021-07-30 19:55 ` James N. V. Cash
2021-07-30 21:56 ` Dmitry Gutov
2021-07-31 6:56 ` Protesilaos Stavrou
2021-07-31 11:36 ` Lars Ingebrigtsen [this message]
2021-07-30 19:59 ` Eli Zaretskii
2021-07-30 20:49 ` James Cash
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o8aiiujo.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=info@protesilaos.com \
--cc=james.cash@occasionallycogent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.