From mboxrd@z Thu Jan 1 00:00:00 1970 From: "sgeorgii ." Subject: Re: [RFC] [PATCH] Changes to Tag groups - allow nesting and regexps Date: Thu, 26 Nov 2015 10:30:29 +0300 Message-ID: References: <87ziy28ccw.fsf@nicolasgoaziou.fr> <87r3je8723.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1r0h-0002sN-Tq for emacs-orgmode@gnu.org; Thu, 26 Nov 2015 02:30:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1r0g-0000P2-LX for emacs-orgmode@gnu.org; Thu, 26 Nov 2015 02:30:31 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:36080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1r0g-0000Ow-EX for emacs-orgmode@gnu.org; Thu, 26 Nov 2015 02:30:30 -0500 Received: by wmww144 with SMTP id w144so9749493wmw.1 for ; Wed, 25 Nov 2015 23:30:30 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?UTF-8?Q?Gustav_Wikstr=C3=B6m?= Cc: "emacs-orgmode@gnu.org" , Nicolas Goaziou >From my side I confirm the second patch works fine for me so far on current org-mode. Thank you Gustav, Nikolas! Any chance for this patch to go upstream, please? On 25 November 2015 at 18:39, Gustav Wikstr=C3=B6m wrote: > Hi, > > Taking your comments and improving the first patch a bit resulted in the = attached one. It replaces the previous. Using string-prefix-p and string-su= ffix-p solves the out of index problem in the substrings. > > BR > Gustav > >> -----Original Message----- >> From: Nicolas Goaziou [mailto:mail@nicolasgoaziou.fr] >> Sent: Wednesday, November 25, 2015 15:53 >> To: Gustav Wikstr=C3=B6m >> Cc: emacs-orgmode@gnu.org; sgeorgii . >> Subject: Re: [O] [RFC] [PATCH] Changes to Tag groups - allow nesting and >> regexps >> >> Gustav Wikstr=C3=B6m writes: >> >> > Hmm, since the error was thrown when trying to look at indexes outside >> > of the string in (substring ... ), I don't see how isregexp can be >> > left as is. We have to make sure the substring-code is not evaluated >> > if the tag is empty. What am I missing? >> >> Nothing, I was clear as mud. >> >> (cond >> ((string=3D "" tag) (setq f1 '(not tags))) >> ((and (equal "{" ...) >> (equal "}"...)) >> ...) >> (t ...)) >> >> Or even >> >> ((and (string-prefix-p "{" ...) >> (string-suffix-p "}" ...))) >> >> on master. >> >> Regards,