emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Clemente <n142857@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: radio links in middle of words.
Date: Thu, 10 Apr 2014 19:40:22 +0700	[thread overview]
Message-ID: <87ob09pdc9.wl%n142857@gmail.com> (raw)
In-Reply-To: <878urk9b07.fsf@gmail.com>

> 
> > 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

  reply	other threads:[~2014-04-10 12:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01  4:42 <<< >>> radio links should not match empty text Daniel Clemente
2014-04-02 12:59 ` Nicolas Goaziou
2014-04-02 16:46   ` radio links in middle of words. (was: Re: <<< >>> radio links should not match empty text) Daniel Clemente
2014-04-02 16:57     ` radio links in middle of words Nicolas Goaziou
2014-04-04 14:25       ` Daniel Clemente
2014-04-04 18:59         ` Nicolas Goaziou
2014-04-10 12:40           ` Daniel Clemente [this message]
2014-04-10 21:43             ` Nicolas Goaziou
2014-04-11  9:42               ` Bastien
2014-04-11 19:33                 ` Nicolas Goaziou
2014-04-15  7:27               ` Daniel Clemente

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ob09pdc9.wl%n142857@gmail.com \
    --to=n142857@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).