From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gN+ZJOF97WSdUwAA9RJhRA:P1 (envelope-from ) for ; Tue, 29 Aug 2023 07:10:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gN+ZJOF97WSdUwAA9RJhRA (envelope-from ) for ; Tue, 29 Aug 2023 07:10:57 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0BB874490F for ; Tue, 29 Aug 2023 07:10:56 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PKZdTC90; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693285857; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=6awSFcZum7b8xLm54+F1Nkpr/E9IFtFNxJ4gsxHd6us=; b=Y7HABJMxMQjMBNG7KrVB6SvvO1GrbFwSKFwtJ4prGnGxt7hOuU4vS+O5b2H/Lk783gMbm9 CGfAridYu07f+91j6MQoClnJyKXM5rJ0sCx9C2sCoiBRjv+xlym3+i48wGPTdziX9xytUf t+47xlfzJkxVqq469ma2h9pHd1ZHYxzOo6kOs0TPTXw6DwELRfF5EgECjCkIApIbXtaNyJ 3LIggYy25Gd3cL7ds+JSwYituCwSW8U3Y4pnabja+03RNRM+Q9ypedhb7D2uYBFfyT/dct FUU1kEv6VSl5xbPmNA1AOXddX0Bdpw2q6c3uIUYmM+4w9TeqxmZ/c1R52ogJKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PKZdTC90; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693285857; a=rsa-sha256; cv=none; b=bBQFR6pQjWKtjKPbHHKufW9NIVe8ZJSfw/B7xPOyReRWrrg7fnkmMlIACA64pgdj+vNe+Z VTEcl1XGw7ofdlSRSIKnK3jzGfxIVR+iJYV5/xyD545+CxIt53oSEgt2CMseR79EEbHaAf KqYZ0QYmo4+tG4n4XNsbdYGwzGnQ/gKq4+do+h1gcdiDS9/0hSf+RZFW4e9uY/47lAqSk7 Txgcss88KiJ8SxviOLyfAdCLWZ1IP8BmRfXtS68HT1tbNF1n6qQa3Vg7lRmIiEfjWzW1IG QiXwDgfaqcdd/hSsvFyvbewY8CSyf561kF6Q5/INygTQqlzoDwzkuAYWQIELRQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaqzG-0002uD-Hf; Tue, 29 Aug 2023 01:10:00 -0400 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 1qaqz9-0002tv-3f for emacs-orgmode@gnu.org; Tue, 29 Aug 2023 01:09:51 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qaqz5-0001a0-0W for emacs-orgmode@gnu.org; Tue, 29 Aug 2023 01:09:50 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8C8F4240027 for ; Tue, 29 Aug 2023 07:09:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693285782; bh=u4pRzbuZGiM7g8+Z9h1xljyfknE+gdUsmXP2s3Hp79E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=PKZdTC905W/NcI6gosODdfIZqKKjyyOzLJnIbLIb1FDh8KOKSyd6PnafQUwP71ZP5 0KxErj8eY84GAOekRqkrWrN2pHcSUKort67mf+SkcHb97ciW6Dcc0v/9WBxA8pbJiQ hYaXpQah5CTp4MOxZG9xFYoFqvAVwC6wYOnZ222pFkOK8tX8sfRiB8amdaG4KcD77u Z5yZ/jKV/Nf14WkzajHxdrfEGD8BhpxrQj7KFKh2PpUnh16oium9Aie7Iv3pNNQd0i jUqXhoDFaUm27oq2oLO8GOmZ6F7vzpUomv4ndqRtXKjkCQl+baFFzvTXyQDE/+eTwn IYHhizSo3hmxQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RZb860WKzz6tx2; Tue, 29 Aug 2023 07:09:41 +0200 (CEST) From: Ihor Radchenko To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Fix a possibly problematic string comparison In-Reply-To: References: <20230827214320.46754-1-salutis@me.com> <878r9v4kt4.fsf@localhost> Date: Tue, 29 Aug 2023 05:10:08 +0000 Message-ID: <87ttsi1ljj.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -6.45 X-Spam-Score: -6.45 X-Migadu-Queue-Id: 0BB874490F X-TUID: U2Jmcg49gBtO Rudolf Adamkovi=C4=8D writes: > Ihor Radchenko writes: > >> This is not as trivial. Applying this patch will break tests. >> One needs to carefully examine the org-table logic to fix this >> particular warning. > > Wow! You are right. How is that even possible? In other words, what > value (of 'elements') can possibly be object-equal to a literal "" but > not string-equal to the same literal "" or vice versa? This is not what is happening.=20 - (if (and (eq elements "") (not keep-empty)) (eq elements "") is always nil - the warning is right. We never enter this branch of `if'. + (if (and (string-empty-p elements) (not keep-empty)) After the patch, we do enter this branch of `if', but it breaks tests. So, it is not just an innocent warning - it reveals a fault in logic elsewhere in the code. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at