From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gPhFGSnVP2UsagAAauVa8A:P1 (envelope-from ) for ; Mon, 30 Oct 2023 17:09:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gPhFGSnVP2UsagAAauVa8A (envelope-from ) for ; Mon, 30 Oct 2023 17:09:13 +0100 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 8325E3A4C7 for ; Mon, 30 Oct 2023 17:09:12 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=red-bean.com header.s=202005newsp header.b=WYINfUF5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=red-bean.com (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698682153; a=rsa-sha256; cv=none; b=JiK/Y9s8BkygwkJKm9dSVc94cbtBdG5V/PT94nfO3ssm2yl7/c2E0LJxVUaVdF+34NKp/l wwwvwSCqyvJse8ihxayMiUIJD5K7aqhuf/kmHnxqqO7qlhwcfXc8uMIoTBrli1xZPLNM+j r1azYQ+GQ+RepG8HBFmRoYfFIXFrHGiuDY7i3YzgR6TKX+eYDpFeTpkD84TSQz4s5IwAHc cOHavizhhc0Xz4pFgAtH4MlcNeu0st0n8/HHBhs2EgMOQFzjW+RE8JcZ+F9YKhaHn4E6ud q2zr5wszGEGvI0W1KXpLWPfxepjwp/6k9L9iqLUPCjayA/XXwQl8UBPGs97RvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698682153; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=OZQ6mTRvTxwit4760/d05nYjVb34s0GHI5b7NmCYfN8=; b=Yl47LFIIH/m1LKuqkDYxusT6q4TV8wq2jumgIVfMoOQGRnCVCGvsc0P4fEdNLj6Zi1ZFA2 /IZ53T9o8+8zuPFlvO8kF8lyTiYLL0gFbn0+it9XeWbrreRvlhlYsOb1iykBy+RKXAc+iX +9TfE18wMheI8qRQFEBBGL16uW+Ryh2c/OEs+LpRQXOwc6gmzFBnk9f8/qX4OOSdwZ2XrP S/BRpOTy56H6pAX61+i8Ck9zCPcqW+DSOaXyd+Uyj8o+5dxzHCiQNtJIEjGNB9VxcEnb9t a3c/IszI2osbOkEpDrXRMgQKGg1RDgoU3lx+R9pq9ESHXwG9SOGVTw/SsjOyQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=red-bean.com header.s=202005newsp header.b=WYINfUF5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=red-bean.com (policy=none); 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxUoV-0004Ft-SB; Mon, 30 Oct 2023 12:08:27 -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 1qxUoS-0004FQ-Gp for emacs-orgmode@gnu.org; Mon, 30 Oct 2023 12:08:24 -0400 Received: from sanpietro.red-bean.com ([45.79.25.59]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxUoQ-0005vi-Rh for emacs-orgmode@gnu.org; Mon, 30 Oct 2023 12:08:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=red-bean.com; s=202005newsp; h=Content-Type:MIME-Version:Message-ID:Date: Reply-To:Subject:To:From:Sender:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=OZQ6mTRvTxwit4760/d05nYjVb34s0GHI5b7NmCYfN8=; t=1698682102; x=1699891702; b=WYINfUF5gEBdEuPSJrZMCNMIrAeYcOrp+jE1x2v2MVoel8eSt09nj6p7EBOTmFXb3QuBd3U8QtY ob8WOdPneJ+9Ivt9qTHh3MnqBiHroJlNEngcqWebCPIvLbMT+MfSoRFcKtX6lalf9VWfaIYKrIHYY ZmGO4MEqyv4AuyokozT5tIDzPJi1wIMeJqBuxbnUN5G/YR/hMkC6QAsyBgUFeLAoOcvo0Hq+aNYr5 arVqYnAHfJY9u1T8bw4g0kcb/sH9qbcv5Kyo1ipLo9RSM7y3m8pP5WYNiW24vJs2dA+wti2hwKrWe GhaY0PoObWp6Qf96ExIK6Zpj8CWwdxe8Yp0w==; Received: from 99-112-125-163.lightspeed.cicril.sbcglobal.net ([99.112.125.163]:58684 helo=floss) by sanpietro.red-bean.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qxUoP-00E5lH-00 for emacs-orgmode@gnu.org; Mon, 30 Oct 2023 16:08:21 +0000 From: Karl Fogel To: Org Mode Subject: [PATCH] Fix warning about using `eq' to compare strings. Date: Mon, 30 Oct 2023 11:08:19 -0500 Message-ID: <875y2oxfd8.fsf@red-bean.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=45.79.25.59; envelope-from=kfogel@red-bean.com; helo=sanpietro.red-bean.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-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: , Reply-To: Karl Fogel Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: 2.90 X-Migadu-Queue-Id: 8325E3A4C7 X-Migadu-Spam-Score: 2.90 X-TUID: m3v+2V6wvWPv --=-=-= Content-Type: text/plain; format=flowed Hi, everyone. Small fix attached -- it just makes a warning go away. Best regards, -Karl --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-lisp-org-table.el-fix-warning-about-eq-usage.patch >From a1a939191af1a195f260037510d407e7483ba05f Mon Sep 17 00:00:00 2001 From: Karl Fogel Date: Mon, 30 Oct 2023 10:33:29 -0500 Subject: [PATCH] lisp/org-table.el: fix warning about `eq' usage * lisp/org-table.el (org-table-make-reference): Use `equal' instead of `eq' to compare strings. This change makes the following warning go away: Warning (comp): org-table.el:2867:23: \ Warning: `eq' called with literal string that may never match (arg 2) This change does not affect the behavior of `org-table-make-reference' because `eq' treats all instances of the empty string as the same object anyway, e.g., `(eq (string-trim "aaabbb" "a+" "b+") "")' ==> t. The only effect of this change is to eliminate the warning. --- lisp/org-table.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index f5a433c7d..860d7720d 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2864,7 +2864,7 @@ list, `literal' is for the format specifier L." (if lispp (if (eq lispp 'literal) elements - (if (and (eq elements "") (not keep-empty)) + (if (and (equal elements "") (not keep-empty)) "" (prin1-to-string (if numbers (string-to-number elements) elements)))) -- 2.42.0 --=-=-=--