Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-10 Thread Mirko Vukovic
On Sat, Mar 10, 2012 at 2:00 PM, suvayu ali  wrote:
> On Sat, Mar 10, 2012 at 16:01, Mirko Vukovic  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



Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-10 Thread suvayu ali
On Sat, Mar 10, 2012 at 16:01, Mirko Vukovic  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.



Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-10 Thread Mirko Vukovic
Ilya Shlyakhter  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




Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-08 Thread Eric Schulte
Ilya Shlyakhter  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 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/



Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-08 Thread Ilya Shlyakhter

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.







Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-08 Thread Ilya Shlyakhter

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




Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-07 Thread Sebastien Vauban
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




Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-07 Thread Ilya Shlyakhter
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 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
>
>


[O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-07 Thread Ilya Shlyakhter
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