From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: In-line code, italics, quotation marks, etc.
Date: Tue, 04 Mar 2014 22:39:30 -0500 [thread overview]
Message-ID: <878uspe2kt.fsf@gmail.com> (raw)
In-Reply-To: 20140304210858.GB26421@pdavismbp15.iscinternal.com
Peter Davis <pfd@pfdstudio.com> 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) -
see
http://thread.gmane.org/gmane.emacs.orgmode/82300
and
http://thread.gmane.org/gmane.emacs.orgmode/82571
for more. In particular, Oleh shared his method of modifying this
variable - see
http://thread.gmane.org/gmane.emacs.orgmode/82571/focus=82669
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.
--
Nick
next prev parent reply other threads:[~2014-03-05 3:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 21:08 In-line code, italics, quotation marks, etc Peter Davis
2014-03-04 21:32 ` John Hendy
2014-03-05 3:39 ` Nick Dokos [this message]
2014-03-05 8:14 ` Alan Schmitt
2014-03-05 9:50 ` Michael Brand
2014-03-05 12:12 ` Nick Dokos
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=878uspe2kt.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).