From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 17:28:10 2025 Received: (at submit) by debbugs.gnu.org; 12 Feb 2025 22:28:10 +0000 Received: from localhost ([127.0.0.1]:38788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiLDG-0007mD-FY for submit@debbugs.gnu.org; Wed, 12 Feb 2025 17:28:10 -0500 Received: from lists.gnu.org ([2001:470:142::17]:47392) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiLDD-0007lh-PA for submit@debbugs.gnu.org; Wed, 12 Feb 2025 17:28:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiLD4-0003E5-Ow for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2025 17:27:58 -0500 Received: from out-188.mta0.migadu.com ([91.218.175.188]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiLD2-0007wM-Ve for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2025 17:27:58 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=topbug.net; s=key1; t=1739399273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MiGxgWa9Rfom3rw0fOs3wAovulmgHuoSOkQpHgg/md8=; b=ftGIoM6Ra3cB4DM6EEefb7ksKneEH8EVI4ipyl6vanp922DvUHN/1oiueU+W1SnKl4H/Rs jhBTDZGlu4nVAfU6TbTWknxWpl11AefO+mr9VlfIe+aVCaQxk5xsoO4cdR11y2Cqm7EixD gjBLm8QuqD4vdLNhsAYbbXuDsjVJ9gWImCatKW/N06TGGTtSpzfr2zxqSO+7Kj9imjhIcQ zunttBBjLCkDTFvTQizXg/TitvN5A/muYZCyCOseyON7uphb6U964E7VaHT39AJZIVho7A 28vchMM3BQc6U0HCK2UoDVD6BJ//QnN6vunHLJNGotuCR1u2smraXKPRkvLkmg== From: Hong Xu To: bug-gnu-emacs@gnu.org Subject: [PATCH] Clarify that mapconcat's FUNCTION can return nil Date: Wed, 12 Feb 2025 14:27:03 -0800 Message-ID: <20250212222746.25672-1-hong@topbug.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.188; envelope-from=hong@topbug.net; helo=out-188.mta0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Hong Xu 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.1 (/) * src/fns.c (Fmapconcat): Explain that FUNCTION can return nil. --- src/fns.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fns.c b/src/fns.c index bee44b222c5e..f02a1b6838da 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3400,9 +3400,11 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. Optional argument SEPARATOR must be a string, a vector, or a list of characters; nil stands for the empty string. -FUNCTION must be a function of one argument, and must return a value - that is a sequence of characters: either a string, or a vector or - list of numbers that are valid character codepoints. */) + FUNCTION must be a function of one argument, and must return either: + + nil, which is treated as an empty string, or + a value that is a sequence of characters, which is either a string, + or a vector or list of numbers that are valid character codepoints. */) (Lisp_Object function, Lisp_Object sequence, Lisp_Object separator) { USE_SAFE_ALLOCA; -- 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 17:31:43 2025 Received: (at 76242) by debbugs.gnu.org; 12 Feb 2025 22:31:44 +0000 Received: from localhost ([127.0.0.1]:38799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiLGh-00081Q-Ib for submit@debbugs.gnu.org; Wed, 12 Feb 2025 17:31:43 -0500 Received: from out-177.mta1.migadu.com ([95.215.58.177]:14454) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiLGf-00080y-05 for 76242@debbugs.gnu.org; Wed, 12 Feb 2025 17:31:41 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=topbug.net; s=key1; t=1739399494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kbB8j/NJ58bSSRS/m/zGD2e1pNEGKX3Q1iDAFC5hxlw=; b=CQcxAA4IowWBmnVoEb+pD4jk8cMSOI3ABVBdbeJYBGzJCspJswro1cHt8UdT7+4tw6xcN4 MhY5RVEv6rM86j7bEP+wCuYI9MluvKLk3096+ZsFU3r9nHZnBJfRW9HwtXx+aELFmgj+l2 cHMJ6FiGHZzbmaMHzMiZ7Rpw9JA6/Hw7phZzyOBONpzdp2Q9KTBXXovlGUtVEkqBkNqtlO n5FIcStwi0wEsAteIil7Ho3HPRzy1zYk4jTfYy2+V6dz2HsHltD2U8p9sM0yH8s4lzUJB1 oSdOl/SK3ym9MSxBNHoEge7t5pxYlZjrQbyYt7WBYEYDM74kGzzQfezh/kUNEw== From: Hong Xu To: 76242@debbugs.gnu.org Subject: Re: [PATCH] Clarify that mapconcat's FUNCTION can return nil In-Reply-To: <20250212222746.25672-1-hong@topbug.net> (Hong Xu's message of "Wed, 12 Feb 2025 14:27:03 -0800") References: <20250212222746.25672-1-hong@topbug.net> Date: Wed, 12 Feb 2025 14:31:31 -0800 Message-ID: <877c5ulrr0.fsf@topbug.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 76242 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 (-) --=-=-= Content-Type: text/plain On 2025-02-12 Wed 14:27 GMT-08, Hong Xu wrote: > * src/fns.c (Fmapconcat): Explain that FUNCTION can return nil. > --- > src/fns.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/fns.c b/src/fns.c > index bee44b222c5e..f02a1b6838da 100644 > --- a/src/fns.c > +++ b/src/fns.c > @@ -3400,9 +3400,11 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. > Optional argument SEPARATOR must be a string, a vector, or a list of > characters; nil stands for the empty string. > > -FUNCTION must be a function of one argument, and must return a value > + FUNCTION must be a function of one argument, and must return either: For some reason there is an extra space here. I've corrected this with the attached patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0001-Clarify-that-mapconcat-s-FUNCTION-can-return-nil.patch >From 42b5c39abd1765efc286178d041c57623d722d0d Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Wed, 12 Feb 2025 14:25:34 -0800 Subject: [PATCH v2] Clarify that mapconcat's FUNCTION can return nil * src/fns.c (Fmapconcat): Explain that FUNCTION can return nil. --- src/fns.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fns.c b/src/fns.c index bee44b222c5e..fc7039c1592b 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3400,9 +3400,11 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. Optional argument SEPARATOR must be a string, a vector, or a list of characters; nil stands for the empty string. -FUNCTION must be a function of one argument, and must return a value - that is a sequence of characters: either a string, or a vector or - list of numbers that are valid character codepoints. */) +FUNCTION must be a function of one argument, and must return either: + + nil, which is treated as an empty string, or + a value that is a sequence of characters, which is either a string, + or a vector or list of numbers that are valid character codepoints. */) (Lisp_Object function, Lisp_Object sequence, Lisp_Object separator) { USE_SAFE_ALLOCA; -- 2.48.1 --=-=-= Content-Type: text/plain -- Hong --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 20:26:57 2025 Received: (at submit) by debbugs.gnu.org; 13 Feb 2025 01:26:57 +0000 Received: from localhost ([127.0.0.1]:39042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiO0H-00086H-AB for submit@debbugs.gnu.org; Wed, 12 Feb 2025 20:26:57 -0500 Received: from lists.gnu.org ([2001:470:142::17]:59070) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiO08-00085b-E8 for submit@debbugs.gnu.org; Wed, 12 Feb 2025 20:26:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiO01-0003cp-GV for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2025 20:26:41 -0500 Received: from mout.web.de ([212.227.15.4]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiNzx-0006US-51 for bug-gnu-emacs@gnu.org; Wed, 12 Feb 2025 20:26:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1739409991; x=1740014791; i=michael_heerdegen@web.de; bh=NGNd5psddeaaOPlpRUTIZ8kA4BdI75QGyost2Z0ksBI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=LvqrjZcwy+S3zh6RDoNpNwCI0weQkeBgJjItbvbvBnT8vMusoEdRXCQmzFARznIu kbuntFbFaojwCd8FWaIPoxJ89M9RODKnAhIjX84IPJhmmfdaH9GbpDMGthEpLE6vj aM7/rikj0iFc8ncyX89djlh/h9HZzdzBodA1mz/TJ1qwlI22vaMJALEoN+oVw0ZgJ Y7T2i9rhEKHd50UmvL6fQoo60wYZw4+y+RzKrB89nYqjSUmp/W4XO8iQcuKqA3z6C iZcTzB0VRKB3oejgP69TSduebEoo3xR+edcqpGA/EAK62uCWgSbjwWBZZI8Akz2Yh VqRHEmzRgMXM/iLuPA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([88.66.201.232]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1Mdf89-1t93JO2QTZ-00lwwG; Thu, 13 Feb 2025 02:26:31 +0100 From: Michael Heerdegen To: Hong Xu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#76242: [PATCH] Clarify that mapconcat's FUNCTION can return nil In-Reply-To: <20250212222746.25672-1-hong@topbug.net> References: <20250212222746.25672-1-hong@topbug.net> Date: Thu, 13 Feb 2025 02:27:52 +0100 Message-ID: <87ldua7hwn.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:zQJgGxta0J6itHMGOGCInzHuXrsuCLBe26mNzRV5+wseSFpAC1l 5pRYP77cMVWlMXWgd4Dc2ySm9FGr6JJMDGR5JBWB9xPHHRApg57S038+tzsaveQOlOUL2KG WPHXJu+XCmiiLgAFBTfH9EGKm1pIaCCVN55G6EzBH67j5m5/jmcppDIpCsZD0xjFJ01d4Hw F54vNOVi3RKKF5+J6ERYg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:v4s1tGMtBSk=;wKxmnIDWTfeD1Fcv40nuMaYbmcX +w+bjEqXj40kyfaLBHz/oBI26eQhaUlpllgbcAQz+IBNdfUsP9XT4yHU+4lg3RTTCnJaDzjEs ZW+2vgl4emmHxAcmH5WFhiaJld6zigRrbmAZRR02Z4CROeOoo1p9qynAD6H1LjmKi5AvGvNNz L12Yaz98Q8SaXMvOU5uqs6RpILh5P/b1w4mCtErViILy2R3tNKehFuPYsEP030+NiAuiwvO4E b2+hejUqTsZn1bxztPjCbhU8KLQBayy78GNuIcRiSJRtXy6gtxIAphehjPmCFF65/BYE61WDa 9iUUOEGKB46UJY0rr2qmPX87Zim6cMQNlNM4+9BJM9yAzQzVhYmt7cLDyda4kN31FpHKBS2I8 tSMoTnKIUOQoJ3MCqFru51Fgvk5wcDGP8l6q4ihJe3o1jsu2J1+coKKpVuBo3XqLL+Yo+DEz+ rs29y/XxGo6F8NZH7j32Sn1gYrV1CIT0JPxkbF0cvMIBU3pdzUagab+ODIyh6UrhZSO1Cu+6F zSOGVApvpwky0fqoyhabYHT+akPODGMSVdGQDqg82X1srrqgds0bqZWNcW4Ipo3FjhXr4a3cx n6W4wBx7tkbo0mExENhMbsrJIhoSo/3yAWGLGxii+tqnxCce335NBAnV8mhVfMqbZUBxNSMVp 0FsTOg9t0akhTHxUlbf4IOUf9XsPZNqeJwsR4Vx3STd/xHnEkSWzx0OwuGv/RCr9PNidK8wdT qRR2gCmShEOA/ch1prOgt01vGIpF16p61mmhIGxu8lMTuuAufkIu5PQcXgtvsBvb5sayxuRcg 35F98V/B+W/4FhdVHjvg1f8pMQu50D75vWhw03fFmxHl3k8lkGhgrL8zwdTN/ZF29IMIo/Rut NnXRza26JAqAxiVSEy5r7rq+E8VnI6/ouXXmkgd/FDSPvfpniwc8UCxARtPsx0Ex9kprolhM8 fVchuOHvaCfdHegfXKiLJ43MPnuUACuTwnDVy/WI7qrMt3YuPSwC+XVdYmJ9rK28qXpsIPNZL ZuFqAdW5iRy+Kwvwu35Z5CcS63azGrqJnZWNQ3rwmbXeTINGNuYjE2Btq8Mtmd+mrk8o+cUu0 aso987pen1vB/WWzY7RH7wJMv8zxKZWdg5Mlb646VCf6fVwNG3Tz4O4BlMiAfAAskNQfw44YR Isx9lVukGPnifb//mUalE3d5fPADWqAw1GhVW5VgEAP04pmkInA5Ps3DCSJdM0t9IGVe5hg7x /fGmgyMVeE9nv/ZAq4GR5OTustkoH9l9O/H3GZvXaTLo6iIYpd56CMPxoVBX9Rg7lE6p/5WgM WoZUVpdTk7E0p1P55tzmlIp0yqD0So9jefRquLIFZcucxj7N9QSdu4FHaRehQlA93+oEgU0dI K+Vs/TLwX7PAHLJI+9nfUEuuS4OozBUDkKiqtQSwA0MoMpEJj8RXVKSZKU Received-SPF: pass client-ip=212.227.15.4; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit Cc: 76242@debbugs.gnu.org, Hong Xu 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 (-) Hong Xu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > -FUNCTION must be a function of one argument, and must return a value > - that is a sequence of characters: either a string, or a vector or > - list of numbers that are valid character codepoints. */) > + FUNCTION must be a function of one argument, and must return either: > + > + nil, which is treated as an empty string, or > + a value that is a sequence of characters, which is either a string, > + or a vector or list of numbers that are valid character codepoints. */) I don't understand the rationale. Isn't nil just one case of an empty sequence of characters? Why describe it specially? Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 01:55:06 2025 Received: (at control) by debbugs.gnu.org; 13 Feb 2025 06:55:06 +0000 Received: from localhost ([127.0.0.1]:39813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiT7q-0008KB-DY for submit@debbugs.gnu.org; Thu, 13 Feb 2025 01:55:06 -0500 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:60596) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tiT7o-0008JE-8U for control@debbugs.gnu.org; Thu, 13 Feb 2025 01:55:04 -0500 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5de6c708315so721577a12.0 for ; Wed, 12 Feb 2025 22:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739429698; x=1740034498; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=0LETKk4ZtvEDpfwZLvXjdkDcrUHx7076n6NqsUkUwdc=; b=UoZ7eKhw1g+mFfMG9hg73qviFMsplsLmdmDVG81RLKZzX2GzQoUlkMAI9miBAmB5xC 1hjRT9s/Mul9edarf8fRA6z/IUi08z/2Y9TOFPJwqLCA6e2aGeiN8ytfYBLb2FC4e3B7 mYDapB8fJSVkS5ea3sa6aTssrY1eIf5d4+Nh/zQOOn8TKc4lIJ1U/I4FCoYlfZf0nELv exU3EZRzcbvjWnIxWKPdNA7ZHk5p7xVF2xj/7VvRLumG11AVU9QanjJwynVYrQvRrlo9 RKaK1My40fOklrFHxbGc9OR148W4m0xEgYaIysPjaLM3MZQEUgM+zsqlCZIKdyycABFh BHVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739429698; x=1740034498; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0LETKk4ZtvEDpfwZLvXjdkDcrUHx7076n6NqsUkUwdc=; b=sEtgUnBb2+I7zoHtF4gmTPmMfNqEAP2XiPyQx5hSt+Ozv+ynRK1nM1abI3PSite65E NQebUIy5JdU8VfPn6zM5HF/cXy6CgNWAbK4XDlWeMoqShWzHe6EzNmHVvLwnJ2wpcoWv sKBIY9S79u50VzjKaGZJGxsWYNQzF2688aXkvKu4Dp+wI97C/C8uKUui44XZv1oPJqgh XUheX5E09F608jTwswHUyXgUOHlDeduTJUXJEwDqalMJvTd9RAlySazGtn6NV4E185FN iKUJZFp3PJ1GITDHY1MsrZr9gg/OioP0OFHFOCBdFlh1B9JuAwdAqVkpBKFsHzGGxo5Z FjHw== X-Gm-Message-State: AOJu0Yyz5OJHnJ2TwxsHMyqoKnIaB1N4mo0aG5/1jEmbUZerZ+u4VnR8 TRIQl7gFOt8hzfGlWgFqruj+Kwn+KV8+pGbWGU2z+/XfbzMMFo4NsIapjmG5NMRAFtv/xJdJD+D fRw6tnhxWOZGeFuf1TNwYrSk90RdD14ROMnKVPQ== X-Gm-Gg: ASbGncvhIuEZde2tGyf7dRceeUukz1lWcLu8MgWFbL2R+KOgoOaUlr2L6o3OZqfBQBV 26cQrFhSEWoS3jdegwZTqDKqM05HysKVOzPKHzVyMnFEKKUp91CJbdslyquOiJn0pHMDFlsSYVh c= X-Google-Smtp-Source: AGHT+IF6GH+tFnx/BbXcypr6mHURkvPFkxRIG5GwOVHvekn2JsK47CIclKshO2RqtG/Knci1o0doi4fRC/iX3B99Zog= X-Received: by 2002:a05:6402:26cf:b0:5dc:ea80:bffb with SMTP id 4fb4d7f45d1cf-5deade109c6mr5217160a12.29.1739429697883; Wed, 12 Feb 2025 22:54:57 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 12 Feb 2025 22:54:57 -0800 From: Stefan Kangas MIME-Version: 1.0 Date: Wed, 12 Feb 2025 22:54:57 -0800 X-Gm-Features: AWEUYZnA4vk5Rnlk2MdUX-WpXr5z1Gkv-zv4mfFnzRoKxiUj6EqXUk6rPQ3WYW8 Message-ID: Subject: control message for bug #76242 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) severity 76242 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 02:57:17 2025 Received: (at 76242) by debbugs.gnu.org; 13 Feb 2025 07:57:17 +0000 Received: from localhost ([127.0.0.1]:40056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiU61-0000eJ-9R for submit@debbugs.gnu.org; Thu, 13 Feb 2025 02:57:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59212) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiU5z-0000e4-E0 for 76242@debbugs.gnu.org; Thu, 13 Feb 2025 02:57:16 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiU5t-00047o-C6; Thu, 13 Feb 2025 02:57:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=XvhYpMaUsjd9fnS6aV1/ZSSjJ+4yTm1hAJ/4/avSBSk=; b=nKoft3y+IrVd bBXFpCfvHbXrSbhMWG6VPIpmyKsmEYICo6P6PwIWr+DehkpPlyF+dgDiZDRfNGLpiR/5hs63JdI1k na6Uloh3w0Spune4s0O4a7ecM9VBo6Adn5X7oQNg6x0SPK4D05Ge49fNunbcUZKNm+BDx/FODmQhM YwWi2rp+zXtJ08qMCmkSz0dtVwXsu1OImu9WICA2nyoptPmED/ipeTPd7KqEFsIEo+eKjM7e0cyKS fYnG+AXO1oP7aEgXcDstIeWG/vHcrcNgGQmApgCkrR4VimemkqK2M547QHHyrCOZkMpKvzZqW4S75 BBYtKRMYlqzknGL5V+REfg==; Date: Thu, 13 Feb 2025 09:57:05 +0200 Message-Id: <864j0yjmzy.fsf@gnu.org> From: Eli Zaretskii To: Michael Heerdegen In-Reply-To: <87ldua7hwn.fsf@web.de> (bug-gnu-emacs@gnu.org) Subject: Re: bug#76242: [PATCH] Clarify that mapconcat's FUNCTION can return nil References: <20250212222746.25672-1-hong@topbug.net> <87ldua7hwn.fsf@web.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76242 Cc: 76242@debbugs.gnu.org, hong@topbug.net 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 (---) > Cc: hong@topbug.net > Date: Thu, 13 Feb 2025 02:27:52 +0100 > From: Michael Heerdegen via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Hong Xu via "Bug reports for GNU Emacs, the Swiss army knife of text > editors" writes: > > > -FUNCTION must be a function of one argument, and must return a value > > - that is a sequence of characters: either a string, or a vector or > > - list of numbers that are valid character codepoints. */) > > + FUNCTION must be a function of one argument, and must return either: > > + > > + nil, which is treated as an empty string, or > > + a value that is a sequence of characters, which is either a string, > > + or a vector or list of numbers that are valid character codepoints. */) > > I don't understand the rationale. Isn't nil just one case of an empty > sequence of characters? Why describe it specially? How about the below instead: FUNCTION must be a function of one argument, and must return a value that is a sequence of characters: either a string, or a vector or list of numbers that are valid character codepoints; nil is treated as an empty string. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 03:28:10 2025 Received: (at 76242) by debbugs.gnu.org; 13 Feb 2025 08:28:10 +0000 Received: from localhost ([127.0.0.1]:40249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiUZu-0005CH-Hf for submit@debbugs.gnu.org; Thu, 13 Feb 2025 03:28:10 -0500 Received: from out-177.mta0.migadu.com ([2001:41d0:1004:224b::b1]:12044) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiUZq-0005Be-5S for 76242@debbugs.gnu.org; Thu, 13 Feb 2025 03:28:09 -0500 Date: Thu, 13 Feb 2025 00:27:45 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=topbug.net; s=key1; t=1739435277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZAJRGUiNFM3ARUa7iIBixXuMyscDMpbbdwr9rMhtDVE=; b=GYgSKlncEG1UiS07CyQwHJzuHW5CbWBsQgPhSrUUmZ0jNJcjMtEFvT4CpU2oeS8IgSahAZ ZsUjbKXb3L2mjepJRBEs3vcIO990EzQxrYAbGSFXKXUcWqKp9kRUvqwEHP5PZsaRJrZB0M v0Hj0AiGyoeC5Xg8TxcTpRTljqt5mVzyjsqjVFFd8t8TaYNetHFZajvsM3o9dJ4ck4AgmZ 79fPYlxiRElmJSf+3JmtYhgRDvanWg/cKtMucwIjuNCTdER2pbxCYWwbIxK2M+l57oEY77 h4sey3ihv8rj+dzcAxasFO3oNlxgfQkYdqfkuCKS+abHMSrcQnkL6TiThzRIjA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hong Xu To: Eli Zaretskii , Michael Heerdegen Subject: =?US-ASCII?Q?Re=3A_bug=2376242=3A_=5BPATCH=5D_Clarify_that?= =?US-ASCII?Q?_mapconcat=27s_FUNCTION_can_return_nil?= In-Reply-To: <864j0yjmzy.fsf@gnu.org> References: <20250212222746.25672-1-hong@topbug.net> <87ldua7hwn.fsf@web.de> <864j0yjmzy.fsf@gnu.org> Message-ID: <58F53CF7-5617-4187-AC4F-0E7213BB2D5F@topbug.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 76242 Cc: 76242@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 (-) On February 12, 2025 11:57:05 PM PST, Eli Zaretskii wrote: >> Cc: hong@topbug=2Enet >> Date: Thu, 13 Feb 2025 02:27:52 +0100 >> From: Michael Heerdegen via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> Hong Xu via "Bug reports for GNU Emacs, the Swiss army knife of text >> editors" writes: >>=20 >> > -FUNCTION must be a function of one argument, and must return a value >> > - that is a sequence of characters: either a string, or a vector or >> > - list of numbers that are valid character codepoints=2E */) >> > + FUNCTION must be a function of one argument, and must return either= : >> > + >> > + nil, which is treated as an empty string, or >> > + a value that is a sequence of characters, which is either a strin= g, >> > + or a vector or list of numbers that are valid character codepoint= s=2E */) >>=20 >> I don't understand the rationale=2E Isn't nil just one case of an empt= y >> sequence of characters? Why describe it specially? > >How about the below instead: > > FUNCTION must be a function of one argument, and must return a value > that is a sequence of characters: either a string, or a vector or > list of numbers that are valid character codepoints; nil is treated > as an empty string=2E I agree, this is better=2E Hong From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 03:29:36 2025 Received: (at 76242) by debbugs.gnu.org; 13 Feb 2025 08:29:36 +0000 Received: from localhost ([127.0.0.1]:40258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiUbI-0005Ej-FZ for submit@debbugs.gnu.org; Thu, 13 Feb 2025 03:29:36 -0500 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:58725) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tiUbF-0005ER-U8 for 76242@debbugs.gnu.org; Thu, 13 Feb 2025 03:29:34 -0500 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5de38c3d2acso949774a12.1 for <76242@debbugs.gnu.org>; Thu, 13 Feb 2025 00:29:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739435368; x=1740040168; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=MD/KZhChMg/nTt6sLRREuhfDel6MFYLLicUYsRlQU1Y=; b=TdyQK9Y/fBUroDSfcksH4eSwjvwKwDozK1H/eGnM/fW65/SCVrCECp5jlT191NCOON +SwrGnmf2jXrEY6LFy2Q+jWxnTWk9doYUwuBGGs6qI31PtufHNgd39BAW7cOeCB/6h71 pD9zrFGSDJ+fQkvgpQL41Mut6CDhMDr5g1kU9Q3L8rsNS14mfiOt2xRNAGKtMfM0R1Pf Ah1b+yBNXlwwspvkh9KToQBMjhgGhP1NQr26afKzXEWSMlE5Ay9nnT1auCaBZfBVWqPF MdVGSHweXVJ1cgTwD/6soTlyfg6dVAgDcJPTH/0eS75vW/RDn5RF0KpTS3ptIypw6CNu 46ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739435368; x=1740040168; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MD/KZhChMg/nTt6sLRREuhfDel6MFYLLicUYsRlQU1Y=; b=O/KyenJqHseyPpYm2ywo0PKTEknQk9W3R6BXlFGZIB/Ic28m2I8eUeIfpt58cYgLPC 7wntoeSAapEkZgr1j255z261VLHRDs4/dP18fX1KOMRJyRqTqatTAy0r171hhxZKVAtN NZ5UfHCrEcjz8kY8va/KcTMhfR3WzddrnexjqtukxPyKzj/z0OPsh7KhWOCUDIjy/vqt ddCdjS/DpGkVzrXourqeCw5HhWB1BVjjeTlxyMUrMcdcUk7P1ZMypnZAhwv0F2PKMLwV w2ckx1SZ2Hrijkj0R/rpiq7XAsn2fFOf10zBsbMHrWlBPGr7Q4xdP0cMIyrw4pMYNKKT agfQ== X-Gm-Message-State: AOJu0YwWLh0uJ02fop3DD2K34wfee9nOMJ8gv5byNyJZiuvhKlxwQLXy TYUVUBYoOMSqN/P1UU72nWxuoKvGUG9dh4KlSA3JYHGKkXsD6pFONqKj6rdH+YnYSxV5dXwn8Zs F87rx6wBdYXcmxxx6xcSwnkLw90+NP7J8N35vaw== X-Gm-Gg: ASbGncs+CunF6SYKVz5yO6lnozjDw17WUTnvgyqmvRY11mJaNxknXGT3frIN+6IaOa/ VEqn4BJrRQPocNSsdh+hFTYqwSIeGxjCigw61KpWbN16QHwNSktFdPNzJRK9n3quIrD/qHVjp3L Y= X-Google-Smtp-Source: AGHT+IH4MVKqFLhZi4ibLNMdkRbu4HV6WDp40Cy2uGaEa0RydLO36KFcXorfzGvzRlAhhil2f9wq+CjTYV+6tME8fz8= X-Received: by 2002:a05:6402:50cc:b0:5d9:fc81:e197 with SMTP id 4fb4d7f45d1cf-5deadd8e4a1mr5448985a12.8.1739435367603; Thu, 13 Feb 2025 00:29:27 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 13 Feb 2025 00:29:27 -0800 From: Stefan Kangas In-Reply-To: <864j0yjmzy.fsf@gnu.org> References: <20250212222746.25672-1-hong@topbug.net> <87ldua7hwn.fsf@web.de> <864j0yjmzy.fsf@gnu.org> MIME-Version: 1.0 Date: Thu, 13 Feb 2025 00:29:27 -0800 X-Gm-Features: AWEUYZkq3lCoZGd6VKxhIsF6eqqjXdjjswBTbq8ukm_T15rrzWb7eJnc-E2GsVE Message-ID: Subject: Re: bug#76242: [PATCH] Clarify that mapconcat's FUNCTION can return nil To: Eli Zaretskii , Michael Heerdegen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76242 Cc: 76242@debbugs.gnu.org, hong@topbug.net 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: > How about the below instead: > > FUNCTION must be a function of one argument, and must return a value > that is a sequence of characters: either a string, or a vector or > list of numbers that are valid character codepoints; nil is treated > as an empty string. LGTM. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 04:05:08 2025 Received: (at 76242-done) by debbugs.gnu.org; 13 Feb 2025 09:05:08 +0000 Received: from localhost ([127.0.0.1]:40341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiV9g-0001W5-2b for submit@debbugs.gnu.org; Thu, 13 Feb 2025 04:05:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44824) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiV9c-0001R9-N6 for 76242-done@debbugs.gnu.org; Thu, 13 Feb 2025 04:05:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiV9X-0005gk-B3; Thu, 13 Feb 2025 04:04:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=R9/GYuqdbqfUG5UK7NQTht9Kfvbl8juonOUM9HectDI=; b=baS3HlaTvaYd z6AO4IFBhMCr7a8WHGxvm8IEbnDwwY7wOAtcIdVCbpgBaetTqTbABRQ/tDyzgNsHBM2C/Elcq/0Gn vF6U5YaoInTSuhUW2PS4W6ccpcpQV0ww+pbXTEa7HdrIWFOJgztKgir4Lukm8T4FiFMs1KtE6+uTF 8is3izBvMbP8qshXlx3SVf97vvtMrPfL9ZFwWMVPV3bf9LriIGEl2lizWNvvcy+b8ObEflMsBfAl+ +0pT6M4nfz1OCU2rWT7yKbgmrvABm01cVevmnVZqNhoSArrkwfb/Zmgeazvm5JGHo4uJSsvnG6Lts mZKTrjbcwdDPDDVFsVlnmA==; Date: Thu, 13 Feb 2025 11:04:34 +0200 Message-Id: <86mseqi5b1.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-Reply-To: <58F53CF7-5617-4187-AC4F-0E7213BB2D5F@topbug.net> (message from Hong Xu on Thu, 13 Feb 2025 00:27:45 -0800) Subject: Re: bug#76242: [PATCH] Clarify that mapconcat's FUNCTION can return nil References: <20250212222746.25672-1-hong@topbug.net> <87ldua7hwn.fsf@web.de> <864j0yjmzy.fsf@gnu.org> <58F53CF7-5617-4187-AC4F-0E7213BB2D5F@topbug.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76242-done Cc: michael_heerdegen@web.de, 76242-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: -3.3 (---) > Date: Thu, 13 Feb 2025 00:27:45 -0800 > From: Hong Xu > CC: 76242@debbugs.gnu.org > > On February 12, 2025 11:57:05 PM PST, Eli Zaretskii wrote: > >> Cc: hong@topbug.net > >> Date: Thu, 13 Feb 2025 02:27:52 +0100 > >> From: Michael Heerdegen via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" > >> > >> Hong Xu via "Bug reports for GNU Emacs, the Swiss army knife of text > >> editors" writes: > >> > >> > -FUNCTION must be a function of one argument, and must return a value > >> > - that is a sequence of characters: either a string, or a vector or > >> > - list of numbers that are valid character codepoints. */) > >> > + FUNCTION must be a function of one argument, and must return either: > >> > + > >> > + nil, which is treated as an empty string, or > >> > + a value that is a sequence of characters, which is either a string, > >> > + or a vector or list of numbers that are valid character codepoints. */) > >> > >> I don't understand the rationale. Isn't nil just one case of an empty > >> sequence of characters? Why describe it specially? > > > >How about the below instead: > > > > FUNCTION must be a function of one argument, and must return a value > > that is a sequence of characters: either a string, or a vector or > > list of numbers that are valid character codepoints; nil is treated > > as an empty string. > > I agree, this is better. > From: Stefan Kangas > Date: Thu, 13 Feb 2025 00:29:27 -0800 > Cc: 76242@debbugs.gnu.org, hong@topbug.net > > Eli Zaretskii writes: > > > How about the below instead: > > > > FUNCTION must be a function of one argument, and must return a value > > that is a sequence of characters: either a string, or a vector or > > list of numbers that are valid character codepoints; nil is treated > > as an empty string. > > LGTM. Thanks, installed on the emacs-30 release branch, and closing the bug. From unknown Thu Aug 14 21:54: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: Thu, 13 Mar 2025 11:24:17 +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