From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Petton Newsgroups: gmane.emacs.help Subject: Re: no empty (zero) string predicate in Elisp Date: Sat, 25 Apr 2015 11:26:39 +0200 Message-ID: <87wq107e40.fsf@petton.fr> References: <87h9s4rhx5.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1429954930 18873 80.91.229.3 (25 Apr 2015 09:42:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Apr 2015 09:42:10 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 25 11:41:57 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ylway-0005Gb-BU for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Apr 2015 11:41:56 +0200 Original-Received: from localhost ([::1]:47784 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ylwax-00057H-QK for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Apr 2015 05:41:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ylwak-0004QY-6y for help-gnu-emacs@gnu.org; Sat, 25 Apr 2015 05:41:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlwMD-00024G-Tm for help-gnu-emacs@gnu.org; Sat, 25 Apr 2015 05:26:49 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:41699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlwMD-000248-N9 for help-gnu-emacs@gnu.org; Sat, 25 Apr 2015 05:26:41 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 17A9C207EA for ; Sat, 25 Apr 2015 05:26:41 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 25 Apr 2015 05:26:41 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=Shg35P6sYlH78W3qXDSph4SjibE=; b=CGnBL OKJaZUtS9wV/wGeeDH1u+B4JuiERqvo0TOnf4dBYgU8C64AzID81f7LzxDpU2ozo VpePEfYFfE0M2DC1isuu4gazFVel4Y35AEBIET3qbGB5W442Y7ycBo1YxX3dYya5 oUKjGJdRE+PZ4ucbf2LYgcJkB8oK5MHgcMdFLE= X-Sasl-enc: fydrd7EfuKIJgXlFAb613TtyZJjmu6jpasA5gdQEoIea 1429954000 Original-Received: from blueberry (unknown [31.211.216.84]) by mail.messagingengine.com (Postfix) with ESMTPA id 6E24CC00019; Sat, 25 Apr 2015 05:26:40 -0400 (EDT) In-reply-to: <87h9s4rhx5.fsf@debian.uxu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.28 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103992 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Emanuel Berg writes: > In one of my w3m extensions [1] I have > > (defun empty-string-p (str) > (string=3D str "") ) > > which obviously has nothing to do with w3m. Well, it's > been known to happen. I can live with having it there. > > However, the next time I want to use it in some other > file the byte-compiler tells me > > In end of data: wrap-search.el:98:1:Warning: the > function `empty-string-p' is not known to > be defined. > > OK, I get that away with > > (require 'w3m-unisearch) ; get empty-string-p > > But now I have a mention of w3m, in a file that has > nothing to do with w3m, to get empty-string-p, which > has nothing to do with w3m! Hi! You can use `string-empty-p' from subr-x.el or `seq-empty-p' from seq.el (which works on all sequence data types). seq.el will be included in Emacs 25.1, but in the meantime you can install it from GNU Elpa. Cheers, Nico =2D-=20 Nicolas Petton http://nicolas-petton.fr --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJVO13PAAoJECM1h6R8IHkQaYEH/1Avn4bFDJCy/lwkH2fjRGfG YZ73ztVCmL8PYrLfUI7Ro08TXo/xfhdZenU2CS40xoKvCy6pT/mZ2cekj5IYiPL0 +9F6LrRK5iEOrTy6oOCPcz42uUAk6g3+rRGNAY9wK5RQAGojePiFLdikqR4OCvid Yor03hM6VAD/Z9b332C0dThbd8TyzhOakxB3XKxlpKIR+ur/Oa9kGX6F2f8emZ1j 6uegplaiHjATK34aCvNwm6q786FZCXtzw9kQAvWZyUDLEIGUmZTpnA2AjN2qToFo auZFNlb7/5nbC+/EtCB8PI2/eamzopBrQzzQXaATZvk/OJIexB0uWgzNVUJOQeI= =U16z -----END PGP SIGNATURE----- --=-=-=--