From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.help Subject: Re: Elisp string function question Date: Fri, 18 Jun 2021 15:32:19 +0200 Message-ID: <87zgvn47to.fsf@gmail.com> References: <20210618121807.xsjdbv4ouqbv4uex.ref@Ergus> <20210618121807.xsjdbv4ouqbv4uex@Ergus> <83v96bxsc6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18083"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 18 15:37:12 2021 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 1luEgK-0004Zd-Bs for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Jun 2021 15:37:12 +0200 Original-Received: from localhost ([::1]:34800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luEgJ-0002nT-DC for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Jun 2021 09:37:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luEbj-0004BU-1C for help-gnu-emacs@gnu.org; Fri, 18 Jun 2021 09:32:27 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:36564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luEbh-0003nh-B5; Fri, 18 Jun 2021 09:32:26 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id n7so10820969wri.3; Fri, 18 Jun 2021 06:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=uLfCMJRtPQoDBu556KddYcQaIapNRnf++ZBqoMyPekM=; b=AcCJOkmht+Pyn6nWYa4zhhVfopm8hRjfZcqsVUqHli19zcuuHvvWv60Ourb5WO7G7H dZohdFvu3wx8VY3BQJrdEzMC0X4V4k80nbVg01ql9VBhXiM/IV93zVuLdSaUbFgebRp5 UxNtcH2PvVaruBOpC3IxkuOvpuIm+FGE8PpVglPyZCM0DhK4tEj2L9dfPVl37Xz2zee6 8NZq9+HyU852crCWM0H6SDx7hvFOttJAijKDqn/DmkB/krDAaGkPTmFg49dnfFa0Iwt6 lKJ772AJLnXZV2QkWI/cYJ2aK/NOl/e7hP5PfUBVJKgMNA5F8pqKNVQIhCfn/BXJl5RM G/ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=uLfCMJRtPQoDBu556KddYcQaIapNRnf++ZBqoMyPekM=; b=jQ2xrzdlDltNl6KMLv5jsdEBzjWv1vWRNZQyf9XNjmMxE0Iu17ASbFGXbKVCNMjdkm L5FPnKAv39P2KQtPNcVOUtmgalpP/+/EpNjLVRwCtnfaJvalfv6cWcjiaqTkjsNTXjwE QDf9mQGNQ4FKCQ1NcKq6ZMapQyMBA3qsNbt4+PnfNOQf/AlB1CELT7YytYwu8PgFGRiG QI3+AWx7DJWQRaCUSTaugxLGcCx73kCo13c3+/tNCrOK8G5/Jav5qjhTOw3p1A+5K+43 13G6smpTBae4nTfXgyLh1FRIUkhcTqjO9dxIiU5wHwqVqtMcmIcRYJgHyeVmfWz9B0sH rtsA== X-Gm-Message-State: AOAM532D8ButUWVQSHitUmxIfKczfqiE7qkS8jR6XIJjOOcpxpTUc5FG /EqyRSgJMWPi+AVD5O+dXggoSGMAxN4= X-Google-Smtp-Source: ABdhPJwVS/NCxZYsjdf3FKwWILlgRzqgaoq3vbGKu1bRnEGp2d60W+M8UPiR56C3AHShQru+We/9cQ== X-Received: by 2002:a05:6000:1282:: with SMTP id f2mr12352036wrx.67.1624023140970; Fri, 18 Jun 2021 06:32:20 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id k5sm8761320wmk.11.2021.06.18.06.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 06:32:20 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <83v96bxsc6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Jun 2021 15:36:25 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=rpluim@gmail.com; helo=mail-wr1-x433.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Xref: news.gmane.io gmane.emacs.help:130976 Archived-At: >>>>> On Fri, 18 Jun 2021 15:36:25 +0300, Eli Zaretskii said: >> Date: Fri, 18 Jun 2021 14:18:07 +0200 >> From: Ergus >>=20 >> I just tried and this: >>=20 >> (string-empty-p nil)=20 >>=20 >> returns nil. But nil is not an non-empty string. This forces to add = some >> extra checks when using this function. >>=20 >> Is this intended?=20 Eli> Not clear. string-empty-p follows the examples of string=3D, which Eli> allows symbols as arguments (and uses their name). Then it=CA=BCs buggy: (let ((s (make-symbol ""))) (string-empty-p s)) =3D> t Eli> I suggest to report a bug about this, because at the very least the Eli> doc string should mention this. (stringp nil) =3D> nil so the answer to the question "is this the empty string" is no. Robert --=20