GNU bug report logs - #76055
29.4; Doc of string-empty-p

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Tue, 4 Feb 2025 20:29:01 UTC

Severity: minor

Tags: wontfix

Found in version 29.4

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "76055 <at> debbugs.gnu.org" <76055 <at> debbugs.gnu.org>, "stefankangas <at> gmail.com" <stefankangas <at> gmail.com>
Subject: bug#76055: 29.4; Doc of string-empty-p
Date: Fri, 7 Feb 2025 16:47:37 +0000
> > > However, while extending to strings comparison to symbol names could
> > > make sense, telling whether a string is empty (the subject of this
> > > report) is NOT: what symbol could have an empty name?
> >
> > That's easy.
> >
> > (intern "") gives you such a symbol.
> > It's written ## (dunno why).
> >
> > (symbol-name '##) ; => ""
> 
> And where did you see such symbols used in Emacs?

I didn't say I see uses in Emacs (whatever that
might mean).  I haven't looked for them.

Who introduced the symbol `##' into Elisp?
I have no idea.  But yes, symbols with
empty-string names have long existed in Lisps.
There's no reason they wouldn't or shouldn't.

Do you know of a reason?  If so, do you propose
to change Elisp to remove their possibility?

_I_ didn't design `string=' or `string-empty-p'
to accept symbols.  I'm OK with that, provided
it's documented.

As I said, other reasonable definitions could
do either of the following:

* Return nil for any arg that's not a string.
* Raise an error for any arg that's not a string.

But neither is the choice that Emacs made.

What's not helpful is to name the function as
being about strings, and document it only as
being about strings.  `string=' doc doesn't
have that doc bug, at least.




This bug report was last modified 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.