From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James N. V. Cash Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add option COUNT argument to text-property-search functions Date: Fri, 30 Jul 2021 15:55:50 -0400 Message-ID: <87fsvvlgop.fsf@gmail.com> References: <87im0rlias.fsf@gmail.com> <87fsvvk2bw.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4105"; mail-complaints-to="usenet@ciao.gmane.io" Cc: , Protesilaos Stavrou , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 30 21:56:58 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9Ycs-0000pv-Ey for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jul 2021 21:56:58 +0200 Original-Received: from localhost ([::1]:36310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9Ycq-0008L4-Nb for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Jul 2021 15:56:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9Ybq-0006VX-Iv for emacs-devel@gnu.org; Fri, 30 Jul 2021 15:55:54 -0400 Original-Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:42979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m9Ybo-0001rD-Qf for emacs-devel@gnu.org; Fri, 30 Jul 2021 15:55:54 -0400 Original-Received: by mail-qk1-x731.google.com with SMTP id o13so10558338qkk.9 for ; Fri, 30 Jul 2021 12:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=1x8aQFvv4zsg5KgVtScnjMbUa5nRvP5VXi1zg6byl4k=; b=PDp2fCrQauBz7f3wqWJJLhM/uJ5PoIH4pSoAua+uYgrAy4NrXUC8ABlKrHzfLgizL0 /gApMmlLGozZM9uS7rala/q0fCX94GUZ/wC1PHfzpK6IOoVgD1mx5jEexIrkVMJYnsbo MMPBftUAyOiIyB8CDT2/cLQVC+f8RmOHnME5f8jLDUffSKofU+EqJDXLz6K7AHShDoJJ Lq3q5v785QnRIHRtbsbbAUrdjKm4SFhGdWQPwt9d+YOpHZMg+pF1/hB1aEpzI/O2Wgcd AgljtD4FqRmdKYeTRzCbp7W14Erwb4ye5IOthXBvFq0S9Qx6Kc8F238I+HyxNQFlhWsC TxLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:cc:subject:in-reply-to :references:date:message-id:mime-version; bh=1x8aQFvv4zsg5KgVtScnjMbUa5nRvP5VXi1zg6byl4k=; b=qh2mLb3Z0ZjH5UqZMlhqvAfBv5FZHCFonOp5ftagCNkRt48eFTOqZ//+uZz4ZV8R3h 6+0wNh3HsOFIzX4V87RRHvAS3Rbe/aYrBEMVd1yXjGHeFAjbyywHjFOkWO6iQe1pXbDI c9+2Sj0ApjNM4sdqJjM6W6TrlJnB0TJ0O+Ug+CoiAIYKFR/uzmjc7GJgXDo9fE7WTLh1 HszD5q/HEeqGYDS9IXFWMOpqre3ue0VadjKRd3b49u3d4W7OLe2TOzGmKlBRQElPfpyl 42r8smeYtNdxjXYftc+D/6Zx1lVvbvKE1FZkHUXU5/GCTlkIQUYKiI0CKHN9x3XgMYpL S8pw== X-Gm-Message-State: AOAM532pL1lagOtdNoH9SgE8nUEPjcRdg8o1qf62Dr27ONInKpKZis9D AnzGdEwC8N0uQHOLsk3EsZiN+Q92+Yo6tg== X-Google-Smtp-Source: ABdhPJzVTUnZIit6N0OQuYcfjrx6LoI2DYCelR4g5R5Fl2gmJa6KGFUswcywuCSR2dzQGVvSdp539g== X-Received: by 2002:a05:620a:16b2:: with SMTP id s18mr3921947qkj.446.1627674951737; Fri, 30 Jul 2021 12:55:51 -0700 (PDT) Original-Received: from gonk ([2607:fea8:10c1:8b00:1439:7588:85ce:969f]) by smtp.gmail.com with ESMTPSA id u11sm1435444qkk.72.2021.07.30.12.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jul 2021 12:55:51 -0700 (PDT) In-Reply-To: <87fsvvk2bw.fsf@gnus.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=james.nvc@gmail.com; helo=mail-qk1-x731.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271871 Archived-At: Lars Ingebrigtsen writes: > James N V Cash writes: > >> This allows searching forward for the Nth occurance of the text >> property, analogously to re-search-forward/backward. > > I don't think I've ever registered seeing COUNT used in the wild for > those functions, and I think it's a design flaw to have them. So I'm > not in favour of adding those to more functions. Hah, fair enough! I was discussing something with Protesilaos previously that would've been made easier by having this support a count (versus wrapping it in a dotimes), but I certainly can see why you'd want to avoid adding yet another optional argument.