From unknown Fri Aug 15 03:57:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#37488 <37488@debbugs.gnu.org> To: bug#37488 <37488@debbugs.gnu.org> Subject: Status: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' Reply-To: bug#37488 <37488@debbugs.gnu.org> Date: Fri, 15 Aug 2025 10:57:35 +0000 retitle 37488 27.0.50; Inconsistent naming of arg of `text-property-search-= forward' and `-backward' reassign 37488 emacs submitter 37488 Michael Heerdegen severity 37488 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 23 02:03:55 2019 Received: (at submit) by debbugs.gnu.org; 23 Sep 2019 06:03:55 +0000 Received: from localhost ([127.0.0.1]:34916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCHRz-00065q-Bg for submit@debbugs.gnu.org; Mon, 23 Sep 2019 02:03:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:38618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCHRw-00065i-Us for submit@debbugs.gnu.org; Mon, 23 Sep 2019 02:03:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51692) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCHRv-0004nN-PN for bug-gnu-emacs@gnu.org; Mon, 23 Sep 2019 02:03:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_40,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,SPOOFED_FREEMAIL autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCHRu-00008n-Pz for bug-gnu-emacs@gnu.org; Mon, 23 Sep 2019 02:03:51 -0400 Received: from mout.web.de ([212.227.17.11]:52093) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iCHRu-00007V-DS for bug-gnu-emacs@gnu.org; Mon, 23 Sep 2019 02:03:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1569218628; bh=QCqAiWzVcF3ZtUjXysKx8T8kXRlriy0+61KnJHaw5mE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=q/FtCNkO+TD6G5+98F3dVh2tu7lLBEQ7OHDDgDPUm9WuUClFHs0b7vJ6bcugeZgwq 1fhxSLClqPTrhKLSRYoeeaZsEXPcqgLr+CPe/5CW2avlaELjI33luL/cWBL0oT3zsK PAiewFsSqE35WxBrIwjbdsNj9QiiJJC7EJH1IKw8= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([94.216.136.59]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MT8fq-1ieER33xpu-00SAHP; Mon, 23 Sep 2019 08:03:48 +0200 From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' Date: Mon, 23 Sep 2019 08:03:48 +0200 Message-ID: <87y2yfo8fv.fsf@web.de> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:jLxWHVkejHRpLx2i3a3BfYhaHpmljhHkwBcBcv5XcCOiTswuDdy 98PX55Pna2hNScHfvy9s4rJa5iuLznsC5P+O/17wfvNsCdzvzOnNpnkRNuW5JAeJyFAXWmW xp032izETECkMFLJtH66FcCF0QX0i7O3g40lEQwqIHkBlaphi+YkXMFM6dyTYeCinBZKViW DPAv2SGOMbJsYdaXVSU9A== X-UI-Out-Filterresults: notjunk:1;V03:K0:P4pWHa7yOSc=:axNdzOZpjUMLh+a2kpMRMS XByB5ZvOMDIr3+P6uZkIV68gDunizo9tUs/LztgYtYGHySx0shSADIqxN6QfES795aZFCwM/K AtPqDiQkfiHmL5uspydJGxZQwX601LtnjrWCVhKVNUL0EygnWsqnJqA14NUr6GOh7ZMOIDUsE Bll2dGyMpynRwQqYm30Yj09Z3pynF+dxBd8TWMGEzrM3CnmCGWe5cCGNlOIF9+ZDwEyWCaklB 3LybJHcq7Q3od4sGG2+o1LxePJ7pKWob30yxWxqlGa7SaINMic49CagarwhOvw8hZ35+FCd8W YlS8Uv+w/dQNgx5X0ttjZMGKlQ3509Z6dep94nYmmHCsAMgtgndmFlXIBErrJAwad3VQzW0Dw VTE+/MFkYLMyMpH1kd2LTwPH4s5lftFln4Fg6dH9a78QQGzsLe8FpYTqKlfu9TtzTxuqimIk6 UYKRBxGMd8mgJBPW28ZrFDtBIJ2xFtGX6wuQv+wSMcUYBFD2ihN+iLndxPnYBh77KPCNBzm1p 6sWoGKy/R43yWKdYkoZp4at0G/DJdPEVtOd+DOgFcpxTOIxMpNj4yvcKU2ohAjqCgJ8hmAGzz T5qg5jl2sOLwJmOEc6JowZswIqZVBK7uQCyLjygkPWeBKMb2xtc0681pokAI6cnTXdIPN4L3b xQbijbS0QNgt0D+SIkoS6hcNwQJIxi0piChabhkDUB3GzeX51mA7o9SqCPsDBSeZahcvpWUOu gNWzsIXBK4zrZpzTU9gy+PGBVD8a39oVfYePNX/38ar43n5Y93v4wHSIOmzr2tmylHca+SDJs JkhCry/renwoA249Gr2U5i2QaaUJkPZOW0vMjXUwiItDzJNSC5TWTiwqpDVn7Bl9TtqiUdPpe vZEmmm04ZRkXAWXowdOc4gSsL7SNo+Nhe4Rz1KGs25vgxISgkIviHXlGgbrRzc1Fsog4b/BsN EuxJgxLT2d86iJDMPz7F9PHAIk3GNnJltTo0KnwqN1dwFOPELxHf5OkYvvf38x790gsNYF1F/ DZgUIaOiLo6ibcMq3bxpb0otPsMJmNGQZ7eyPSfax5vYleuesOFs65RY8R1dW1Wr3CiAANQvN CtcGtEKFEW10JdkROvAceB8Ea08bFjYxM7lGXIfPnNUMAttHZrLAaejS78fNVIJCQiWTJGWx4 jn/Q2o9xP83PsC9Gt7qXHIJEqcY5ket0R9XaecuqJTufsb3HjIGN8JocXwW5nmzfdWT6Pq8ZY vM+VioSnJpcUkjO4pzC8aTosNGRMO7nQKp15WUZUbrsJtVML2Mgsgxt/tC7Q= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.11 X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit Cc: Lars Ingebrigtsen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Hi, the last optional argument of `text-property-search-forward' and `text-property-search-backward' is named "not-immediate", but the manual calls it "not-current" (seems since it was added by Lars). That's all - please fix the inconsistency. Thanks, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 23 03:31:04 2019 Received: (at 37488-done) by debbugs.gnu.org; 23 Sep 2019 07:31:04 +0000 Received: from localhost ([127.0.0.1]:34977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCIoJ-0008AS-T2 for submit@debbugs.gnu.org; Mon, 23 Sep 2019 03:31:04 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:37025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCIoI-00089t-JD for 37488-done@debbugs.gnu.org; Mon, 23 Sep 2019 03:31:03 -0400 Received: by mail-qk1-f180.google.com with SMTP id u184so14359628qkd.4 for <37488-done@debbugs.gnu.org>; Mon, 23 Sep 2019 00:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qVR848Sm/wc/9YgAMmoyeAydcsdMX5cFXtB1+zen0mk=; b=tz44pMpvgpJmH9GMnl3O1eEz4NIPnzvUzQ5Ei9jo4E7SUORjyA9Lqjx/oLUYVkZkwA athCb55AptiPMKCURPH0dptC2JrRvJ7nN00ZCcDfJaPU3SaFOrDXs2xSjV9ncJUCygjX zp7SY7ajmM0pztZDP4shQDpDH15h2fb7tO7Sc/yTOPzdMTkisHRgQqCUgmp6GF1Z712T cdsLxDugBoP4WndH9Ht/6WGw4jTEQAWE23tN2QIjHS+N/EAXv1tY12Pzqd2TfNxUMjZX tvqScIQc+1UrQ3hX6XqWttLSpbt2Xho1mt7Xm7OLaF+4ZuqJUVlGvgYZRcGvs+1DEaeS lyow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qVR848Sm/wc/9YgAMmoyeAydcsdMX5cFXtB1+zen0mk=; b=smNyXNGUnQzUpwN+ziXVD+Dpe4sW6ucx75g9w9eZZQqpoua5pPuQD+CRL11yTJnhR3 PofygSdXTfeTuTEPt8x3AOwmEovLER+qKL6FM4bPFbINgxJiserqPlgk3z95UEX6VRqn osmqSVgMRs2buI5vQZNYkaxXyH4xLLXELEOiHHVMVfVwR7TkD+3FOfUXG2444uDw1z/8 BfY3Jyt/CGsh1be9b1wvirvuju+DC+s60DDFkdoqKXa3jERqakbNCr8B+A2eoVdDjekm lIKtS6xk36yIbYDedIhC0c6cPem94GRY6dpzrGBOn1MoQSLknXPxLMh5uuxOhnMHGBa4 9zXg== X-Gm-Message-State: APjAAAXsbkhZSaRqWKF/1E1H4PolCjfoqvAJWXnPea0aDU3tfS2JZ4UN NP7+B/anCRwv/eVDBVpnQavMyt13hpIuRUDpQzk= X-Google-Smtp-Source: APXvYqyQUQLUh7HiDEg35NDXGCYF7uFRoWzZfnWZ7n4clKTm39/Gfh3jejqZ71t+v3hB7bhzg9sw7IrhJwbaK5egRM4= X-Received: by 2002:a05:620a:6db:: with SMTP id 27mr15506954qky.281.1569223856895; Mon, 23 Sep 2019 00:30:56 -0700 (PDT) MIME-Version: 1.0 References: <87y2yfo8fv.fsf@web.de> In-Reply-To: <87y2yfo8fv.fsf@web.de> From: Juanma Barranquero Date: Mon, 23 Sep 2019 09:30:20 +0200 Message-ID: Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' To: Michael Heerdegen Content-Type: multipart/alternative; boundary="000000000000903cbb0593336659" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488-done Cc: Lars Ingebrigtsen , 37488-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000903cbb0593336659 Content-Type: text/plain; charset="UTF-8" I've fixed it using NOT-CURRENT, which seems marginally clearer. --000000000000903cbb0593336659 Content-Type: text/html; charset="UTF-8"
I've fixed it using NOT-CURRENT, which seems marginally clearer.
--000000000000903cbb0593336659-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 23 03:47:44 2019 Received: (at 37488-done) by debbugs.gnu.org; 23 Sep 2019 07:47:44 +0000 Received: from localhost ([127.0.0.1]:34995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCJ4R-00007E-Tp for submit@debbugs.gnu.org; Mon, 23 Sep 2019 03:47:44 -0400 Received: from mout.web.de ([212.227.15.3]:50737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCJ4P-00006z-Md for 37488-done@debbugs.gnu.org; Mon, 23 Sep 2019 03:47:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1569224852; bh=hCl3dbP8VOVMFfjjrgrdWt7e6aq1/oCZNijAevHCp3o=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=qj9WBoY2E1JvDiXTgoiJvZOqdmPkmRFpGzsV05xvnm84GzsAn+WMTkXWEHg4E42is VYmVbJqNm4Wejvsjd6b6IAW5GVLvB58nEFw7goqrbWqOQqhUrJFnefgnh2vbog/hHv cMCBQ6mn9IJE4JY0DcLKWzzxXNVsWkIPod/D3px4= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([94.216.136.59]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lcxjk-1hm0k00kj2-00iBHc; Mon, 23 Sep 2019 09:47:32 +0200 From: Michael Heerdegen To: Juanma Barranquero Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> Date: Mon, 23 Sep 2019 09:47:32 +0200 In-Reply-To: (Juanma Barranquero's message of "Mon, 23 Sep 2019 09:30:20 +0200") Message-ID: <87h8535u97.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:8P+8e5Ws9abZOtJs3K3C2SKJosT/W0GirpoaYRXxARnyU5Vaz+s qLhlYMWA/KVO4P6681uUYwMbGJBlouPNJZICpt5iedZ56QmN6pkNVzHBQMeBlrWqe/Vo1TZ NrJZG+euV9+m6+/fIMspUU99+4LOIJ4Kpmha5Ui7/j/iM2XUUjpicEerlsR9M1ywZAVdvJf Ij6+CEFpMh38F+0bN5S9w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:97UkTKFn1q8=:0w70JrWO0MpMiQ5OvwVhJ/ a1vB940J/rtM0flSk602Bvv7NOPCoGXltzqLjJLJ0OB8FsDvuQaX3tWITj6kZlA3WH1WJa8uO o13gUW5IOm2YFA1Oh5vljPOPTbYmpLzxTYEPfAtP9C224fvncx51r7eQKwpCSge7fVGbm1Iml NELn9A2C8rWYy/u+JfebL0U2oHgkIwyJZ9ZNnWu0xLFZVdpvFwiTXp4vb5Rqvcp16OtwkS6T6 G3d6tqE2OEh+iSMfQ9sVnHdEkULRAoaN8N10YiQ55CibHEdn6Y04LwuLnbtQZIY51wIg1OY7K bxMp1sBWOoV4bmr++6uG5dxk9bgOQR9jEN3nHy0m4BjtZRhl8TmPD9okleIguJLB8TSn0YLFN SNzqJbom36ZLnZPlaD4uOHjseNLGQ2YZDgSdIExbfdoEKzCtWKJjlTBd+7DGKGf3Sn9l3GsZm zSMFGFsFmEH7pG6rHhW+YPxspHZAsWmhqmQ39Yvqq3wo0rylBphoXnWNm7ubZBkjd+14WbSSV tjJDjB5Ln6G09KZPToqlfcmIkhh0/d7zPhJIG5j1LA3oxrBKH498pPC9Ki4xpvTlf2k23hBJc zVakMC2VBrZG+BRpUdRqJJ7ltrS6gSeaGj9WU5U8OnqfKkcrIigXE7xTK6wTPQJrxUN8DE7FN jCrwHSPPqSxq3kUMAXb2+kzU3i8PAtdUWOYYh69jPwedqeMOqkyRCZP2BIM9mKLteIziUA7e2 Lwml7rQsIdWP6C9YMGqYGTLDX2cZZ8rWgix1+IW8fctB7p/1OzyZ2W+8cDaM1qTFv+CqLX/rr gkdikBXRxMFIJLI1oTfBuby5V4NGnByi91+0V6+9OCDR3gYOK8fUUlbVA+ZK03YCWDIwIsq7z i8VxM0jagd3JWnRrTyt45coih6ST1VOeSRlYd1VvbMv1UvsTl+Au/Ko0VFxB2KtX/91W80I6+ az4P8PCAeE2j2KlPFK80m5RWVOquc3SkVxdXlQbFptwCvtkKkRHF0HmEOLPuqEs//5JLK5LQH gtll60d2NDoV7Uenwd25jLGQZYdMkKYUB5Ql+Z/Tj2/nSYN9YcELyWbXFxMBo0MQ+ZATS37Aa KjahA9tUMZsnOkyLNvvQb3bH2yF3pnjVJU5j9JeVzc4CDVHCfKMLujW/g3FmcjNF5O7IPa3uv 5GmhkjLPem0pfP4TWI9fRHcL5/n+HxYEXrMqB1kM4rTdkQwZrhYSaGyO49vA2jS+sKpyDiVI9 qID4OzZlAykOeA+I5ntAyMXg4/2fLiQ4E+fOxBDUjsMaRPhQjnD+wFm2jrhI= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488-done Cc: Lars Ingebrigtsen , 37488-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juanma Barranquero writes: > I've fixed it using NOT-CURRENT, which seems marginally clearer. Yes, that's good. Thanks for fixing. Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 04:52:32 2019 Received: (at 37488) by debbugs.gnu.org; 25 Sep 2019 08:52:32 +0000 Received: from localhost ([127.0.0.1]:40815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD32G-00079H-Co for submit@debbugs.gnu.org; Wed, 25 Sep 2019 04:52:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD32D-000794-K5 for 37488@debbugs.gnu.org; Wed, 25 Sep 2019 04:52:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iD328-00017G-3Q; Wed, 25 Sep 2019 04:52:24 -0400 Received: from [176.228.60.248] (port=4475 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iD327-0000Sk-Jl; Wed, 25 Sep 2019 04:52:23 -0400 Date: Wed, 25 Sep 2019 11:52:08 +0300 Message-Id: <834l10oj0n.fsf@gnu.org> From: Eli Zaretskii To: Juanma Barranquero , Lars Ingebrigtsen In-reply-to: (message from Juanma Barranquero on Mon, 23 Sep 2019 09:30:20 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juanma Barranquero > Date: Mon, 23 Sep 2019 09:30:20 +0200 > Cc: Lars Ingebrigtsen , 37488-done@debbugs.gnu.org > > I've fixed it using NOT-CURRENT, which seems marginally clearer. Thanks. I had more problems with these doc strings, so I rewrote them. Please take a look. I have a couple of questions regarding the documentation, which I couldn't easily figure out. Please help me understand them and improve the documentation further: . The original doc string said about nil as PREDICATE: `nil' means almost the same as \"not equal\", but will also end the match if the value of PROPERTY changes. What does it mean to "end the match if the value changes"? The text went on to say "See the manual for extensive examples", but the manual doesn't mention this aspect of nil, it just says "not equal". . The doc string stated: If NOT-CURRENT, if the match is under point, it will not be returned, but instead the next instance is returned, if any. But the code, AFAIU, just checks whether the value of PROPERTY at point matches that of the found region, which doesn't necessarily mean point is part of the region, it could just mean there are two regions with matching values of PROPERTY, and point belongs to one of them. Right? . What is the reason for having VALUE an optional argument? Is it a frequent/useful operation to look for a VALUE of nil? From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 05:35:16 2019 Received: (at 37488) by debbugs.gnu.org; 25 Sep 2019 09:35:16 +0000 Received: from localhost ([127.0.0.1]:40832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD3hb-00089M-QO for submit@debbugs.gnu.org; Wed, 25 Sep 2019 05:35:16 -0400 Received: from mout.web.de ([212.227.17.11]:41675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD3hY-000891-NL for 37488@debbugs.gnu.org; Wed, 25 Sep 2019 05:35:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1569404103; bh=DN3sLHJLldUls5eLtqCnwzsr1oYomTmuHQ4rVoaB2JA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=A5FrDcChxs14PAbh3d2bWW8mfjVpU4sd8YELXLsJ8oC3R8tR/pg4GNEVQc6qbv8KL 15pcA7mvRK7SS59OiYSJOJoJvOnyAe8bTqO8MaMFlsdHKTVirTpgqFNvwiLmZHLDXr Q9jzNZqrdZ4XYjaxo64BCdehknovZ+5IELp6KlKE= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([94.216.136.59]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M1GAG-1htTRu3iDA-00tE3j; Wed, 25 Sep 2019 11:35:03 +0200 From: Michael Heerdegen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> Date: Wed, 25 Sep 2019 11:35:01 +0200 In-Reply-To: <834l10oj0n.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Sep 2019 11:52:08 +0300") Message-ID: <87ef04u3ay.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:BwTlAOSg6NgdoLJosTvvyDlvHRiHj7xF5B/tOGYaQh89/TVptJY MCQXQYIgQCD9au7teLGsKIPJubLCg0bIyZajwJ4K1JQoZwInBUC9YX8+or9iWMl61vDYNBE 1qRWedJ8XuKu7qsdYPAL35jVUNfl47782xQXjGACaq0lkalQoe2y+mj+Yq2LOYbeAiUY2/D 6WhfmWZa06sP3FT8BRaSw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:knNxbqs+GMI=:2cx+PenX5HwSVTz3Xoo94i HRrmAogU+8rP5mIz8/xBJVWoiV3LwG7CBDfPduH1uXl8LFsQQnPhsZTuyAUAFvhsnCo5c0MQ1 RdTwh7ctdBvIe+ULa8DpOo2Fs2Ukl8VsON9DUB/eWjnArfGed1zEy/1SloWK900eLJhCQgQ7v 1wo3HB25+5ZQ0coVRtJ3TgzYUNCQJIQdwMDAcuN23ELJDskjDjVrtUs1uAWAyAYAOjm04um90 E5chmMriPIjHyOzT8KMEn7WZSiSqVoii/+ggRpda6w6AEV68k1S/eJIorZp877N+sAdMGHY+z /uztnIOPkEfBGdKLvSRZOah4Ugfg19VfwNuOgt9FdSBF8uG+x+elrp7NKlh7iaeaZggvTqjmD 8mSXjMg/zF///bsCaxzRnqG9eZJQyrWpnk+B3HrgCD+G2IOkLtjnK1auEXTaMx9BN1eoEdFXt CVkRyZshZHXSrLYMUSipTX0kXbFBjprjHdGu5TnmF8dlsRslIKAQEkKjLcymcEqOZ/JG7yNXV jFLgJGZcnbT4IWsEYJZc4cyI/ZIZ6VodpOCZw50mvqpoIWsVrjOx6/qukcmBdrnq5/xjx1IIk QA6zy9wKpT4r77UBDhv4g+0xuLxR/YydITVK0satGcVLXim4u1NMblE8eDtCz7sQxf3Q5rWV8 rbNX4ih9gnxR3onQ5WV7qddQq61HchFjHDsV948EID0BcQdG671G09dEtD03CwOtC5xOQjiVb dMTVXhnkFuKLYbB1ZZt2B3Ho+sHyy9jnjf37cvbUgnhczsfah7HFdA38VJ+Hrs3gC2H1H/WU2 vdvkPosn0c3P3JCxDAREtJhDOmzvmh5HZYwLLoI3tAHefJj18QOOsEeNFAEcisiSdAvKtZZAs IpH9XmDsOMNBQRlc2+WlDkTleYIlc5PqWe9rzn53RXPCr+4Suo7qNHciaOT1Mq+8vXSKthElQ LzPo9bGB7FJVyyyeTgtMO5AZsYWSJe5/OK/WQuk6tOXghHZtu4cwcYHRf6nxzP5yPhFEn7RHY czaLe0AhspNBmjK2MVFLeaLP4WmavaXHzXkbvtrwy3UNxe8US69e6vIfk2RvetUcVOb207Drk ps4qO4LDQ4K+38JQdIoex271gVBRYNJy+E9+7GthmKW6fv5txs2nwjoBaeKdA7yhL4FE1NgaZ M6egEZpWmt5yc1bFJaq95v6ZpWB8PIE2FDMlAYxPudWXchhBn76L9jWHA4SHeN8ll23N0APGV ejFhx0Rz0TsmA97+7aKeO0rWYYWjzN5GgcClThN42ZH+c+H3EqzrApxJoHcE= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37488 Cc: Juanma Barranquero , Lars Ingebrigtsen , 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: > . What is the reason for having VALUE an optional argument? Is it a > frequent/useful operation to look for a VALUE of nil? I also wondered about the optional args, semantics is a bit unusual: note that PREDICATE -> nil means "not equal", so with VALUE -> nil this actually searches for non-nil values of the text property, which is a reasonable (and the expected) default behavior. I needed to read it twice. Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 05:44:21 2019 Received: (at 37488) by debbugs.gnu.org; 25 Sep 2019 09:44:22 +0000 Received: from localhost ([127.0.0.1]:40845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD3qP-0008MX-KN for submit@debbugs.gnu.org; Wed, 25 Sep 2019 05:44:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD3qL-0008MJ-9y for 37488@debbugs.gnu.org; Wed, 25 Sep 2019 05:44:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iD3qG-0007RX-2u; Wed, 25 Sep 2019 05:44:12 -0400 Received: from [176.228.60.248] (port=3771 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iD3qF-0001l2-B1; Wed, 25 Sep 2019 05:44:11 -0400 Date: Wed, 25 Sep 2019 12:43:56 +0300 Message-Id: <83y2ycn21v.fsf@gnu.org> From: Eli Zaretskii To: Michael Heerdegen In-reply-to: <87ef04u3ay.fsf@web.de> (message from Michael Heerdegen on Wed, 25 Sep 2019 11:35:01 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87ef04u3ay.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: lekktu@gmail.com, larsi@gnus.org, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Heerdegen > Cc: Juanma Barranquero , Lars Ingebrigtsen > , 37488@debbugs.gnu.org > Date: Wed, 25 Sep 2019 11:35:01 +0200 > > note that PREDICATE -> nil means "not equal", so with VALUE -> nil this > actually searches for non-nil values of the text property, which is a > reasonable (and the expected) default behavior. Is it? IME, we usually search for a specific value, not for any value. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 06:16:41 2019 Received: (at 37488) by debbugs.gnu.org; 25 Sep 2019 10:16:41 +0000 Received: from localhost ([127.0.0.1]:40865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD4Lg-0000hM-Ks for submit@debbugs.gnu.org; Wed, 25 Sep 2019 06:16:40 -0400 Received: from mout.web.de ([212.227.17.11]:35697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD4Le-0000h5-DS for 37488@debbugs.gnu.org; Wed, 25 Sep 2019 06:16:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1569406590; bh=riaI6i3vdj1rO5sN/mAXFnMkzVh3tifAzK4jK6qPMUM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=LTB/8kyzCsqX3EyWohvmg4rRWVby8kQx1W6lPCzmqMl9PyyIN0BbZbyyP+c9D2pjB 8kO24kIkT5RXXDF1U7Ih8PIXYxHSX0J95x0a3eIXhv4UJ8DB/7GM1W/UwIICzQmJWD AoKwR4ZZigUUAIVNrDD489FExzO7mhCdiGPe5zlM= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([94.216.136.59]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LwqJw-1i6cEQ2jkm-016RQO; Wed, 25 Sep 2019 12:16:30 +0200 From: Michael Heerdegen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87ef04u3ay.fsf@web.de> <83y2ycn21v.fsf@gnu.org> Date: Wed, 25 Sep 2019 12:16:30 +0200 In-Reply-To: <83y2ycn21v.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Sep 2019 12:43:56 +0300") Message-ID: <87zhissmtd.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:50OYBULSfI/964ArjQCVQAr3c30JsP8ERsWWmNGN1ILYeQFJrkp Bas/NwfuYuk1cXTP5BJibvbPsWCrh69oxE+iY/ZCERW5NEjTs7reZ+IY+Mvhexvs3TM1bDQ Ywyk/SPQpRRugG4/I/Qm8IFYuTNL3jF716VAb1YdQNcoNldklZwRVWLCTL5lySyM5xy86R4 8wIaRbth2pEuw7P6oPyCQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:k7XQ/4JM1lo=:CCweK6LXYzS+emwEISdtur +CGiNkbx/CLT+CNMQZ+h8Q46rXX/o6oE3lJlnMj0OVeLcHUPD0X35wXAW8Z9RsnHIpbati3g1 O6j/k8zjK1XnCAXi5GBSPGDJefitvWx77S1a0/KcnjML+tjslCzcrNM96ZzWBjsmhoC+N7O5Z d2CTcLiC/1XOkY04r3QjzKEMNsiUNGSwR93DnDtwHsWzOGfOfR9V+zXyLSvYigyfaB5IPIq4i w/im+iyAeTdkw1YKH+KhSstoDMYaSb7s8nxv+1M1Iq0PXLSVhmlS9TogzS1772YCGvoDZnbx5 EOM5qm2WvKn6DUP5VP4qP4T1QqyEtT2MxjIssfFUxptL9kb6GwTVSRnaswuerFGzxEcHGO/Sn sBYNXEonnF09l6SFXZIiXa7ybLIVB9Rh/UPDz6uzi3tucTxE7pTpORykz/BlDkz4Xds2CLFNj HuaSM4NwnaXBMztEXS2aYHuyp0e9qYjyLTb54eyiuohKixhbca2QYI1x74JzqYmut3bBj52AN uSHTFjf2LfdjsZuWUAovmSn+RlXcSyG0aHutrIE4kKnm+DnNuTHBWl6RyWZ9yu3dOqUpCMvn/ xorVALF759xzedatXpd6i1CMVAkSBigc3JxMyZmQdQ6Mb1VBuHKMenugyoAR0VIug1G7mSMoV 2m2h4PND6/g1SmcNzBdobtfjvAXHYFkCwLWfH17TILU4BTtol5yz3e9PLrFk4EKtmYmrTohry B8CDTHCbA5YVQW1+YRpzsT1SsUU5rPSaD7yywnS8nJB92wzp/Go/XvmL31BEwfSE3VL6QNv3J fR1YkQswy5miK84Jlmtlwe4ATSuwZwhesbINqiOmUEf0Ly/IQhUqMr/bSn2+i7P9pyhIy6OTb QadiOECIR6VGDy+Ft+a6gDSxlPrfdTqA+leuSirIF/4yUSwAfEYOPYeqTVmSOdpDfOSYk4kqz jcrQORN+EFW9x68tUTMGNNrzKKDH3TjW24ppy3OpZsQLLvZPwwrNgFbC2TDXHmzy+G/hRuUEJ dGNMlm3cYjRau79bv413BEuclyeSL+dYozja12rFRgsGiVsSHO1cUUK9x9BpzU9NUab3/6Red iCrPYzGrGsl3IRzaWSR/DBnbPUGWnR2qoJ0OxLq0qJaHoDoSpjgZTHijsFf98tGEUm9LU4qqJ Ehr45/4/Zc8cgaQTO94crdBx/FxQwZjclLr0+2nUnVgwmJgGRBBTAzbzYKCbnwtObn1VVj7RO vpAA2GX/277Fzia1mljAf/3S5sUzvK3Qi8FmykdaMNQMIc6Y+BKxLCMaj6g0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37488 Cc: lekktu@gmail.com, larsi@gnus.org, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: > > note that PREDICATE -> nil means "not equal", so with VALUE -> nil this > > actually searches for non-nil values of the text property, which is a > > reasonable (and the expected) default behavior. > > Is it? IME, we usually search for a specific value, not for any > value. For me, yes, the function fills a certain gap. But I'm not an expert on that matter. Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 06:26:45 2019 Received: (at 37488) by debbugs.gnu.org; 25 Sep 2019 10:26:45 +0000 Received: from localhost ([127.0.0.1]:40870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD4VN-00011C-G6 for submit@debbugs.gnu.org; Wed, 25 Sep 2019 06:26:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD4VJ-00010w-2T for 37488@debbugs.gnu.org; Wed, 25 Sep 2019 06:26:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iD4VD-0002xw-Lb; Wed, 25 Sep 2019 06:26:31 -0400 Received: from [176.228.60.248] (port=2390 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iD4VB-0006mf-06; Wed, 25 Sep 2019 06:26:31 -0400 Date: Wed, 25 Sep 2019 13:26:14 +0300 Message-Id: <83v9tgn03d.fsf@gnu.org> From: Eli Zaretskii To: Michael Heerdegen In-reply-to: <87zhissmtd.fsf@web.de> (message from Michael Heerdegen on Wed, 25 Sep 2019 12:16:30 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87ef04u3ay.fsf@web.de> <83y2ycn21v.fsf@gnu.org> <87zhissmtd.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: lekktu@gmail.com, larsi@gnus.org, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Heerdegen > Cc: lekktu@gmail.com, larsi@gnus.org, 37488@debbugs.gnu.org > Date: Wed, 25 Sep 2019 12:16:30 +0200 > > Eli Zaretskii writes: > > > > note that PREDICATE -> nil means "not equal", so with VALUE -> nil this > > > actually searches for non-nil values of the text property, which is a > > > reasonable (and the expected) default behavior. > > > > Is it? IME, we usually search for a specific value, not for any > > value. > > For me, yes, the function fills a certain gap. Regardless, I think your and my surprise at the default is already a good sign that the API is sub-optimal. After all, passing nil as a mandatory argument is not an issue. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 09:16:06 2019 Received: (at 37488) by debbugs.gnu.org; 25 Sep 2019 13:16:06 +0000 Received: from localhost ([127.0.0.1]:41038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD79J-0003Ok-1A for submit@debbugs.gnu.org; Wed, 25 Sep 2019 09:16:05 -0400 Received: from quimby.gnus.org ([80.91.231.51]:34520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD79H-0003OT-IA for 37488@debbugs.gnu.org; Wed, 25 Sep 2019 09:16:03 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iD79D-0002qR-Bx; Wed, 25 Sep 2019 15:16:01 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> Date: Wed, 25 Sep 2019 15:15:58 +0200 In-Reply-To: <834l10oj0n.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Sep 2019 11:52:08 +0300") Message-ID: <87lfucv7n5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > . The original doc string said about nil as PREDICATE: > > `nil' means almost the same as \"not equal\", but will also > end the match if the value of PROPERTY changes. > > What does it mean to "end [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, Juanma Barranquero , 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > . The original doc string said about nil as PREDICATE: > > `nil' means almost the same as \"not equal\", but will also > end the match if the value of PROPERTY changes. > > What does it mean to "end the match if the value changes"? The > text went on to say "See the manual for extensive examples", but > the manual doesn't mention this aspect of nil, it just says "not > equal". If point is inside a region where PROPERTY has a non-nil value, using nil as the predicate will end the search when PROPERTY changes value. > . The doc string stated: > > If NOT-CURRENT, if the match is under point, it will not be > returned, but instead the next instance is returned, if any. > > But the code, AFAIU, just checks whether the value of PROPERTY at > point matches that of the found region, which doesn't necessarily > mean point is part of the region, it could just mean there are two > regions with matching values of PROPERTY, and point belongs to one > of them. Right? I'm not sure I understand the question... What it's meant to do is basically how TAB works in buttons, which is a common use case. If you're looking for "o", and point is where "|" is below, then it'll find the last "oo" section after the x-es: oo|oxxxxxoo > . What is the reason for having VALUE an optional argument? Is it a > frequent/useful operation to look for a VALUE of nil? If PREDICATE is nil, then having to use an explicit nil VALUE isn't necessary. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 09:17:19 2019 Received: (at 37488) by debbugs.gnu.org; 25 Sep 2019 13:17:19 +0000 Received: from localhost ([127.0.0.1]:41046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD7AV-0003R5-L4 for submit@debbugs.gnu.org; Wed, 25 Sep 2019 09:17:19 -0400 Received: from quimby.gnus.org ([80.91.231.51]:34548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD7AR-0003Qv-DP for 37488@debbugs.gnu.org; Wed, 25 Sep 2019 09:17:17 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iD7AN-0002rH-Rh; Wed, 25 Sep 2019 15:17:14 +0200 From: Lars Ingebrigtsen To: Michael Heerdegen Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87ef04u3ay.fsf@web.de> <83y2ycn21v.fsf@gnu.org> <87zhissmtd.fsf@web.de> Date: Wed, 25 Sep 2019 15:17:11 +0200 In-Reply-To: <87zhissmtd.fsf@web.de> (Michael Heerdegen's message of "Wed, 25 Sep 2019 12:16:30 +0200") Message-ID: <87h850v7l4.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Michael Heerdegen writes: > Eli Zaretskii writes: > >> > note that PREDICATE -> nil means "not equal", so with VALUE -> nil this >> > actually searches for non-nil values of the text property, which is a >> > re [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488 Cc: lekktu@gmail.com, Eli Zaretskii , 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Heerdegen writes: > Eli Zaretskii writes: > >> > note that PREDICATE -> nil means "not equal", so with VALUE -> nil this >> > actually searches for non-nil values of the text property, which is a >> > reasonable (and the expected) default behavior. >> >> Is it? IME, we usually search for a specific value, not for any >> value. > > For me, yes, the function fills a certain gap. But I'm not an expert on > that matter. In my experience, we almost never search for a specific value for a text property, but any text that has that property. That's why I added the nil PREDICATE to avoid having to supply that awkward lambda into every function I wrote... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 11:02:00 2019 Received: (at 37488) by debbugs.gnu.org; 25 Sep 2019 15:02:00 +0000 Received: from localhost ([127.0.0.1]:42320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD8nn-0001g4-N3 for submit@debbugs.gnu.org; Wed, 25 Sep 2019 11:02:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD8nl-0001b9-5U for 37488@debbugs.gnu.org; Wed, 25 Sep 2019 11:01:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iD8nf-0004az-1l; Wed, 25 Sep 2019 11:01:51 -0400 Received: from [176.228.60.248] (port=3226 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iD8ne-0000wX-Bg; Wed, 25 Sep 2019 11:01:50 -0400 Date: Wed, 25 Sep 2019 18:01:34 +0300 Message-Id: <83sgokmnch.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-reply-to: <87lfucv7n5.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 25 Sep 2019 15:15:58 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Juanma Barranquero , 37488@debbugs.gnu.org, > michael_heerdegen@web.de > Date: Wed, 25 Sep 2019 15:15:58 +0200 > > Eli Zaretskii writes: > > > . The original doc string said about nil as PREDICATE: > > > > `nil' means almost the same as \"not equal\", but will also > > end the match if the value of PROPERTY changes. > > > > What does it mean to "end the match if the value changes"? The > > text went on to say "See the manual for extensive examples", but > > the manual doesn't mention this aspect of nil, it just says "not > > equal". > > If point is inside a region where PROPERTY has a non-nil value, using > nil as the predicate will end the search when PROPERTY changes value. OK, but then it should be obvious, and explicitly mentioning that in the doc string just makes it more confusing. Or am I missing something? > > . The doc string stated: > > > > If NOT-CURRENT, if the match is under point, it will not be > > returned, but instead the next instance is returned, if any. > > > > But the code, AFAIU, just checks whether the value of PROPERTY at > > point matches that of the found region, which doesn't necessarily > > mean point is part of the region, it could just mean there are two > > regions with matching values of PROPERTY, and point belongs to one > > of them. Right? > > I'm not sure I understand the question... The code doesn't seem to make sure point is inside the same region as the one found by the initial attempt, it just compares the values of PROPERTY at point and in the found region, and if they match, it looks for another region. Is that a correct description of what the code does when NOT-CURRENT is non-nil? If the description is correct, then the doc string doesn't describe what the code does accurately. > What it's meant to do is basically how TAB works in buttons, which is a > common use case. If you're looking for "o", and point is where "|" is > below, then it'll find the last "oo" section after the x-es: > > oo|oxxxxxoo What does "o" stand for in this case? > > . What is the reason for having VALUE an optional argument? Is it a > > frequent/useful operation to look for a VALUE of nil? > > If PREDICATE is nil, then having to use an explicit nil VALUE isn't > necessary. I don't understand how this answers my questions. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 11:05:53 2019 Received: (at 37488) by debbugs.gnu.org; 25 Sep 2019 15:05:53 +0000 Received: from localhost ([127.0.0.1]:42324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD8rY-0002Bh-Tx for submit@debbugs.gnu.org; Wed, 25 Sep 2019 11:05:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iD8rW-0002BT-Iz for 37488@debbugs.gnu.org; Wed, 25 Sep 2019 11:05:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iD8rR-0005k7-Gf; Wed, 25 Sep 2019 11:05:45 -0400 Received: from [176.228.60.248] (port=3455 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iD8rK-0005Au-PU; Wed, 25 Sep 2019 11:05:44 -0400 Date: Wed, 25 Sep 2019 18:05:21 +0300 Message-Id: <83r244mn66.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-reply-to: <87h850v7l4.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 25 Sep 2019 15:17:11 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87ef04u3ay.fsf@web.de> <83y2ycn21v.fsf@gnu.org> <87zhissmtd.fsf@web.de> <87h850v7l4.fsf@gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Eli Zaretskii , lekktu@gmail.com, 37488@debbugs.gnu.org > Date: Wed, 25 Sep 2019 15:17:11 +0200 > > Michael Heerdegen writes: > > > Eli Zaretskii writes: > > > >> > note that PREDICATE -> nil means "not equal", so with VALUE -> nil this > >> > actually searches for non-nil values of the text property, which is a > >> > reasonable (and the expected) default behavior. > >> > >> Is it? IME, we usually search for a specific value, not for any > >> value. > > > > For me, yes, the function fills a certain gap. But I'm not an expert on > > that matter. > > In my experience, we almost never search for a specific value for a text > property, but any text that has that property. That's why I added the > nil PREDICATE to avoid having to supply that awkward lambda into every > function I wrote... We have different experiences, then. In any case, the API uses double negation in the default case (find text whose value of PROPERTY does NOT match no-value), which is baaad... From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 01:56:19 2019 Received: (at 37488) by debbugs.gnu.org; 26 Sep 2019 05:56:19 +0000 Received: from localhost ([127.0.0.1]:42609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDMlH-0001DZ-Io for submit@debbugs.gnu.org; Thu, 26 Sep 2019 01:56:19 -0400 Received: from mout.web.de ([212.227.17.12]:40991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDMlC-0001DF-Un for 37488@debbugs.gnu.org; Thu, 26 Sep 2019 01:56:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1569477360; bh=Ucds9wCopSWbc3LcxDyLYWf7TPGNtLHo8h8gP1F+5RE=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=aon+7FJRswB+VtKmn5EG6SpNYHNvXQuTn8BowuFpOMZs1X6ETa+f+Lt3pU6LKdv5z i4jrtuBWIfE+6fRG+dYPC58zKjAWfY/1k/vb7oARAmr9yYdvOuJxbtKyCegLfX5C2f 6vU3lTEI6wKi6FiLX48c95qh5Sy3NJGN9DMQ+/6M= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([94.216.136.59]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lj2QM-1hbZA13LQ6-00dJwb; Thu, 26 Sep 2019 07:55:59 +0200 From: Michael Heerdegen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> Date: Thu, 26 Sep 2019 07:55:57 +0200 In-Reply-To: <834l10oj0n.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Sep 2019 11:52:08 +0300") Message-ID: <87k19vr47m.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:v0lj7pBtQIJx3F/rFB85XR4vQNP271h4RDlfEBZFtmM1oBUgRe1 0n9LOZDgM3buMQB9btao8gX8p+mk9JXLX6zBrRJp81Fimo7GzW9me9LaMKNtBccZnqAjkr2 ymh39ApjJZNvCkwfCJjPu2E1cKhVxCTqv7wQGozX8s2TVIv1YK07sdYoDBfwPmwr7GYKVcN 40pnefZu1bx5EyzV0Svpw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:E7+Z0RtDJ9s=:J5SiAOcCvhyj5tJXFJF9Km EHa23fsF+w0at8JbEH/ka8+gjBPlk0h8B5Rov5y+WsVpeKqNKLlfdwK0mSQ+YVOklWZ46Ridr EjG9Tbhwx+FOL6gMR3aYEUCNYyR7NT9UnqYEsTVjLxJDGmgqCGGk7STR2RB2KvY73JRRm7teS nZ3zWjNTeqbeOeYcq1r6lyO1MaW6l5qfXUqU9KnjeeIUh5YR89SsDXhIUWwwaOgWNx2W8Rn1H GMjaCgVLU5eSWns8vGcEan5FVvtruvSwS6lln95rsNBFTG3mFyMPMbEiMu9GMncQQungNKwOa ab1Y5zFg/VeRcTXFG00kjeuFbzvIZmVRQjNMKHQsuW2LVpbVlqHvDsee1e/ZWmN9P0psocwm6 mmxesbMIXTapzfgdZ0fhgoMcLyjZge7NOMw9Mp2eCdDaF1ndQ1bema2WqMwLrsTpHfB+O73qL MWMTXnFBds3zYzyX1BRv0vTpPWQil31mcs8kZ2SPaPRV1DpH/+/A3ULLOKVWrxhpjLC+CccAj 2hOH7eCT8tiQW2FXceYw6reaEoOEKkgojTa40rIGZruzy/ByVo/ynjZew8GFZPYwbOMvzFNOY ZBa2vGyTrILprzgP236xpKnU/9j980HihBrMzmzxV3jGQrSdTecSXrwzyf2Geu8dB49MVycO+ 2rT0vx5IetClv9mextvr8UWtRgPxrzAqCkn+IRS000TdB6DlaMMCR5nrP0D1tLWefy7gL+GC0 EZzFAolEpJgguKqMkAylcURYDwj2QFPC8X3exzsBD6sqsqMZW/RyUAB6frwipwLhP0+YGqhpA zS6WCOvAgHmc6cO3o/L4S/wzVM/O70jKV87kzP6a9DFYr59vUfpRIknFdztqIBaFQpbbcZNnq VuPoMCKdC2TOetOVw5mgbUQ9L0Uy5HDhS+S5AsyR6lgimjTB3GN+OX/bjymTWKamYipJVaMim AJcBD3FsCkC/W45gP1KbfP23oEy+GyD2+/QgSu5vr1PHWBYX+z9DV6iAEk/If40b8lGqg9PO+ NiVEcDyPkKZUheza4e8Z8ICgbE7kmWfg035o6stj1po6wChqMDaYFJzWpVjIfLnWy8zwTaYSK mzc7qkFbCRojloGHq9hPQZY+MGwJyVizBGN+NBfQ60o7nnswSvq3RDldmSbX/ICIA9hiC1z87 792Q4IAWXqT9asQvZLDRep6mGmKL9aCIRAvE50YDDTyvJGgoyY5LW6cOWYRTBPintMBnHNIl4 chgA8VhB8ReAAMKiEFARVJeKeaTLFkm38+wa3/9HsHF0c75qAYJXrPsWBu1I= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37488 Cc: Juanma Barranquero , Lars Ingebrigtsen , 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: > I had more problems with these doc strings, so I rewrote them. Please > take a look. LGTM. On thing: I'm not sure if it is obvious where a successful `text-property-search-backward' leaves point - at the beginning or at the end of the match? Regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 03:33:51 2019 Received: (at 37488) by debbugs.gnu.org; 26 Sep 2019 07:33:51 +0000 Received: from localhost ([127.0.0.1]:42636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDOHf-0003YR-Fj for submit@debbugs.gnu.org; Thu, 26 Sep 2019 03:33:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDOHb-0003YA-SK for 37488@debbugs.gnu.org; Thu, 26 Sep 2019 03:33:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iDOHU-0004eS-K4; Thu, 26 Sep 2019 03:33:40 -0400 Received: from [176.228.60.248] (port=4088 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iDOHU-0007Dv-2e; Thu, 26 Sep 2019 03:33:40 -0400 Date: Thu, 26 Sep 2019 10:33:27 +0300 Message-Id: <835zlfmrzs.fsf@gnu.org> From: Eli Zaretskii To: Michael Heerdegen In-reply-to: <87k19vr47m.fsf@web.de> (message from Michael Heerdegen on Thu, 26 Sep 2019 07:55:57 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87k19vr47m.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: lekktu@gmail.com, larsi@gnus.org, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Heerdegen > Cc: Juanma Barranquero , Lars Ingebrigtsen > , 37488@debbugs.gnu.org > Date: Thu, 26 Sep 2019 07:55:57 +0200 > > On thing: I'm not sure if it is obvious where a successful > `text-property-search-backward' leaves point - at the beginning or at > the end of the match? That was in the original doc strings as well. I have a couple more questions that didn't yet get answers to my satisfaction; when that happens, I will try to handle this one as well. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 10:42:27 2019 Received: (at 37488) by debbugs.gnu.org; 26 Sep 2019 14:42:28 +0000 Received: from localhost ([127.0.0.1]:44194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDUyR-0001E6-Fo for submit@debbugs.gnu.org; Thu, 26 Sep 2019 10:42:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDUyN-0001Dp-Pj for 37488@debbugs.gnu.org; Thu, 26 Sep 2019 10:42:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iDUyG-0008In-VL; Thu, 26 Sep 2019 10:42:16 -0400 Received: from [176.228.60.248] (port=2514 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iDUyG-0007XD-Ah; Thu, 26 Sep 2019 10:42:16 -0400 Date: Thu, 26 Sep 2019 17:42:03 +0300 Message-Id: <83muerktl0.fsf@gnu.org> From: Eli Zaretskii To: larsi@gnus.org In-reply-to: <83sgokmnch.fsf@gnu.org> (message from Eli Zaretskii on Wed, 25 Sep 2019 18:01:34 +0300) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! Please help me finish this job, thanks in advance. > Date: Wed, 25 Sep 2019 18:01:34 +0300 > From: Eli Zaretskii > Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org > > > From: Lars Ingebrigtsen > > Cc: Juanma Barranquero , 37488@debbugs.gnu.org, > > michael_heerdegen@web.de > > Date: Wed, 25 Sep 2019 15:15:58 +0200 > > > > Eli Zaretskii writes: > > > > > . The original doc string said about nil as PREDICATE: > > > > > > `nil' means almost the same as \"not equal\", but will also > > > end the match if the value of PROPERTY changes. > > > > > > What does it mean to "end the match if the value changes"? The > > > text went on to say "See the manual for extensive examples", but > > > the manual doesn't mention this aspect of nil, it just says "not > > > equal". > > > > If point is inside a region where PROPERTY has a non-nil value, using > > nil as the predicate will end the search when PROPERTY changes value. > > OK, but then it should be obvious, and explicitly mentioning that in > the doc string just makes it more confusing. Or am I missing > something? > > > > . The doc string stated: > > > > > > If NOT-CURRENT, if the match is under point, it will not be > > > returned, but instead the next instance is returned, if any. > > > > > > But the code, AFAIU, just checks whether the value of PROPERTY at > > > point matches that of the found region, which doesn't necessarily > > > mean point is part of the region, it could just mean there are two > > > regions with matching values of PROPERTY, and point belongs to one > > > of them. Right? > > > > I'm not sure I understand the question... > > The code doesn't seem to make sure point is inside the same region as > the one found by the initial attempt, it just compares the values of > PROPERTY at point and in the found region, and if they match, it looks > for another region. Is that a correct description of what the code > does when NOT-CURRENT is non-nil? > > If the description is correct, then the doc string doesn't describe > what the code does accurately. > > > What it's meant to do is basically how TAB works in buttons, which is a > > common use case. If you're looking for "o", and point is where "|" is > > below, then it'll find the last "oo" section after the x-es: > > > > oo|oxxxxxoo > > What does "o" stand for in this case? > > > > . What is the reason for having VALUE an optional argument? Is it a > > > frequent/useful operation to look for a VALUE of nil? > > > > If PREDICATE is nil, then having to use an explicit nil VALUE isn't > > necessary. > > I don't understand how this answers my questions. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 11:12:56 2019 Received: (at 37488) by debbugs.gnu.org; 26 Sep 2019 15:12:56 +0000 Received: from localhost ([127.0.0.1]:44248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDVRw-00021w-Dw for submit@debbugs.gnu.org; Thu, 26 Sep 2019 11:12:56 -0400 Received: from quimby.gnus.org ([80.91.231.51]:33986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDVRt-00021i-EN for 37488@debbugs.gnu.org; Thu, 26 Sep 2019 11:12:55 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDVRn-0004GT-9m; Thu, 26 Sep 2019 17:12:50 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> Date: Thu, 26 Sep 2019 17:12:46 +0200 In-Reply-To: <83sgokmnch.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Sep 2019 18:01:34 +0300") Message-ID: <87h84zdrbl.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> > . The original doc string said about nil as PREDICATE: >> > >> > `nil' means almost the same as \"not equal\", but will also >> > end the match if the value of PROPERTY changes. >> > >> > What do [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> > . The original doc string said about nil as PREDICATE: >> > >> > `nil' means almost the same as \"not equal\", but will also >> > end the match if the value of PROPERTY changes. >> > >> > What does it mean to "end the match if the value changes"? The >> > text went on to say "See the manual for extensive examples", but >> > the manual doesn't mention this aspect of nil, it just says "not >> > equal". >> >> If point is inside a region where PROPERTY has a non-nil value, using >> nil as the predicate will end the search when PROPERTY changes value. > > OK, but then it should be obvious, and explicitly mentioning that in > the doc string just makes it more confusing. Or am I missing > something? It's not obvious -- it's the difference between nil and a lambda that just says (not (equal...)). I think the manual needs those copious examples that I apparently forgot to write. It's probably easier to understand if you go to a buffer like this: (defun text-property-setup () (insert "This is " (propertize "bold1" 'face 'bold) " and this is " (propertize "italic1" 'face 'italic) (propertize "bold2" 'face 'bold) (propertize "italic2" 'face 'italic) " at the end") (goto-char (point-min))) and see the difference between (text-property-search-forward 'face 'bold nil) and (text-property-search-forward 'face 'bold (lambda (val p-val) (not (equal val p-val)))) The latter will stop every time 'face changes, while the former stops in a way that segments the buffer in all the regions that have not 'face 'bold. >> > . The doc string stated: >> > >> > If NOT-CURRENT, if the match is under point, it will not be >> > returned, but instead the next instance is returned, if any. >> > >> > But the code, AFAIU, just checks whether the value of PROPERTY at >> > point matches that of the found region, which doesn't necessarily >> > mean point is part of the region, it could just mean there are two >> > regions with matching values of PROPERTY, and point belongs to one >> > of them. Right? >> >> I'm not sure I understand the question... > > The code doesn't seem to make sure point is inside the same region as > the one found by the initial attempt, it just compares the values of > PROPERTY at point and in the found region, and if they match, it looks > for another region. Is that a correct description of what the code > does when NOT-CURRENT is non-nil? Yes. > If the description is correct, then the doc string doesn't describe > what the code does accurately. I think that's what the current doc string also says, but perhaps not clearly enough. >> What it's meant to do is basically how TAB works in buttons, which is a >> common use case. If you're looking for "o", and point is where "|" is >> below, then it'll find the last "oo" section after the x-es: >> >> oo|oxxxxxoo > > What does "o" stand for in this case? Text with "o" as the property. >> > . What is the reason for having VALUE an optional argument? Is it a >> > frequent/useful operation to look for a VALUE of nil? >> >> If PREDICATE is nil, then having to use an explicit nil VALUE isn't >> necessary. > > I don't understand how this answers my questions. Try (text-property-search-forward 'face) on the example. It'll give you all regions that has a face property. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 11:13:11 2019 Received: (at 37488) by debbugs.gnu.org; 26 Sep 2019 15:13:11 +0000 Received: from localhost ([127.0.0.1]:44252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDVSA-00022o-Pz for submit@debbugs.gnu.org; Thu, 26 Sep 2019 11:13:10 -0400 Received: from quimby.gnus.org ([80.91.231.51]:34008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDVS9-00022g-9o for 37488@debbugs.gnu.org; Thu, 26 Sep 2019 11:13:09 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDVS6-0004Gl-3e; Thu, 26 Sep 2019 17:13:08 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> <83muerktl0.fsf@gnu.org> Date: Thu, 26 Sep 2019 17:13:05 +0200 In-Reply-To: <83muerktl0.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Sep 2019 17:42:03 +0300") Message-ID: <87d0fndrb2.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Ping! Please help me finish this job, thanks in advance. Hey, that was 23 hours ago. :-) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Ping! Please help me finish this job, thanks in advance. Hey, that was 23 hours ago. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 11:13:54 2019 Received: (at 37488) by debbugs.gnu.org; 26 Sep 2019 15:13:54 +0000 Received: from localhost ([127.0.0.1]:44255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDVSs-00023p-2b for submit@debbugs.gnu.org; Thu, 26 Sep 2019 11:13:54 -0400 Received: from quimby.gnus.org ([80.91.231.51]:34030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDVSq-00023g-Dc for 37488@debbugs.gnu.org; Thu, 26 Sep 2019 11:13:52 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDVSm-0004H5-0g; Thu, 26 Sep 2019 17:13:50 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87ef04u3ay.fsf@web.de> <83y2ycn21v.fsf@gnu.org> <87zhissmtd.fsf@web.de> <87h850v7l4.fsf@gnus.org> <83r244mn66.fsf@gnu.org> Date: Thu, 26 Sep 2019 17:13:47 +0200 In-Reply-To: <83r244mn66.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Sep 2019 18:05:21 +0300") Message-ID: <878sqbdr9w.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > In any case, the API uses double negation in the default case (find > text whose value of PROPERTY does NOT match no-value), which is > baaad... Yes, it was a late addition, not part of the original design, unfortunately... Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > In any case, the API uses double negation in the default case (find > text whose value of PROPERTY does NOT match no-value), which is > baaad... Yes, it was a late addition, not part of the original design, unfortunately... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 13:06:05 2019 Received: (at 37488) by debbugs.gnu.org; 26 Sep 2019 17:06:06 +0000 Received: from localhost ([127.0.0.1]:44605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDXDP-0002pR-1l for submit@debbugs.gnu.org; Thu, 26 Sep 2019 13:06:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDXDL-0002ot-B6 for 37488@debbugs.gnu.org; Thu, 26 Sep 2019 13:06:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iDXDE-0006g1-H0; Thu, 26 Sep 2019 13:05:52 -0400 Received: from [176.228.60.248] (port=3593 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iDXDC-0007oa-Ti; Thu, 26 Sep 2019 13:05:51 -0400 Date: Thu, 26 Sep 2019 20:05:38 +0300 Message-Id: <83impfkmxp.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-reply-to: <87h84zdrbl.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 26 Sep 2019 17:12:46 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> <87h84zdrbl.fsf@gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: lekktu@gmail.com, 37488@debbugs.gnu.org, michael_heerdegen@web.de > Date: Thu, 26 Sep 2019 17:12:46 +0200 > > (text-property-search-forward 'face 'bold nil) > > and > > (text-property-search-forward 'face 'bold > (lambda (val p-val) (not (equal val p-val)))) > > The latter will stop every time 'face changes, while the former stops in > a way that segments the buffer in all the regions that have not 'face > 'bold. You are saying that the latter will also stop where there's no 'face' property at all, while the former will only stop where there _is_ 'face', but it is not 'bold'? IOW, nil is equivalent to (lambda (val p-val) (and p-val (not (equal val p-val)))) ? > >> > But the code, AFAIU, just checks whether the value of PROPERTY at > >> > point matches that of the found region, which doesn't necessarily > >> > mean point is part of the region, it could just mean there are two > >> > regions with matching values of PROPERTY, and point belongs to one > >> > of them. Right? > >> > >> I'm not sure I understand the question... > > > > The code doesn't seem to make sure point is inside the same region as > > the one found by the initial attempt, it just compares the values of > > PROPERTY at point and in the found region, and if they match, it looks > > for another region. Is that a correct description of what the code > > does when NOT-CURRENT is non-nil? > > Yes. > > > If the description is correct, then the doc string doesn't describe > > what the code does accurately. > > I think that's what the current doc string also says, but perhaps not > clearly enough. > > >> What it's meant to do is basically how TAB works in buttons, which is a > >> common use case. If you're looking for "o", and point is where "|" is > >> below, then it'll find the last "oo" section after the x-es: > >> > >> oo|oxxxxxoo > > > > What does "o" stand for in this case? > > Text with "o" as the property. But then the code should reject the second "oo" section because the value of the property there is equal to the value at point. Right? > >> > . What is the reason for having VALUE an optional argument? Is it a > >> > frequent/useful operation to look for a VALUE of nil? > >> > >> If PREDICATE is nil, then having to use an explicit nil VALUE isn't > >> necessary. > > > > I don't understand how this answers my questions. > > Try (text-property-search-forward 'face) on the example. It'll give you > all regions that has a face property. That's a weird way to get to the result, if someone wants it. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 15:16:25 2019 Received: (at 37488) by debbugs.gnu.org; 26 Sep 2019 19:16:25 +0000 Received: from localhost ([127.0.0.1]:45227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDZFZ-0001xb-Gx for submit@debbugs.gnu.org; Thu, 26 Sep 2019 15:16:25 -0400 Received: from quimby.gnus.org ([80.91.231.51]:39602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDZFY-0001xM-Bw for 37488@debbugs.gnu.org; Thu, 26 Sep 2019 15:16:24 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDZFU-00071V-8N; Thu, 26 Sep 2019 21:16:22 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> <87h84zdrbl.fsf@gnus.org> <83impfkmxp.fsf@gnu.org> Date: Thu, 26 Sep 2019 21:16:19 +0200 In-Reply-To: <83impfkmxp.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Sep 2019 20:05:38 +0300") Message-ID: <87pnjmj2bg.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> (text-property-search-forward 'face 'bold nil) >> >> and >> >> (text-property-search-forward 'face 'bold >> (lambda (val p-val) (not (equal val p-val)))) >> >> The latter will stop every time 'face [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> (text-property-search-forward 'face 'bold nil) >> >> and >> >> (text-property-search-forward 'face 'bold >> (lambda (val p-val) (not (equal val p-val)))) >> >> The latter will stop every time 'face changes, while the former stops in >> a way that segments the buffer in all the regions that have not 'face >> 'bold. > > You are saying that the latter will also stop where there's no 'face' > property at all, while the former will only stop where there _is_ > 'face', but it is not 'bold'? IOW, nil is equivalent to > > (lambda (val p-val) (and p-val (not (equal val p-val)))) No, not the same, I'm afraid. nil means "when looping over this search, give me all regions where 'face is not bold", while your predicate will give you all regions where there is a 'face property, but it's not nil. >> >> What it's meant to do is basically how TAB works in buttons, which is a >> >> common use case. If you're looking for "o", and point is where "|" is >> >> below, then it'll find the last "oo" section after the x-es: >> >> >> >> oo|oxxxxxoo >> > >> > What does "o" stand for in this case? >> >> Text with "o" as the property. > > But then the code should reject the second "oo" section because the > value of the property there is equal to the value at point. Right? Oh, that's the confusion. By "doesn't include point", I meant "doesn't include the region point was at when the search started". >> >> > . What is the reason for having VALUE an optional argument? Is it a >> >> > frequent/useful operation to look for a VALUE of nil? >> >> >> >> If PREDICATE is nil, then having to use an explicit nil VALUE isn't >> >> necessary. >> > >> > I don't understand how this answers my questions. >> >> Try (text-property-search-forward 'face) on the example. It'll give you >> all regions that has a face property. > > That's a weird way to get to the result, if someone wants it. Seems like the obvious way to me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 15:25:08 2019 Received: (at 37488) by debbugs.gnu.org; 26 Sep 2019 19:25:08 +0000 Received: from localhost ([127.0.0.1]:45258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDZO0-0002Ds-GV for submit@debbugs.gnu.org; Thu, 26 Sep 2019 15:25:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDZNy-0002DJ-G2 for 37488@debbugs.gnu.org; Thu, 26 Sep 2019 15:25:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iDZNs-0000y0-Tb; Thu, 26 Sep 2019 15:25:00 -0400 Received: from [176.228.60.248] (port=4271 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iDZNs-0000MU-2C; Thu, 26 Sep 2019 15:25:00 -0400 Date: Thu, 26 Sep 2019 22:24:47 +0300 Message-Id: <835zlelv28.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-reply-to: <87pnjmj2bg.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 26 Sep 2019 21:16:19 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> <87h84zdrbl.fsf@gnus.org> <83impfkmxp.fsf@gnu.org> <87pnjmj2bg.fsf@gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org > Date: Thu, 26 Sep 2019 21:16:19 +0200 > > Eli Zaretskii writes: > > >> (text-property-search-forward 'face 'bold nil) > >> > >> and > >> > >> (text-property-search-forward 'face 'bold > >> (lambda (val p-val) (not (equal val p-val)))) > >> > >> The latter will stop every time 'face changes, while the former stops in > >> a way that segments the buffer in all the regions that have not 'face > >> 'bold. > > > > You are saying that the latter will also stop where there's no 'face' > > property at all, while the former will only stop where there _is_ > > 'face', but it is not 'bold'? IOW, nil is equivalent to > > > > (lambda (val p-val) (and p-val (not (equal val p-val)))) > > No, not the same, I'm afraid. nil means "when looping over this search, > give me all regions where 'face is not bold", while your predicate will > give you all regions where there is a 'face property, but it's not nil. OK, the example is bad, but I did get the meaning. > >> >> What it's meant to do is basically how TAB works in buttons, which is a > >> >> common use case. If you're looking for "o", and point is where "|" is > >> >> below, then it'll find the last "oo" section after the x-es: > >> >> > >> >> oo|oxxxxxoo > >> > > >> > What does "o" stand for in this case? > >> > >> Text with "o" as the property. > > > > But then the code should reject the second "oo" section because the > > value of the property there is equal to the value at point. Right? > > Oh, that's the confusion. By "doesn't include point", I meant "doesn't > include the region point was at when the search started". But that's not what the code seems to do. It just compares the value of property in the found region with that at point. In this example, they both are "o", so the code will reject the "oo" region at the end, and try to find the next one (and fail, because there's none). > >> > I don't understand how this answers my questions. > >> > >> Try (text-property-search-forward 'face) on the example. It'll give you > >> all regions that has a face property. > > > > That's a weird way to get to the result, if someone wants it. > > Seems like the obvious way to me. The obvious one would be to call next-single-property-change. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 27 10:15:54 2019 Received: (at 37488) by debbugs.gnu.org; 27 Sep 2019 14:15:54 +0000 Received: from localhost ([127.0.0.1]:48254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDr2I-0000BX-3V for submit@debbugs.gnu.org; Fri, 27 Sep 2019 10:15:54 -0400 Received: from quimby.gnus.org ([80.91.231.51]:60266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDr2F-0000BJ-6t for 37488@debbugs.gnu.org; Fri, 27 Sep 2019 10:15:53 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDr2B-0002K1-NK; Fri, 27 Sep 2019 16:15:50 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> <87h84zdrbl.fsf@gnus.org> <83impfkmxp.fsf@gnu.org> <87pnjmj2bg.fsf@gnus.org> <835zlelv28.fsf@gnu.org> Date: Fri, 27 Sep 2019 16:15:47 +0200 In-Reply-To: <835zlelv28.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Sep 2019 22:24:47 +0300") Message-ID: <87impdomek.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > But that's not what the code seems to do. It just compares the value > of property in the found region with that at point. In this example, > they both are "o", so the code will reject the "oo" regi [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > But that's not what the code seems to do. It just compares the value > of property in the found region with that at point. In this example, > they both are "o", so the code will reject the "oo" region at the end, > and try to find the next one (and fail, because there's none). No. Once again, you can test this behaviour with this simple code: (insert "This is " (propertize "bold1" 'face 'bold) " and this is " (propertize "italic1" 'face 'italic) (propertize "bold2" 'face 'bold) (propertize "italic2" 'face 'italic) " at the end") Put point inside the first bold text and see the difference between (text-property-search-forward 'face 'bold t t) (text-property-search-forward 'face 'bold t nil) >> >> > I don't understand how this answers my questions. >> >> >> >> Try (text-property-search-forward 'face) on the example. It'll give you >> >> all regions that has a face property. >> > >> > That's a weird way to get to the result, if someone wants it. >> >> Seems like the obvious way to me. > > The obvious one would be to call next-single-property-change. That doesn't give you the region matched. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 27 10:34:13 2019 Received: (at 37488) by debbugs.gnu.org; 27 Sep 2019 14:34:13 +0000 Received: from localhost ([127.0.0.1]:48293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDrK0-000311-SL for submit@debbugs.gnu.org; Fri, 27 Sep 2019 10:34:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40183) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDrJw-00030Z-AM for 37488@debbugs.gnu.org; Fri, 27 Sep 2019 10:34:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iDrJq-0006ME-NF; Fri, 27 Sep 2019 10:34:02 -0400 Received: from [176.228.60.248] (port=2892 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iDrJo-0006Cf-5Y; Fri, 27 Sep 2019 10:34:02 -0400 Date: Fri, 27 Sep 2019 17:33:29 +0300 Message-Id: <83y2y9izba.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-reply-to: <87impdomek.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 27 Sep 2019 16:15:47 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> <87h84zdrbl.fsf@gnus.org> <83impfkmxp.fsf@gnu.org> <87pnjmj2bg.fsf@gnus.org> <835zlelv28.fsf@gnu.org> <87impdomek.fsf@gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org > Date: Fri, 27 Sep 2019 16:15:47 +0200 > > Eli Zaretskii writes: > > > But that's not what the code seems to do. It just compares the value > > of property in the found region with that at point. In this example, > > they both are "o", so the code will reject the "oo" region at the end, > > and try to find the next one (and fail, because there's none). > > No. Once again, you can test this behaviour with this simple code: Would you please humor me, and explain how the code does that by walking the code itself? I have problem understanding that from examples, sorry for my limitations. All I see is that the code calls text-property--match-p, and that one just compares two values of the property. What am I missing? From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 27 10:37:03 2019 Received: (at 37488) by debbugs.gnu.org; 27 Sep 2019 14:37:03 +0000 Received: from localhost ([127.0.0.1]:48304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDrMk-00038y-Tf for submit@debbugs.gnu.org; Fri, 27 Sep 2019 10:37:03 -0400 Received: from quimby.gnus.org ([80.91.231.51]:60796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDrMj-00038W-3v for 37488@debbugs.gnu.org; Fri, 27 Sep 2019 10:37:01 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDrMf-0002XT-Ac; Fri, 27 Sep 2019 16:36:59 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> <87h84zdrbl.fsf@gnus.org> <83impfkmxp.fsf@gnu.org> <87pnjmj2bg.fsf@gnus.org> <835zlelv28.fsf@gnu.org> <87impdomek.fsf@gnus.org> <83y2y9izba.fsf@gnu.org> Date: Fri, 27 Sep 2019 16:36:57 +0200 In-Reply-To: <83y2y9izba.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Sep 2019 17:33:29 +0300") Message-ID: <87v9tdn6uu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > All I see is that the code calls text-property--match-p, and that one > just compares two values of the property. What am I missing? I think the magic is in text-property--find-end-forward and -backward, where the nil PREDICATE has special meaning. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > All I see is that the code calls text-property--match-p, and that one > just compares two values of the property. What am I missing? I think the magic is in text-property--find-end-forward and -backward, where the nil PREDICATE has special meaning. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 28 10:45:32 2019 Received: (at 37488) by debbugs.gnu.org; 28 Sep 2019 14:45:32 +0000 Received: from localhost ([127.0.0.1]:51026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEDyW-0000kp-4J for submit@debbugs.gnu.org; Sat, 28 Sep 2019 10:45:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEDyU-0000kc-Gd for 37488@debbugs.gnu.org; Sat, 28 Sep 2019 10:45:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iEDyP-0007tZ-0X; Sat, 28 Sep 2019 10:45:25 -0400 Received: from [176.228.60.248] (port=4907 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iEDyK-0002g9-R6; Sat, 28 Sep 2019 10:45:23 -0400 Date: Sat, 28 Sep 2019 17:45:13 +0300 Message-Id: <83h84wh43q.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-reply-to: <87v9tdn6uu.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 27 Sep 2019 16:36:57 +0200) Subject: Re: bug#37488: 27.0.50; Inconsistent naming of arg of `text-property-search-forward' and `-backward' References: <87y2yfo8fv.fsf@web.de> <834l10oj0n.fsf@gnu.org> <87lfucv7n5.fsf@gnus.org> <83sgokmnch.fsf@gnu.org> <87h84zdrbl.fsf@gnus.org> <83impfkmxp.fsf@gnu.org> <87pnjmj2bg.fsf@gnus.org> <835zlelv28.fsf@gnu.org> <87impdomek.fsf@gnus.org> <83y2y9izba.fsf@gnu.org> <87v9tdn6uu.fsf@gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37488 Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: michael_heerdegen@web.de, lekktu@gmail.com, 37488@debbugs.gnu.org > Date: Fri, 27 Sep 2019 16:36:57 +0200 > > Eli Zaretskii writes: > > > All I see is that the code calls text-property--match-p, and that one > > just compares two values of the property. What am I missing? > > I think the magic is in text-property--find-end-forward and -backward, > where the nil PREDICATE has special meaning. Thanks, I figured it out and updated the doc strings. From unknown Fri Aug 15 03:57:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 27 Oct 2019 11:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator