emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: emacs-orgmode@gnu.org
Subject: Re: Org mode "style sheet" for software documentation
Date: Thu, 8 Sep 2022 15:38:38 -0500	[thread overview]
Message-ID: <F0F15991-CE51-4A63-BD59-B33F41B6CFC1@easesoftware.com> (raw)
In-Reply-To: <1EFEFC5A-24EE-43FC-9C4A-14F02CB8B0FD@easesoftware.com>


[-- Attachment #1.1: Type: text/plain, Size: 2607 bytes --]


> On Sep 8, 2022, at 11:20, Perry Smith <pedz@easesoftware.com> wrote:
> 
> I don’t understand this page: https://orgmode.org/worg/dev/org-syntax.html#Emphasis_Markers <https://orgmode.org/worg/dev/org-syntax.html#Emphasis_Markers>
> 
> In particular, the BORDER BODY BORDER part.  Note that this is the CONTENT which is already between MARKERS.
> 
> What I *think* I want is the ability to effectively create what I’ll call “macros”.  I’d like to be able to separate out things like file paths, code samples (both in line and block), keywords, environment variables, code variables, etc.  So, as I write, I would do (as a total pretend example) [var]foo_dog[var] to denote foo_dog as a code variable.  I’m wondering if that isn’t what the “BORDER” character is.  From the way the section is written, I would assume the leading border character must be the same as the trailing border character so I could do ~vfoo_docv~  where the “v” would be the border character?
> 
> OR… perhaps what this is trying to tell me is the first character after the leading marker and the last character before the trailing marker must not be whitespace characters since that is how it appears from all of the examples.
> 
> My logic is if I take the time to separate out all of the elements as I write the document, then I can later decide to format, for example, code snippets the same as variables.  It would also help me to be more consistent while I write because I’m (currently) having to remember “Ok… how did I format variables?  Was that ‘code' or ‘italics'? … Hmm…”
> 
> If I’ve misunderstood this page, then perhaps to save a follow up email, can someone tell me if I can create “macros” within Org mode to do what I mentioned OR tell me that I really don’t want to go down that path for some reason.

From the code:
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 code has clearer documentation than the documentation :-)

So… it seems I didn’t the two BORDER characters do not need to match.  So I’m off trying to figure out a way to create more emphasis MARKERS.  In the old days, we had only about 43 non-alphanumeric characters to play with but now with Emacs being 8 bit clean for countless years we have another 128 characters and with UTF-8 we have bazillians more!

So I’m gently poking around in the code to see how hard it would be to define more.

pedz


[-- Attachment #1.2: Type: text/html, Size: 3999 bytes --]

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-09-08 20:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 16:20 Org mode "style sheet" for software documentation Perry Smith
2022-09-08 20:38 ` Perry Smith [this message]
2022-09-09  5:09   ` Ihor Radchenko
2022-09-09 12:42     ` Perry Smith
2022-09-10  4:44       ` Ihor Radchenko
2022-09-09 15:00 ` Max Nikulin

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=F0F15991-CE51-4A63-BD59-B33F41B6CFC1@easesoftware.com \
    --to=pedz@easesoftware.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).