[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] radio links in middle of words.
From: |
Daniel Clemente |
Subject: |
Re: [O] radio links in middle of words. |
Date: |
Thu, 10 Apr 2014 19:40:22 +0700 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.4.50 (x86_64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
>
> > Can't we break at non-letters? Not at non-„word-constituents“, but at
> > non-letters. If emacs doesn't provide that concept, better build it.
>
> I don't know. Could you define precisely that concept?
>
I propose: radio links should be delimited by characters that don't match
[:alpha:] in emacs' regular expression syntax.
Letters (like: aá書ĉ) match, and delimiters (like: -'"/) don't.
Test it with:
: (string-match-p "[[:alpha:]]" "á")
: (string-match-p "[[:alpha:]]" "書")
: (string-match-p "[[:alpha:]]" "ĉ")
: (string-match-p "[[:alpha:]]" "'")
: (string-match-p "[[:alpha:]]" "-")
And the opposite: check for non-letterness:
: (string-match-p "[^[:alpha:]]" "-")
: (string-match-p "[^[:alpha:]]" "á")
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 something
like "(^|non-letter)LINK_TEXT($|non-text)".
I think that's better than the current solution and stills allows for radio
links which contain non-letters, like <<<o'clock>>>.
What do you think?
Daniel
- [O] <<< >>> radio links should not match empty text, Daniel Clemente, 2014/04/01
- Re: [O] <<< >>> radio links should not match empty text, Nicolas Goaziou, 2014/04/02
- [O] radio links in middle of words. (was: Re: <<< >>> radio links should not match empty text), Daniel Clemente, 2014/04/02
- Re: [O] radio links in middle of words., Nicolas Goaziou, 2014/04/02
- Re: [O] radio links in middle of words., Daniel Clemente, 2014/04/04
- Re: [O] radio links in middle of words., Nicolas Goaziou, 2014/04/04
- Re: [O] radio links in middle of words.,
Daniel Clemente <=
- Re: [O] radio links in middle of words., Nicolas Goaziou, 2014/04/10
- Re: [O] radio links in middle of words., Bastien, 2014/04/11
- Re: [O] radio links in middle of words., Nicolas Goaziou, 2014/04/11
- Re: [O] radio links in middle of words., Daniel Clemente, 2014/04/15