[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: # Comments export
From: |
Ihor Radchenko |
Subject: |
Re: # Comments export |
Date: |
Sun, 29 May 2022 09:19:36 +0800 |
Ypo <ypuntot@gmail.com> writes:
> I wanted to export my # comments so I could share my notes with more people,
> using HTML export. I would export all of them.
>
> But, as it seems not possible, I think I will use footnotes. I liked #
> comments more, because their face can be customized and because they are
> nearer to the commented text (although footnotes can be moved manually
> wherever user wants to), # comments are like more "natural".
It is actually possible, but you will need to write an
org-export-before-parsing-hook that will convert all the comments into
exportable elements.
Not tested, but the hook might be something like
(defun org-export-replace-comments (_)
"Replace all the comments with note blocks."
(org-element-cache-map
(lambda (comment)
(setf (buffer-substring (org-element-property :begin comment)
(org-element-property :end comment))
(format "#+begin_note\n%s\n#+end_node\n" (org-element-property
:value comment))))
:granularity 'element
:restrict-elements '(comment)))
Best,
Ihor
- # Comments export, Ypo, 2022/05/28
- Re: # Comments export, Timothy, 2022/05/28
- Re: # Comments export, Ypo, 2022/05/28
- Re: # Comments export, Timothy, 2022/05/28
- Re: # Comments export, Samuel Wales, 2022/05/28
- Re: # Comments export, Ypo, 2022/05/28
- Re: # Comments export,
Ihor Radchenko <=
- Re: # Comments export, Ypo, 2022/05/29
- Re: # Comments export, Ihor Radchenko, 2022/05/29
- Re: # Comments export, Eric S Fraga, 2022/05/30
- Re: # Comments export, Juan Manuel MacĂas, 2022/05/30
- Re: # Comments export, Tim Cross, 2022/05/30