From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Re: radio links in middle of words. Date: Thu, 10 Apr 2014 19:40:22 +0700 Message-ID: <87ob09pdc9.wl%n142857@gmail.com> References: <878urp64ou.wl%n142857@gmail.com> <87bnwjopj5.fsf@gmail.com> <8738hv65n6.wl%n142857@gmail.com> <87sipvwtxy.fsf@gmail.com> <87r45d41fk.wl%n142857@gmail.com> <878urk9b07.fsf@gmail.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYEHY-0000Ix-9T for emacs-orgmode@gnu.org; Thu, 10 Apr 2014 08:40:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYEHO-0005jK-Nk for emacs-orgmode@gnu.org; Thu, 10 Apr 2014 08:40:39 -0400 Received: from mail-pb0-x229.google.com ([2607:f8b0:400e:c01::229]:51781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYEHO-0005j7-BC for emacs-orgmode@gnu.org; Thu, 10 Apr 2014 08:40:30 -0400 Received: by mail-pb0-f41.google.com with SMTP id jt11so3943457pbb.28 for ; Thu, 10 Apr 2014 05:40:28 -0700 (PDT) In-Reply-To: <878urk9b07.fsf@gmail.com> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org >=20 > > Can't we break at non-letters? Not at non-=E2=80=9Eword-constituents=E2= =80=9C, but at > > non-letters. If emacs doesn't provide that concept, better build it. >=20 > I don't know. Could you define precisely that concept? >=20 I propose: radio links should be delimited by characters that don't match= [:alpha:] in emacs' regular expression syntax. Letters (like: a=C3=A1=E6=9B=B8=C4=89) match, and delimiters (like: -'"/)= don't. Test it with: : (string-match-p "[[:alpha:]]" "=C3=A1") : (string-match-p "[[:alpha:]]" "=E6=9B=B8") : (string-match-p "[[:alpha:]]" "=C4=89") : (string-match-p "[[:alpha:]]" "'") : (string-match-p "[[:alpha:]]" "-") And the opposite: check for non-letterness: : (string-match-p "[^[:alpha:]]" "-") : (string-match-p "[^[:alpha:]]" "=C3=A1") So a radio link with LINK_TEXT should not only be a match of the regexp "= LINK_TEXT" but of "[^[:alpha:]]LINK_TEXT[^[:alpha:]]" (well, make it someth= ing like "(^|non-letter)LINK_TEXT($|non-text)". I think that's better than the current solution and stills allows for rad= io links which contain non-letters, like <<>>. What do you think? Daniel