From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH v2] org-faq.org: Inline comments
Date: Sat, 8 Jul 2023 12:48:57 +0700 [thread overview]
Message-ID: <u8atcc$a1p$1@ciao.gmane.io> (raw)
In-Reply-To: <87jzvmwnmw.fsf@localhost>
[-- Attachment #1: Type: text/plain, Size: 477 bytes --]
On 29/06/2023 17:47, Ihor Radchenko wrote:
> Max Nikulin writes:
>> I think, it is time to add a FAQ entry, see the attachment.
>
> The proposed FAQ entry is overwhelming. It would work fine as a blog,
> but not as a quick answer to a question. I recommend leaving only the
> @@comment:...@@ part
See a shortened variant.
> - it is what we use ourselves in WORG sources.
I have not found it in the worg repository. There are enough @@html:@@
with a handful of @@latex:@@.
[-- Attachment #2: v2-0001-org-faq.org-Inline-comments.patch --]
[-- Type: text/x-patch, Size: 1941 bytes --]
From fc587b06c20e865636f16104c13b3f239680e7bf Mon Sep 17 00:00:00 2001
From: Max Nikulin <manikulin@gmail.com>
Date: Wed, 28 Jun 2023 22:40:40 +0700
Subject: [PATCH v2] org-faq.org: Inline comments
* org-faq.org (Export): New heading describing workarounds
for inline comments.
---
org-faq.org | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/org-faq.org b/org-faq.org
index ab661395..42cd2ef4 100644
--- a/org-faq.org
+++ b/org-faq.org
@@ -4492,6 +4492,38 @@ ** How can I suppress the page number in the footer of an exported PDF?
: #+LATEX: \thispagestyle{empty}
+** Is it possible to add inline comments?
+:PROPERTIES:
+:CUSTOM_ID: inline-comments
+:END:
+
+Unfortunately [[https://orgmode.org/manual/Comment-Lines.html][comments]]
+in Org mode are block-level elements, so they break paragraphs.
+
+As a workaround choose a non-standard export backend name and use it in
+[[https://orgmode.org/worg/org-syntax.html#Export_Snippets][export snippets]]:
+=@@comment: rewrite it @@= or even =@@c: be concise@@=.
+It is safer to avoid export snippets having no other content before or after them
+on the same line.
+#+begin_src org
+The following line may become a patagraph separator.
+@@comment: might give unexpected effect @@
+Put some text before @@comment: a better variant
+@@ and after instread.
+#+end_src
+
+Alternatives are:
+a [[https://orgmode.org/manual/Macro-Replacement.html][macro]]
+expanding to nothing,
+a [[https://orgmode.org/manual/Adding-Hyperlink-Types.html][custom link type]]
+exporting to empty string,
+[[https://orgmode.org/manual/Structure-of-Code-Blocks.html][source code blocks]]
+with exporting and evaluation suppressed through default header arguments.
+
+Unfortunately sites for hosting of open source code projects
+do not support such tricks and inline comments may appear in formatted
+=README.org= or other files.
+
* Backup
#+index: Backup
--
2.25.1
next prev parent reply other threads:[~2023-07-08 5:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 0:04 Inline comments ypuntot
2023-06-22 1:50 ` Max Nikulin
2023-06-28 15:51 ` [PATCH] org-faq.org: " Max Nikulin
2023-06-29 10:47 ` Ihor Radchenko
2023-06-30 10:34 ` Max Nikulin
2023-07-01 10:48 ` Ihor Radchenko
2023-08-06 18:34 ` Bastien Guerry
2023-07-01 15:24 ` Ihor Radchenko
2023-07-02 5:46 ` Org FAQ design (Re: [PATCH] org-faq.org: Inline comments) Max Nikulin
2023-07-08 5:48 ` Max Nikulin [this message]
2023-07-08 9:31 ` [PATCH v2] org-faq.org: Inline comments Ihor Radchenko
2023-07-10 16:09 ` Max Nikulin
2023-09-01 11:28 ` Ihor Radchenko
2024-04-15 12:17 ` Ihor Radchenko
2024-04-17 14:44 ` Max Nikulin
2024-04-20 11:14 ` Trailing whitespace after export snippets without a transcoder (was: [PATCH v2] org-faq.org: Inline comments) Ihor Radchenko
2024-04-20 15:02 ` Trailing whitespace after export snippets without a transcoder Max Nikulin
2024-04-21 13:00 ` Ihor Radchenko
2024-04-22 10:45 ` Max Nikulin
2024-04-22 19:01 ` Ihor Radchenko
2024-04-25 10:54 ` Max Nikulin
2024-04-28 11:19 ` Ihor Radchenko
2024-05-19 10:04 ` Ihor Radchenko
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='u8atcc$a1p$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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.