emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Creole-style / Support for **emphasis**__within__**a word**


From: Max Nikulin
Subject: Re: [RFC] Creole-style / Support for **emphasis**__within__**a word**
Date: Tue, 25 Jan 2022 23:27:50 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 24/01/2022 19:32, Vincent Belaïche wrote:

Thank-you both for the reply, I should have mentioned that I am aware of
this trick but it works only for document encodings which have the
zero-width space, like UTF-8, I was after a fix for documents in
ISO-8859-15, aka latin-9.

I have a hope that 8bit charsets will disappear soon. UTF-8 alleviates issues with incompatible charsets used for the same alphabet.

You can use a trick with custom links, it has some limitation, but it is charset-neutral. See below for details.

[[sep:][~--some-cli-option=~]][[sep:][/some cli argument/]]

Vincent Belaïche writes:

Sorry to dig out this almost 8 year old discussion, but after looking
into the git HEAD Org Mode manual (v9.5 or so) (info "(org) Emphasis and
Monospace") node, and after looking into the mail archive I could not
find any answer to this question: how to switch style within a word.

I would like to put something like this in an OrgMode document:

   ~--some-cli-option=~/some cli argument/

You are a bit late. It was thoroughly discussed a month ago:

Denis Maier. Org-syntax: Intra-word markup.
Thu, 2 Dec 2021 11:50:32 +0100.
https://list.orgmode.org/4897bc60-b74f-ccfd-e13e-9b89a1194fdf@mailbox.org/

Eric S Fraga. On zero width spaces and Org syntax.
Mon, 06 Dec 2021 11:40:57 +0000.
https://list.orgmode.org/87r1aqj706.fsf@ucl.ac.uk

A very strong +1 on this.  Org has enough /escape mechanisms/, as you
call them, to cater for special cases, and these include @@...@@, babel,
and filters, amongst others.  The simplicity of org is a major
advantage.

Actually I had expectation that export snippets or macros may help in such case. I can not say that results the following observations are intuitive for me.

---- >8 ----
#+macro: first $1
- Custom link
  #+begin_src elisp :results none :exports both
    (org-link-set-parameters
     "sep"
     :export (lambda (path desc backend)
               (if (org-export-derived-backend-p backend 'org)
                   (org-link-make-string (concat "sep:" path) desc)
                 (or desc ""))))
  #+end_src
  + Requires evaluation of elisp code.
  + May be defined to remain on its place after export to Org.
  + May be defined to completely disappear during export
    to other formats
  + Does not allow to put a link inside or to be put inside a link.
  + Does not deactivate markup when put inside:
    *[[sep:]]bold* /italic[[sep:]]/.
  + May be placed immediately after markup /inter/[[sep:]]word.
  + Deactivates following marker inter[[sep:]]/word/.
  + Markup may be placed inside description
  + [[sep:][~--some-cli-option=~]][[sep:][/some cli argument/]]
- Zero width space
  + Invisible, so not really plain text markup.
  + It persists in export result, so a filter is required.
  + =C-x 8 RET 200B RET=
  + ~--some-cli-option=~​/some cli argument/
- Export snippet
  + For some reason =ox-org= does not define
    ~export-snippet~ transcoder,
    so they will be pruned during export to org.
  + May be used to deactivate markup:
    @@s:x@@*not bold* /not italic/@@s:x@@
    (must be put outside).
  + Does not deactivate markup when it is inside:
    *@@s:x@@bold* /italic@@s:x@@/.
  + Does not help when it is necessary to activate markup
    without a space inter@@s:x@@/word/ /inter/@@s:x@@word.
- Macro is useless (besides deactivation of markup when combined
  with export snippets in definition)
  + Beware of commas:
    {{{first("missed" after comma disappears, missed)}}}.
  + Not survived after export to Org.
  + Can not be used to activate markup in any form:
    not{{{first(*bold*)}}}, {{{first(*not*)}}}bold,
    not{{{first()}}}*bold*, {{{first(not)}}}{{{first(*bold*)}}}.
  + Can not be used (without e.g. export snippets) to deactivate markup.
    Still {{{first(/)}}}italic{{{first(/)}}} and broken second macro.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]