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:02:07 +0200 Message-ID: <87v96b46g0.fsf@gmail.com> References: <20210618121807.xsjdbv4ouqbv4uex.ref@Ergus> <20210618121807.xsjdbv4ouqbv4uex@Ergus> <83v96bxsc6.fsf@gnu.org> <87zgvn47to.fsf@gmail.com> <83sg1fxp0d.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="26188"; 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:03:00 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 1luF5I-0006ac-LP for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Jun 2021 16:03:00 +0200 Original-Received: from localhost ([::1]:48238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luF5H-0004UX-3L for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Jun 2021 10:02:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luF4Z-0004UE-B1 for help-gnu-emacs@gnu.org; Fri, 18 Jun 2021 10:02:16 -0400 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:39814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luF4V-0005Gv-Ia; Fri, 18 Jun 2021 10:02:15 -0400 Original-Received: by mail-wm1-x32e.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso8777669wmh.4; Fri, 18 Jun 2021 07:02:10 -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=iI9Wf/vtOpgh4GxsNhhYcLemh5r/iYz20KPL7X2gV/8=; b=gPQAKqn0afTkHwo00sxBMBmIaJWZwM8UdRt67gvWUoPX9VwySBRgHQcdq7c2rrBo+x lsm9ku472bqRJ16qHKMqBAB2Lbu24hAumulOeEUMYeK8yKAbJIqKvj9lMpA5Za9KEvxM SoohXHpf9Gc+hZLXCo8aE5bLwOoHn60ZdihcjZHj9yIbhIoTFPcPwjCjpIz0p2r4yT2h 4YKAxo18hecbogycsGPsddM8J+O1+xeij8pzgpnQw7y487a4j5c5R8n55vyoIaXri9w0 wjVhgPQWpq/ZPjhdynF2ggZV2/6oL+c8RU4CJv0qceg2bHRIb2yl0LW57fSLgMDx7XPw GQsw== 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=iI9Wf/vtOpgh4GxsNhhYcLemh5r/iYz20KPL7X2gV/8=; b=XHqsx+5T2IJvygewnsa4oMnTqwWC8wPM1NYXwKDl+bVP8CM8BoDXgJLZUpYzkZjOCg u9Va51VaBo0v8SN9rSYFwmhTZQUaAlFLUq+kRNbLmeQYwXkflwt2nn5WqJxvwyJhG5L7 g/wzqCVvAW51mf6wNdFvqLBdlBaLmYVYg0Vuw5W3D24K5WQXdDQmHyWxvVl3AXGsLxyi g08dOFumPZLJNBAlIdKrhpHEJHADPJWdZR7VxGdVPt6Kt9OZB/ECbEnFFO4QZD7fxyyi aVN8cKFB57FB5kDQUznvFecFbr4DN04G4FTljgJIS+RsupKNwj3rgSks4oRQyVEGRVEM al8g== X-Gm-Message-State: AOAM5310Oi05lmF5JSyXWfpDK45p51J8qKvP1qPHgX44o2kc0s00DnJx BqSwoH+e7ranzqWA6RIeCAIwJOSjDOg= X-Google-Smtp-Source: ABdhPJwJpL9k0s4ep8S/SsznXyVKarAaq6NScn4CvFrJ15Hnetj85N5SEcEGaEWq8MdOQOFc2+f5IA== X-Received: by 2002:a1c:98d5:: with SMTP id a204mr11409097wme.43.1624024929178; Fri, 18 Jun 2021 07:02:09 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id p15sm7567840wmq.43.2021.06.18.07.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 07:02:08 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <83sg1fxp0d.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Jun 2021 16:48:18 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=rpluim@gmail.com; helo=mail-wm1-x32e.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:130978 Archived-At: >>>>> On Fri, 18 Jun 2021 16:48:18 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: help-gnu-emacs@gnu.org >> Gmane-Reply-To-List: yes >> Date: Fri, 18 Jun 2021 15:32:19 +0200 >>=20 Eli> Not clear. string-empty-p follows the examples of string=3D, which Eli> allows symbols as arguments (and uses their name). >>=20 >> Then it=CA=BCs buggy: >>=20 >> (let ((s (make-symbol ""))) >> (string-empty-p s)) >> =3D> t Eli> Is it? What is the name of the symbol created there? The name is "", but the symbol itself has no value, so string-empty-p should not say t (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) Compare this with: (let ((s "")) (string-empty-p s) =3D> t (message "string '%s'" s)) =3D> no complaints from 'message' =20=20 If you=CA=BCre saying this is expected, then it should *definitely* be documented, because for me the argument to 'string-empty-p' should be a string. Robert --=20