> On Sep 8, 2022, at 11:20, Perry Smith <p...@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
signature.asc
Description: Message signed with OpenPGP