From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: strange behavior of mapconcat Date: Tue, 16 Apr 2024 08:36:41 +0200 Message-ID: <86ttk1ak5i.fsf@p200300d6272485fa68b269bdf31038f2.dip0.t-ipconnect.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35183"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.2; emacs 29.3 Cc: help-gnu-emacs@gnu.org To: shortcutz Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 16 08:37:49 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rwcRw-0008qb-BT for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 16 Apr 2024 08:37:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwcR5-0003OJ-O3; Tue, 16 Apr 2024 02:36:55 -0400 Original-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 1rwcR2-0003Nr-T8 for help-gnu-emacs@gnu.org; Tue, 16 Apr 2024 02:36:52 -0400 Original-Received: from wfhigh7-smtp.messagingengine.com ([64.147.123.158]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwcR0-00067t-B0 for help-gnu-emacs@gnu.org; Tue, 16 Apr 2024 02:36:52 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id DB73718000C8; Tue, 16 Apr 2024 02:36:45 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 16 Apr 2024 02:36:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1713249405; x=1713335805; bh=x2j0Qme9AL ljulaVPnKOTWiA4GC1n5Yd2gYDFZ9bSmY=; b=SzOQW+r5yyeAlR/25tZrNgZWMP g7RhjoH7qxygBH+Hn4eDpRgqnss49J1gMFtA6LB8tBFZFFP26sH9JItuqxrTpCJO T0JTIzmkhicjSK/EZzomMnR1iqkmc60deztHw0PSVT1q4/lXpBaVQ4+uhF+3DJdW 4VlpWJxNqqeFPwiFpLJCXdZ6wdlEncfebs1+IqwZvLkrQZezmRTFYtIgLY4HWTAW 2xdDKIwEyivrQzghgLm0JuD5e3zOOB0bPewb+kpeVY4Z+HHLVdbfhfxMZ4D+dsWV S+zG5Vyy+F256XCzv2/lgRFlXHtZEXpxsKieKDj2acAzDwOYrfyTODirKO+g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1713249405; x=1713335805; bh=x2j0Qme9ALljulaVPnKOTWiA4GC1 n5Yd2gYDFZ9bSmY=; b=dc2hU7dPnl+bn2JeqTFtlS/tUeuKVEeJQIKZRvPBgUeR 5QL2hFQ3cLVh8pGss2QdcJcpJOPolMMibZmAEWlJiOiJp6vVLLETFpMKszJl1+lV yBMe8fI4bl1JTGsGmEKTjOxiHD1kQzXKJptS1ALhQUmeeS7f1V1P84LoisC8qXmu ty9ENiF7/gqS69QZ1oD/1+50w1QMke/zRMvCSpIgegfmS3uKya1a+DOM3pjeg9sQ un2NYEeGSUnVg64IBGSG3CD7oii1YmX1YZy2s0GWgjRsyd3nzxlbj3wi8kJvb1hd Yr26KIQ+KPZcIan8ldh4/vmEUSWER8Mn4SLsKtKizw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejfedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefujghffgffkfggtgesth dtredttdertdenucfhrhhomheplfhoohhsthcumfhrvghmvghrshcuoehjohhoshhtkhhr vghmvghrshesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepfeekjefgff dtgfffjeduueekteehudfhveethffhheeihfeltdfghfegkeeivdehnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgvmhgvrh hssehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Apr 2024 02:36:44 -0400 (EDT) In-Reply-To: (shortcutz's message of "Mon, 15 Apr 2024 10:43:37 -0500") Received-SPF: pass client-ip=64.147.123.158; envelope-from=joostkremers@fastmail.fm; helo=wfhigh7-smtp.messagingengine.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146338 Archived-At: On Mon, Apr 15 2024, shortcutz wrote: > In a piece of code I call mapconcat with these arguments: > > (mapconcat 'org-no-properties "t" " ") > > I'm getting the error (wrong-type-argument sequencep 115). This is the same > if I use the identity function or any other string instead of "t": > > (mapconcat 'identity "t" " ") > (mapconcat 'identity "string1 string2" " ") > > What am I doing wrong? I don't really understand where the 115 is coming > from. The code is unchanged after macroexpanding, and sequencep says > "string1 string2" and "t" are both valid sequences. They are sequences, but sequences of char (which in Emacs is basically just an int). What's happening is that the function `org-no-properties` is called on each element of your string, i.e., on each character, separately. But `org-no-properties` requires a string as argument, not an int. That's where the error message is coming from: org-no-properties is saying that it requires a sequence as argument, but it got the integer 115 (the ASCII value of the character `t`) instead. -- Joost Kremers Life has its moments