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 16:54:26 +0200 Message-ID: <87r1gz440t.fsf@gmail.com> References: <20210618121807.xsjdbv4ouqbv4uex.ref@Ergus> <20210618121807.xsjdbv4ouqbv4uex@Ergus> <83v96bxsc6.fsf@gnu.org> <87zgvn47to.fsf@gmail.com> <83sg1fxp0d.fsf@gnu.org> <87v96b46g0.fsf@gmail.com> <83r1gzxncz.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="4639"; 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 16:55:13 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 1luFto-0000xe-O0 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Jun 2021 16:55:12 +0200 Original-Received: from localhost ([::1]:44056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luFtn-0007of-Gu for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Jun 2021 10:55:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luFtA-0007np-Is for help-gnu-emacs@gnu.org; Fri, 18 Jun 2021 10:54:32 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:38790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luFt8-0003Dg-Sx; Fri, 18 Jun 2021 10:54:32 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id c9so11101100wrt.5; Fri, 18 Jun 2021 07:54:30 -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=PZ7/UQ0FC08ldEfMrIj6Q3TBvsnNAm77YRToT4Xy/PE=; b=RVI2kYlS4pynquTHZHwP8Xrffe4p+7irdvrGLkG4ef9Rej7I9aZomeoNz+EI/8Mq04 hVq2mbRXe9+G2hNE7LfA7EgJBV7qwm7UcJmrYCkMft3mRTCQUSFBa0CabPc7u/TMSsvt P7yhknkWx0CtdmuMxBsqEOG2XXP2ry2Bx34VO9zive/opGZQ/tgAF/fbuBWRAU9YLle8 93+l6XS+vD7qFrBM81unpt9byZ0APbFmFoBAkJXTYK3QIzcDFpK1/a9O9DpseHFHV9z5 HzXD+I3RBFobDlb1QvFG2qmbVBWs184WNv86eA1eLyM5NkiThj3nToTwpDtLBKCMv+70 yejw== 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=PZ7/UQ0FC08ldEfMrIj6Q3TBvsnNAm77YRToT4Xy/PE=; b=sOKN1vWMdGmzVKK9maQZZtkbcSy5J3CBXsDIUeM7TmGNtEu1qepy7iV77YwoYAcCq3 /CpxOoc99uU2XALMWzl3JPWNHUrzxYH/9/Dwm4JZfYz39XTcevLjKmrNRzEGagwDb7/n U0tU+lgc31Gfz9fXUJgUn1SijSBBivDYSSp/BUfPnS9Xbs46djJZ3rFE79ueQ/C8SEsr AqXXUwBcdop9/VyQhtB9s+SQbQ1nFgBpQeu6BIUmj05z1saP4ESA0FI7hkunH+FFY4iF IRqBnjpzrR6uL1yosv6/Ska8/yrq7tej/MDQFOC/TLr/CT2/jzTmolY5UPRfuZSni4VH EpyQ== X-Gm-Message-State: AOAM533/+V91Db/TPWQ3LEfD1BzX0nAD03am20hpEi/31q6uZHJdPA/0 BZY3luoy+6vJZ51+9JD+L7mwdQ5LHyY= X-Google-Smtp-Source: ABdhPJyo3j8Iw5u1y6jgncVQ/+f3MUy1oRENjpp2+YgTxjz6ZYExFWK4JaVvqfhGiBsTpoDhoce4yQ== X-Received: by 2002:a05:6000:154b:: with SMTP id 11mr12943314wry.362.1624028068233; Fri, 18 Jun 2021 07:54:28 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id r1sm8245489wmh.32.2021.06.18.07.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 07:54:27 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <83r1gzxncz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Jun 2021 17:23:56 +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:130982 Archived-At: >>>>> On Fri, 18 Jun 2021 17:23:56 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: help-gnu-emacs@gnu.org >> Date: Fri, 18 Jun 2021 16:02:07 +0200 >>=20 >> >> Then it=CA=BCs buggy: >> >>=20 >> >> (let ((s (make-symbol ""))) >> >> (string-empty-p s)) >> >> =3D> t >>=20 Eli> Is it? What is the name of the symbol created there? >>=20 >> The name is "", but the symbol itself has no value, so string-empty-p >> should not say t Eli> But if the documentation will say that string-empty-p accepts symb= ols Eli> and uses their name, then the name of this symbol _is_ empty. Yes. But it doesn=CA=BCt say that. And I find it surprising. >> (let ((s (make-symbol ""))) >> (message s)) >> =3D> >> Debugger entered--Lisp error: (wrong-type-argument stringp ##) >> message(##) >> (let ((s (make-symbol ""))) (message s)) >> (progn (let ((s (make-symbol ""))) (message s))) >> eval((progn (let ((s (make-symbol ""))) (message s))) t) >>=20 >> Compare this with: >>=20 >> (let ((s "")) >> (string-empty-p s) =3D> t >> (message "string '%s'" s)) =3D> no complaints from 'message' Eli> This is because 'message' does NOT allow symbols as its first Eli> argument. It was intended to illustrate the state of 's'. Robert --=20