emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: verbatim and apostrophes
Date: Thu, 13 Feb 2014 07:40:25 -0500	[thread overview]
Message-ID: <87zjlvfao6.fsf@gmail.com> (raw)
In-Reply-To: 874n43gpu3.fsf@gmail.com

Nick Dokos <ndokos@gmail.com> writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> Hello Samuel,
>>
>> Samuel Wales <samologist@gmail.com> writes:
>>
>>> org-emphasis-regexp-components
>>
>> Thank you for the suggestion. I'm trying to make sense of it:
>>
>> org-emphasis-regexp-components is a variable defined in `org.el'.
>> Its value is (" 	('\"{" "- 	.,:!?;'\")}\\" " 	
>> ,\"'" "." 1)
>>
>> Documentation:
>> Components used to build the regular expression for emphasis.
>> This is a list with five entries.  Terminology:  In an emphasis string
>> like " *strong word* ", we call the initial space PREMATCH, the final
>> space POSTMATCH, the stars MARKERS, "s" and "d" are BORDER characters
>> and "trong wor" is the body.  The different components in this variable
>> specify what is allowed/forbidden in each part:
>>
>> pre          Chars allowed as prematch.  Beginning of line will be allowed too.
>> post         Chars allowed as postmatch.  End of line will be allowed too.
>> border       The chars *forbidden* as border characters.
>> body-regexp  A regexp like "." to match a body character.  Don't use
>>              non-shy groups here, and don't allow newline here.
>> newline      The maximum number of newlines allowed in an emphasis exp.
>>
>> You need to reload Org or to restart Emacs after customizing this.
>>
>> I see that "body-regexp" is "." so the problem is not from there. I also
>> see that "'" is forbidden as a border character, which should be fine in
>> my case as I'm using "~". So is the problem that "'" is both in prematch
>> and postmatch? But in my case I use it as a body character.
>>
>> So I'm afraid I don't understand why the "'" in ~'a ref~ is not accepted
>> as a body character, and what I should do to make sure it is.
>>
>
> See if
>
>   http://article.gmane.org/gmane.emacs.orgmode/73036/match=org+emphasis+regexp+components
>
> can help make some sense out of the line noise (although it was
> triggered by a different question). I believe the problem here is
> the BORDER regexp (the one that goes
>
> " 	
> ,\"'"
>
> above), not the BODY one: it forbids newlines, commas, double
> and single quotes. Try deleting the single quote from it.


Sorry - I need coffee. I read what you wrote and promptly forgot
all of it. So ignore most of what I wrote.

However, the part about the BORDER regexp is correct I believe: in ~'a ref~,
the ~ are the MARKERS; ' and f are the BORDER and "a re" is the BODY.

-- 
Nick

  reply	other threads:[~2014-02-13 12:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 13:24 verbatim and apostrophes Alan Schmitt
2014-02-12 21:11 ` Samuel Wales
2014-02-13  7:05   ` Alan Schmitt
2014-02-13 12:27     ` Nick Dokos
2014-02-13 12:40       ` Nick Dokos [this message]
2014-02-14  8:21         ` Alan Schmitt
2014-03-04  9:53           ` Bastien
2014-03-04 11:07             ` Alan Schmitt
2014-03-19 11:23               ` Bastien

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=87zjlvfao6.fsf@gmail.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).