emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* :comments org doesn't export comments below code
@ 2018-07-12 10:44 Ken Mankoff
  2018-07-14  8:10 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Ken Mankoff @ 2018-07-12 10:44 UTC (permalink / raw)
  To: Org-mode

Hi Org List,

I'm trying to understand the use-case of the ":comments org" header option. It seems like a nice way to generate code files with comments embedded in theory, but in practice I find it restrictive. I'm wondering if I'm misunderstanding its purpose, using it wrong, or have found a bug.

MWE:

========================================================
#+PROPERTY: header-args :comments org :tangle debug.sh 

* Foo

Foo text about Bar and Baz

** Bar
:PROPERTIES:
:SOMETHING: BAR VALUE
:END:

Bar pre text

#+BEGIN_SRC sh :results verbatim
echo "bar code"
#+END_SRC
#+RESULTS:

Bar post text

** Baz

Baz text

========================================================

Generates this:

========================================================

# Bar
# :PROPERTIES:
# :SOMETHING: BAR VALUE
# :END:

# Bar pre text
echo "bar code"

========================================================

The issues are 1) there is no "post text" exported. The "bar post text" discusses the results of the source block above it, but is not exported to the code file as comments, and 2) The Foo text is not exported either, but contains info relevant to the Bar code.

Is there a way to get more of the Org file embedded in the tangled code?

Thanks,

  -k.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: :comments org doesn't export comments below code
  2018-07-12 10:44 :comments org doesn't export comments below code Ken Mankoff
@ 2018-07-14  8:10 ` Nicolas Goaziou
  2018-07-14 19:39   ` Grant Rettke
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2018-07-14  8:10 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: Org-mode

Hello,

Ken Mankoff <mankoff@gmail.com> writes:

> The issues are 1) there is no "post text" exported. The "bar post
> text" discusses the results of the source block above it, but is not
> exported to the code file as comments, and 2) The Foo text is not
> exported either, but contains info relevant to the Bar code.

This is expected. ":comments org" adds text above the tangled block up
to the headline above or a previous block, whichever comes first.

> Is there a way to get more of the Org file embedded in the tangled
> code?

I don't think so.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: :comments org doesn't export comments below code
  2018-07-14  8:10 ` Nicolas Goaziou
@ 2018-07-14 19:39   ` Grant Rettke
  2018-07-14 21:25     ` Ken Mankoff
  0 siblings, 1 reply; 4+ messages in thread
From: Grant Rettke @ 2018-07-14 19:39 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org-mode, Ken Mankoff

On Sat, Jul 14, 2018 at 3:10 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Ken Mankoff <mankoff@gmail.com> writes:
> > Is there a way to get more of the Org file embedded in the tangled
> > code?
> I don't think so.

What did you want to add to it?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: :comments org doesn't export comments below code
  2018-07-14 19:39   ` Grant Rettke
@ 2018-07-14 21:25     ` Ken Mankoff
  0 siblings, 0 replies; 4+ messages in thread
From: Ken Mankoff @ 2018-07-14 21:25 UTC (permalink / raw)
  To: Grant Rettke; +Cc: Org-mode, Nicolas Goaziou


On 2018-07-14 at 15:39 -04, Grant Rettke <gcr@wisdomandwonder.com> wrote:
> On Sat, Jul 14, 2018 at 3:10 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> Ken Mankoff <mankoff@gmail.com> writes:
>> > Is there a way to get more of the Org file embedded in the tangled
>> > code?
>
> What did you want to add to it?

Good question. I guess I expected everything at the current level to be exported, both text before and after the code block. I wouldn't mind having options to control if the entire file gets exported, or everything at this tree node level, or everything at this node level and below, or everything from the top level through this node, etc. I could imagine:

:comments org-node-only-pre  # this is the current behavior
:comments org-node-only-post # inverse
:comments org-node           # pre and post, this node
:comments org-subtree-and-children  # this node and all sub-nodes
:comments org-parent-tree           # from top level to here (and below?)
:comments org-file

   -k.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-14 21:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12 10:44 :comments org doesn't export comments below code Ken Mankoff
2018-07-14  8:10 ` Nicolas Goaziou
2018-07-14 19:39   ` Grant Rettke
2018-07-14 21:25     ` Ken Mankoff

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).