emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [RFC] Creole-style / Support for **emphasis**__within__**a word**
Date: Tue, 25 Jan 2022 23:27:50 +0700	[thread overview]
Message-ID: <ssp8e7$ah2$1@ciao.gmane.io> (raw)
In-Reply-To: <PAXPR06MB809380B001AE5BE4162C93F6845E9@PAXPR06MB8093.eurprd06.prod.outlook.com>

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.



  parent reply	other threads:[~2022-01-25 16:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 13:11 [RFC] Creole-style / Support for **emphasis**__within__**a word** Jambunathan K
2014-03-04 14:55 ` Jambunathan K
2014-03-22 14:05 ` Nicolas Goaziou
2014-03-22 14:21   ` Bastien
2014-03-22 14:54     ` Andreas Leha
2014-03-22 15:22       ` Bastien
2014-03-22 15:30     ` Nicolas Goaziou
2014-03-22 15:37       ` Bastien
2014-03-23  0:53         ` Samuel Wales
2014-03-23  0:06       ` Marcin Borkowski
2014-03-23 11:32         ` Suvayu Ali
2014-03-23 11:39           ` Marcin Borkowski
2014-03-23  2:59   ` Jambunathan K
2022-01-24 10:50     ` [O] " Vincent Belaïche
2022-01-24 11:54       ` Nicolas Goaziou
2022-01-24 12:09       ` [O] " Juan Manuel Macías
2022-01-24 12:32         ` Vincent Belaïche
2022-01-25 10:55           ` Nicolas Goaziou
2022-01-25 17:18             ` Vincent Belaïche
2022-01-25 17:30               ` Juan Manuel Macías
2022-01-25 18:45                 ` Vincent Belaïche
2022-01-25 17:52               ` Nicolas Goaziou
2022-01-25 18:20               ` Vincent Belaïche
2022-01-25 16:27           ` Max Nikulin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-03-04 13:00 Jambunathan K
2014-03-04 12:56 Jambunathan K

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='ssp8e7$ah2$1@ciao.gmane.io' \
    --to=manikulin@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).