From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification Date: Tue, 09 May 2017 14:05:13 +0200 Message-ID: <877f1qutfq.fsf@drachen> References: <87vapij1l7.fsf@holos> <6870A2B6-F685-4955-9C0A-256601DB47BC@gmail.com> <51D5E92C-F125-4ADE-8C55-E3513C00ECDC@gmail.com> <8F6958D6-3E13-4C31-B1F8-AF10A8FC8FC6@gmail.com> <838tmafigi.fsf@gnu.org> <7C79DA34-96F2-4D9F-9E9C-01574AE00F12@gmail.com> <8360hefepp.fsf@gnu.org> <0E129E02-FA64-4664-825B-8854A66CA9C6@gmail.com> <3D0BA0E6-02E2-4E90-8A59-121065547E1C@gmail.com> <87ziepho0q.fsf@gnu.org> <83vapderm3.fsf@gnu.org> <87vapdhi9j.fsf@gnu.org> <83tw4xeorf.fsf@gnu.org> <83vapbctij.fsf@gnu.org> <87vapb9dd8.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1494331561 3015 195.159.176.226 (9 May 2017 12:06:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 May 2017 12:06:01 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: mvoteiza@udel.edu, Eli Zaretskii , emacs-devel@gnu.org, Johan =?utf-8?Q?Bockg=C3=A5rd?= , tino.calancha@gmail.com To: Jean-Christophe Helary Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 09 14:05:52 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d83to-0000Zx-0w for ged-emacs-devel@m.gmane.org; Tue, 09 May 2017 14:05:52 +0200 Original-Received: from localhost ([::1]:36944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d83tt-0006Sb-Lo for ged-emacs-devel@m.gmane.org; Tue, 09 May 2017 08:05:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d83tJ-0006SL-3n for emacs-devel@gnu.org; Tue, 09 May 2017 08:05:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d83tH-00061N-QR for emacs-devel@gnu.org; Tue, 09 May 2017 08:05:21 -0400 Original-Received: from mout.web.de ([212.227.15.3]:60684) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d83tC-0005zZ-I6; Tue, 09 May 2017 08:05:14 -0400 Original-Received: from drachen.dragon ([84.63.126.150]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LqUG9-1dcQp23W4n-00e5iY; Tue, 09 May 2017 14:05:10 +0200 In-Reply-To: (Jean-Christophe Helary's message of "Tue, 9 May 2017 08:15:23 +0900") X-Provags-ID: V03:K0:tBMa7ndG6HRRlsC0ZbJvzgd0aMw/cvVg6vn1xfWABkkT2BrDuLe eKYj8Z0lWBGsbXdsbfD+A0umJ82HVBclTkWBJklQPuMy/J0M6LCdkenr+RDuNDru4kUB3/N 3UcXPNLobc2PSBph5DH1MHNtXx6FUI+gT40Fwa/TdfD+yrcwHOd8QIFh0zdns7D9o9u7icF 9sL6PeB5yo+MN4QCSPAMQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:WCEHQDBR1Us=:WAiSWRPP/yZqs7XcJkkJ38 s+rXy2Am1y3Ob/MgnjBFfLYMH1fYqFnxgXhzuy+5LR9rtnU1WgOuC1XOhemb0Y9nes1zkawD4 Oe2OQs8b9s64o2ezIR9fkJQXG8f6joaF0+Jh7xeEByWBNTp4riiTf5DeuoRhcWvqe9wwp8ezJ cf0Pn1J1TuriDW3B9maBW45ylIE+mk4ugpphktBG6y3LVPLPV5R3NAi0iEhe2nZV5KuC8nQUe bQyoZzvUK4E2xPIeL6HhLoCo2Dea11nG9oyANFwq/E2yq+LJTmamDxN8wpjQwtpkEKXjEom2G Edzb5wpCLRiAf/JLlmiJ/VeAEnT2f+PNPVTewyk1IDvaLF2MIiaYbKNNWnYxfhLuogagW0vmh d+X9RwqUwGxTn9hZrZxeB85siLBi9+BikXFdxyctwfEchy3B2HET/3l1mksh7wIxjW06q0yr0 HKk9ZSyjhn6FQpgc6vJX3H0P8oXJcycYHy3VOurZRRsjn2BsaEQYYLDjfTaRwNZQmwZZmjy+u 12CcKxtv4tnFY/nRuSsvbTNLsE6k2JH+B5IFsg5Iv9paZsU9sfXX+mLno3FSobAmIUeVUalxX b4VhfRZF3tQm1f2Yji42SqWydDUR+PDu0TOwICch5LKUSE2CvXTqT7vjLuOu3lgqjlPi6JNaO 6xP7By+SEk0DodvWvIZx8n7YNM/TJxg4wsBl4MdSQNZcZM+7PNAjDRys0cI7ysIV+RZ1uWwOv avHl7xKVgg8j+BwDW+HV7DQQTDhuHuUbykmByS0tdpo3H5v7aJDyBs3ntLiZUZDDlB1l8Jhd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214712 Archived-At: Jean-Christophe Helary writes: > > (split-string "abc, ;def g,hi" nil nil ",\\|;") > > => > > ("abc" "def" "g") ; BUG > > Ok, and the way to get your result is: > > (split-string "abc, ;def g,hi" nil nil "\\(,\\|;\\)") > > which means that Emacs thinks it is the caller's duty to provide the > grouping construct, which also happens to be ugly, and non-intuitive > since ",\\|;" is an otherwise valid regexp... > > So, how do we go about that? Do we report a bug? Or do we find a good > reason for that to happen and modify the documentation for > split-string ? I'm curious what could be reasons not to fix this (in the code). Allowing only a subset of possible regexps would be quite strange. Would there be any advantages? Michael.