emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists
@ 2012-03-08  1:13 Ilya Shlyakhter
  2012-03-08  1:58 ` Ilya Shlyakhter
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ilya Shlyakhter @ 2012-03-08  1:13 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

In Org, entry text can't have substructure (other than drawers and plain
lists): you can't have an entry that
has some text, then a subtree, then more text.
I just (re-)discovered that you can get around that by using "#+BEGIN_SRC
org" to include arbitrary org
subtrees in the middle of entry text.   That's useful not just when writing
in Org about Org, but anytime you want
to insert an extended sidenote in the middle of an entry.  As with all
source blocks, you edit it in its native (Org)
mode and it exports correctly.  You can copy links from the main Org and
past them into the nested Org.

Just wish I'd learned this sooner :)  So, maybe mention this in the manual
in the sections on drawers and plainlists.

ilya

[-- Attachment #2: Type: text/html, Size: 791 bytes --]

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

* Re: suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists
  2012-03-08  1:13 suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists Ilya Shlyakhter
@ 2012-03-08  1:58 ` Ilya Shlyakhter
  2012-03-08 13:14   ` Eric Schulte
  2012-03-08  7:32 ` Sebastien Vauban
  2012-03-10 15:01 ` Mirko Vukovic
  2 siblings, 1 reply; 9+ messages in thread
From: Ilya Shlyakhter @ 2012-03-08  1:58 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

p.s. it _would_ be good to have an option, when exporting a "#+BEGIN_SRC
org" block, to use the Org export settings
from the main Org file, rather than exporting a fontified copy of the Org
buffer for the block.  Is there a way to do that currently?

On Wed, Mar 7, 2012 at 8:13 PM, Ilya Shlyakhter <ilya_shl@alum.mit.edu>wrote:

> In Org, entry text can't have substructure (other than drawers and plain
> lists): you can't have an entry that
> has some text, then a subtree, then more text.
> I just (re-)discovered that you can get around that by using "#+BEGIN_SRC
> org" to include arbitrary org
> subtrees in the middle of entry text.   That's useful not just when
> writing in Org about Org, but anytime you want
> to insert an extended sidenote in the middle of an entry.  As with all
> source blocks, you edit it in its native (Org)
> mode and it exports correctly.  You can copy links from the main Org and
> past them into the nested Org.
>
> Just wish I'd learned this sooner :)  So, maybe mention this in the manual
> in the sections on drawers and plainlists.
>
> ilya
>
>

[-- Attachment #2: Type: text/html, Size: 1434 bytes --]

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

* Re: suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists
  2012-03-08  1:13 suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists Ilya Shlyakhter
  2012-03-08  1:58 ` Ilya Shlyakhter
@ 2012-03-08  7:32 ` Sebastien Vauban
  2012-03-08 12:53   ` Ilya Shlyakhter
  2012-03-10 15:01 ` Mirko Vukovic
  2 siblings, 1 reply; 9+ messages in thread
From: Sebastien Vauban @ 2012-03-08  7:32 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Ilya,

Ilya Shlyakhter wrote:
> In Org, entry text can't have substructure (other than drawers and plain
> lists): you can't have an entry that
> has some text, then a subtree, then more text.

Take a look at "inline tasks". I think that's more what you're after...

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists
  2012-03-08  7:32 ` Sebastien Vauban
@ 2012-03-08 12:53   ` Ilya Shlyakhter
  2012-03-08 12:59     ` Ilya Shlyakhter
  0 siblings, 1 reply; 9+ messages in thread
From: Ilya Shlyakhter @ 2012-03-08 12:53 UTC (permalink / raw)
  To: emacs-orgmode

On 3/8/2012 2:32 AM, Sebastien Vauban wrote:
>> In Org, entry text can't have substructure (other than drawers and plain
>> lists): you can't have an entry that
>> has some text, then a subtree, then more text.
>
> Take a look at "inline tasks". I think that's more what you're after...

Thanks -- looked at inline tasks and at
http://orgmode.org/worg/org-faq.html#closing-outline-sections
but that's not quite what I want.
I really do want a "nested org" -- something like a drawer or a 
plainlist, which is fully part of the entry and can be org-cycled
but has substructure.  Inline tasks do not nest.

Using #+BEGIN_SRC org / #+END_SRC does exactly what I want during 
editing -- lets me enter a "side note" that can be easily folded away
(like a drawer), is completely within the entry (unlike solutions from 
org-faq that add extra headlines), can have substructure (like plain 
lists) but is a full-featured org without plainlists' limitations.

Two problems with this so far:
    - org-store-link does not work when editing this nested org block 
under C-' .  Ideally, it would store a link that when followed would 
open this source block for editing in its native org-mode (as with C-') 
and then find the link within that.

    - when exporting to HTML, I want to run the HTML exporter on the 
nested org buffer and insert its results -- rather than inserting a 
boxed version of the Org source.  (This boxed version shows the hidden
asterisks in outlines, and its colors do not quite match the ones in the
Emacs buffer, among other things.)

thanks for help,

ilya

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

* Re: suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists
  2012-03-08 12:53   ` Ilya Shlyakhter
@ 2012-03-08 12:59     ` Ilya Shlyakhter
  0 siblings, 0 replies; 9+ messages in thread
From: Ilya Shlyakhter @ 2012-03-08 12:59 UTC (permalink / raw)
  To: emacs-orgmode

On 3/8/2012 7:53 AM, Ilya Shlyakhter wrote:
> - when exporting to HTML, I want to run the HTML exporter on the nested
> org buffer and insert its results -- rather than inserting a boxed
> version of the Org source.

p.s. one solution could be to run the HTML exporter on the nested org 
and show the result inside an IFRAME within the main org's HTML export.

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

* Re: suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists
  2012-03-08  1:58 ` Ilya Shlyakhter
@ 2012-03-08 13:14   ` Eric Schulte
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Schulte @ 2012-03-08 13:14 UTC (permalink / raw)
  To: Ilya Shlyakhter; +Cc: emacs-orgmode

Ilya Shlyakhter <ilya_shl@alum.mit.edu> writes:

> p.s. it _would_ be good to have an option, when exporting a
> "#+BEGIN_SRC org" block, to use the Org export settings from the main
> Org file, rather than exporting a fontified copy of the Org buffer for
> the block.  Is there a way to do that currently?
>

Try exporting the results of the block rather than the code with
":exports results".  You may need to play with some results headings as
well, see the manual for the possibilities.

Cheers,

>
> On Wed, Mar 7, 2012 at 8:13 PM, Ilya Shlyakhter <ilya_shl@alum.mit.edu>wrote:
>
>> In Org, entry text can't have substructure (other than drawers and plain
>> lists): you can't have an entry that
>> has some text, then a subtree, then more text.
>> I just (re-)discovered that you can get around that by using "#+BEGIN_SRC
>> org" to include arbitrary org
>> subtrees in the middle of entry text.   That's useful not just when
>> writing in Org about Org, but anytime you want
>> to insert an extended sidenote in the middle of an entry.  As with all
>> source blocks, you edit it in its native (Org)
>> mode and it exports correctly.  You can copy links from the main Org and
>> past them into the nested Org.
>>
>> Just wish I'd learned this sooner :)  So, maybe mention this in the manual
>> in the sections on drawers and plainlists.
>>
>> ilya
>>
>>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists
  2012-03-08  1:13 suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists Ilya Shlyakhter
  2012-03-08  1:58 ` Ilya Shlyakhter
  2012-03-08  7:32 ` Sebastien Vauban
@ 2012-03-10 15:01 ` Mirko Vukovic
  2012-03-10 19:00   ` suvayu ali
  2 siblings, 1 reply; 9+ messages in thread
From: Mirko Vukovic @ 2012-03-10 15:01 UTC (permalink / raw)
  To: emacs-orgmode

Ilya Shlyakhter <ilya_shl <at> alum.mit.edu> writes:

> 
> In Org, entry text can't have substructure (other than drawers and plain
lists): you can't have an entry thathas some text, then a subtree, then more
text.I just (re-)discovered that you can get around that by using "#+BEGIN_SRC
org" to include arbitrary org
> subtrees in the middle of entry text.   That's useful not just when writing in
Org about Org, but anytime you wantto insert an extended sidenote in the middle
of an entry.  As with all source blocks, you edit it in its native (Org)
> mode and it exports correctly.  You can copy links from the main Org and past
them into the nested Org.Just wish I'd learned this sooner :)  So, maybe mention
this in the manual in the sections on drawers and plainlists.ilya

Thank you for the pointer.  I am sometimes also frustrated by that feature.

But using BEGIN/END_SRC is really a hack.  I wonder if instead of using SRC
blocks, we could define (with some amount of coding) a more suitable kind of
blocks.  In my case I would like to have a BEGIN/END_TODO block.  This would
permit a layout such as

* header 1
  text, more text, much more text under header

#+begin_todo
** TODO task

** TODO another task
#+end_todo

  still more text under header 1


Maybe the TODO block is to specific.  Maybe a SUBTREE block would be sufficient.
Though, I am not sure if this would conflict with some major undrlying structure
of orgmode.

Mirko

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

* Re: suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists
  2012-03-10 15:01 ` Mirko Vukovic
@ 2012-03-10 19:00   ` suvayu ali
  2012-03-10 19:47     ` Mirko Vukovic
  0 siblings, 1 reply; 9+ messages in thread
From: suvayu ali @ 2012-03-10 19:00 UTC (permalink / raw)
  To: Mirko Vukovic; +Cc: emacs-orgmode

On Sat, Mar 10, 2012 at 16:01, Mirko Vukovic <mirko.vukovic@gmail.com> wrote:
> But using BEGIN/END_SRC is really a hack.  I wonder if instead of using SRC
> blocks, we could define (with some amount of coding) a more suitable kind of
> blocks.  In my case I would like to have a BEGIN/END_TODO block.  This would
> permit a layout such as

We have inline tasks for that.

About supporting non-tree-like structures in org files, this has been
discussed before. You can look up sometime towards the end of last
year in the archives to see the arguments in favour and against the
feature.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists
  2012-03-10 19:00   ` suvayu ali
@ 2012-03-10 19:47     ` Mirko Vukovic
  0 siblings, 0 replies; 9+ messages in thread
From: Mirko Vukovic @ 2012-03-10 19:47 UTC (permalink / raw)
  To: suvayu ali; +Cc: emacs-orgmode

On Sat, Mar 10, 2012 at 2:00 PM, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
> On Sat, Mar 10, 2012 at 16:01, Mirko Vukovic <mirko.vukovic@gmail.com> wrote:
>> But using BEGIN/END_SRC is really a hack.  I wonder if instead of using SRC
>> blocks, we could define (with some amount of coding) a more suitable kind of
>> blocks.  In my case I would like to have a BEGIN/END_TODO block.  This would
>> permit a layout such as
>
> We have inline tasks for that.
>
> About supporting non-tree-like structures in org files, this has been
> discussed before. You can look up sometime towards the end of last
> year in the archives to see the arguments in favour and against the
> feature.
>
> --
> Suvayu

Thank you.  I was not aware of the inline tasks capability

Mirko

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

end of thread, other threads:[~2012-03-10 19:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08  1:13 suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists Ilya Shlyakhter
2012-03-08  1:58 ` Ilya Shlyakhter
2012-03-08 13:14   ` Eric Schulte
2012-03-08  7:32 ` Sebastien Vauban
2012-03-08 12:53   ` Ilya Shlyakhter
2012-03-08 12:59     ` Ilya Shlyakhter
2012-03-10 15:01 ` Mirko Vukovic
2012-03-10 19:00   ` suvayu ali
2012-03-10 19:47     ` Mirko Vukovic

Code repositories for project(s) associated with this 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).