From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Imports / inclusion of s.el into Emacs Date: Sun, 3 May 2020 13:21:35 +0100 Message-ID: References: <87ftchy0go.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="103241"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Stefan Monnier , Richard Stallman , Emacs developers To: Philippe Vaucher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 03 14:22:21 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jVDdU-000Qie-VY for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 14:22:20 +0200 Original-Received: from localhost ([::1]:57502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVDdT-0002HQ-Uj for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 08:22:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVDd0-0001Qb-Ix for emacs-devel@gnu.org; Sun, 03 May 2020 08:21:50 -0400 Original-Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]:35820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVDcz-0007KD-58; Sun, 03 May 2020 08:21:50 -0400 Original-Received: by mail-io1-xd2a.google.com with SMTP id y26so9469021ioj.2; Sun, 03 May 2020 05:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=yONuj/953vTFHsq5kVJJc1yLYcPu/m4ogqVx9+f0+dA=; b=QrMQX1Ds23j4Xzc24XiYXDpRfA6o2ebqMeCzFZHuVmA2qSaKWgjW9r1KiocMkCq+GZ I01AG9+yv7OfPev4tYS96l0iQCe57IuMcERfIoB0ZtsnXNCaOfHxhTTIS0lChpo4dkxQ OJP7atzf5q/DCNjFrss7YWPXPUoN4ZCn4yy845IzdkhYGo9/7w3Q6bMRQE5oY/diXQO5 dT/Zz5GmygmSi8foHj+AjIbRrbWiE6WMUPbg6G0MqRz9ExVJwSU8mw7K4I8iJSPeJivh TxSPR1IcyTUfL2GRzGdH94F+RNqyuH0oggp+NPQxyBb0ttiyEJq13jSiUK6OfRtJsKme z9Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yONuj/953vTFHsq5kVJJc1yLYcPu/m4ogqVx9+f0+dA=; b=gxStEL2TTEpSbGuCn0TsNjCrFw7nJvwG/ZADlWIvzD9nyBH9jGi4a0jtf4SJ3Iu13D MOFzxIruOaZ58sGUXpZ3VXbnKVzo2IStiOCWEML64mTQe5rkCGv3/XxoWSQraoEzfj/o NSnLd1kq8V2PyNdJoO1pSfNHppbNFTbBThpgeaYVJnAqHkVL28LbivasyXMitpFhRs5U FtGYZVubO8U0MWkKkrxYPmRsPmJGGYMZFeMU16mBwBli6Nufcj10VQzyKHsHB0+pQ2OD kssJ7Nd4kJ/sbIBbJ2YqOXGmIfA1ij4rb1MCW/dDIWuQrkpcY8H67ATTKvzDDCVvAxQK ms1g== X-Gm-Message-State: AGi0Pub+4QxRipAFom3om7BPLv0pnP47cozB8yyhuXOjPmFDXLsF3Vks IyWvyff8Rl9/brL5NV2MRld4pDAi+uUnZwafmhc= X-Google-Smtp-Source: APiQypLaITvTetUMGf8MiTzEEmaPw8zRKMetE+hW0X4mmcFfJq4oDCgYuTHcD/IXOXFcPvzr3AwcnC8UgYw/LMVkuzM= X-Received: by 2002:a02:5bc9:: with SMTP id g192mr11033221jab.136.1588508507546; Sun, 03 May 2020 05:21:47 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d2a; envelope-from=joaotavora@gmail.com; helo=mail-io1-xd2a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248678 Archived-At: On Sun, May 3, 2020 at 11:06 AM Philippe Vaucher wrote: > > > Can you make a top-ten? > > Aliases: > > split-string aliased as string-split > downcase aliased as string-downcase > upcase aliased as string-upcase > format aliased as string-format > concat aliased as string-concat Don't do this. Just learn these 5 names, or use apropos, as has been suggested. Though curiously, downcase is string-downcase in CL, but that only really does work for strings. (BTW, a tangent, what do you think of CL's hyperspec reference? Check out http://www.lispworks.com/documentation/HyperSpec/Body/f_stg_up.htm and http://www.lispworks.com/documentation/HyperSpec/Body/c_string.htm Do you think this organization would be useful? What if it had a cool font and some cool logos? :-) I ask because that put me off at first, it looked mouldy.) > New functions (with string- instead of s-): > > s-truncate (len s) truncate-string-to-width (I got there with apropos truncate.*string btw). > s-chomp (s) Let's make a 'chomp' function. I'm always looking for that. Though there is a string-trim already (sigh). > s-left (len s) subseq > s-right (len s) Add an "from-end" arg to subseq? > s-repeat (num s) (cl-loop repeat num concat s) > s-capitalize (s) capitalize, also works for chars. > s-reverse (s) reverse, also works for sequences > s-contains-p (needle s &optional ignore-case) string-match-p > s-blank-p (s) ugh. nil is a string? Hope it helps, Jo=C3=A3o