From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#13617: 24.2.92; [PATCH] Add strip-string Date: Mon, 25 Mar 2013 08:48:22 +0100 Message-ID: <51500146.7020603@easy-emacs.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1364197681 20585 80.91.229.3 (25 Mar 2013 07:48:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Mar 2013 07:48:01 +0000 (UTC) To: 13617@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 25 08:48:23 2013 Return-path: Envelope-to: geb-bug-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 1UK28i-0001mj-EE for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Mar 2013 08:48:20 +0100 Original-Received: from localhost ([::1]:47370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK28J-0001GM-Og for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Mar 2013 03:47:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK28G-0001GF-SN for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 03:47:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UK28F-0005mr-7p for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 03:47:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK28F-0005mn-4L for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 03:47:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UK2AM-0005bz-L0 for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 03:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Mar 2013 07:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13617 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136419777521532 (code B ref -1); Mon, 25 Mar 2013 07:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Mar 2013 07:49:35 +0000 Original-Received: from localhost ([127.0.0.1]:44139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UK29u-0005bE-4H for submit@debbugs.gnu.org; Mon, 25 Mar 2013 03:49:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37606) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UK29r-0005b6-HI for submit@debbugs.gnu.org; Mon, 25 Mar 2013 03:49:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UK27i-0005k3-Ki for submit@debbugs.gnu.org; Mon, 25 Mar 2013 03:47:19 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:56946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK27i-0005jz-HU for submit@debbugs.gnu.org; Mon, 25 Mar 2013 03:47:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK27h-0001FE-6o for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 03:47:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UK27f-0005jT-4Y for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 03:47:17 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.186]:62384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK27e-0005jL-RZ for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 03:47:15 -0400 Original-Received: from [192.168.178.21] (brln-4d0c3420.pool.mediaWays.net [77.12.52.32]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0LhYH7-1Uy5uj48Rd-00mrFU; Mon, 25 Mar 2013 08:47:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: X-Provags-ID: V02:K0:a1NJlLHmqpw7e894BXtwgHg1tPwOjObPZlfxxb26o4e fOJGC0v2RvIn5xz3LvIJraeHgFYfKmpSi3Cph0JooEdRNOKcV3 BPhgjpRIArST30m8YCA1w5U/SkQtEQm3l4WzetiSKtdete1mpV O4ADNeIpQnv/NwB2MiorcWHjLbl2sxXCN8RJuq+5kWng1dvxFZ GDCvCPaaIJ8MAAsHQRWheoE8VWG+pBTb482B/JK7lIceg2jHx7 sAxTdea/yd/FqfOCn0Pwpzx9kJtSCByE1qpSDFYWKMYWLZgCWt 6zaJsEWKVRPN/+42I6+CXSnSWroI5SLHnbcIPPzy2UQzZSZeZR 75yjPjjYqp9eXr7QgK175nedPvixnobxcyBr7+kNg X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72864 Archived-At: Am 03.02.2013 10:40, schrieb Leo Liu: > On 2013-02-03 16:56 +0800, Andreas Schwab wrote: >> You could use the same rules as skip-chars-forward. > +1 > I looked at skip-chars-forward before opening this bug but found it > complicate things by introducing new rules. > Which one? IMO you may use skip-chars... internally, which is fast and reliable. > In strip-string the idea is to have a default covering 90% of the use > cases: > > (strip-string s) ; strip both > (strip-string s nil "") ; strip leading > (strip-string s "") ; strip trailing Suggest keeping either boolean for not, resp. default, or a string containing chars overriding the default. while this is obsolet meanwhile: http://lists.gnu.org/archive/html/gnu-emacs-sources/2007-01/msg00004.html Andreas > > Refer users to regexp as in (info "(elisp)Regexp Special") for the > remaining 10% use cases. > > Regards, > Leo > > > > >