Peter Davis <> writes:

> I'm trying to create an org page that contains a list of instructions,
> some of this include code and/or URLs. I'm having a dickens of a time
> trying to get this to format correctly, and the documentation isn't
> much help. For example:
>  - I want to have a numbered list with some of the steps being or
>  containing code, in monospaced text:
>      7) =something "abc"=
>    However, the second quote seems to prevent the =...= notation from
>    being recognized.
>  - I want a URL that does NOT get converted to a link, and in which I
>  can place italics to indicate that parts of the sample URL should be
>  replaced with other text:
>   http://localhost:<port number>/path/to/file/file.html
> In this case, "port number" and probably "/path/to/file/" should be
> italicized.
>  - Of course, combining these, I get situations like: =var str1 =
>  "<replace me> some other text."= Embedded equal signs, quotation
>  marks and emphasized text make this a nightmare.
> Can this be done, or is this just more complicated than org was
> designed to handle? I can, of course, edit the exported files, but
> that's pretty limiting.

Some of it can be done by modifying org-emphasis-regexp-components -
the default value prohibits quotes from appearing in the "border"
(right after the initial = or right before the final one) -

for more. In particular, Oleh shared his method of modifying this
variable - see

A slight modification of his method:

  (setf (nth 2 org-emphasis-regexp-components) " \t\r\n,")
  (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))

allows both single and double quotes in the border.

Since this is the third time in as many weeks that somebody brings this
exact problem up, this probably qualifies as a FAQ. But before going
there, is there *any* reason to forbid quotes in the border? IOW, maybe
it's a better idea to change the default value of
org-emphasis-regexp-components instead.

AFAIK, you cannot have nested emphasis, so getting emphasized text
within verbatim text will require the more backend-specific methods that
John describes.

Reply via email to