emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Marking specific elements for folding?
@ 2012-01-26 20:11 Yu
  2012-01-26 20:36 ` Achim Gratz
  2012-01-27 17:02 ` Eric S Fraga
  0 siblings, 2 replies; 5+ messages in thread
From: Yu @ 2012-01-26 20:11 UTC (permalink / raw)
  To: org-mode mailing list

Hello!

I was wondering, if there is a way to mark specific elements for
staying folded unless explicitly shown. Reading the manual I only
found possibilities to control the global folding of sections and
blocks in general.

However, what I want to do is:
- Embed a table of numerical data in my org-mode file.
- Perform calculations on the data, using the spread sheet capabilities.
- Plot the data, preferably using a (probably lengthy) gnuplot script.
- Export only the result graph.

However, the calculations are usually not wanted to be seen, when
looking at the file, so I'd like to specify, that this specific table
and this specific gnuplot code block are to be folded by default.

Is there some way to achieve this?

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

* Re: Marking specific elements for folding?
  2012-01-26 20:11 Marking specific elements for folding? Yu
@ 2012-01-26 20:36 ` Achim Gratz
  2012-01-27 13:43   ` Sebastien Vauban
  2012-01-27 17:02 ` Eric S Fraga
  1 sibling, 1 reply; 5+ messages in thread
From: Achim Gratz @ 2012-01-26 20:36 UTC (permalink / raw)
  To: emacs-orgmode

Yu <yu_icq@gmx.at> writes:
> However, the calculations are usually not wanted to be seen, when
> looking at the file, so I'd like to specify, that this specific table
> and this specific gnuplot code block are to be folded by default.
>
> Is there some way to achieve this?

You can put them in a drawer.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

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

* Re: Marking specific elements for folding?
  2012-01-26 20:36 ` Achim Gratz
@ 2012-01-27 13:43   ` Sebastien Vauban
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastien Vauban @ 2012-01-27 13:43 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Achim and Yu,

Achim Gratz wrote:
> Yu <yu_icq-RbZlAiThDcE@public.gmane.org> writes:
>> However, the calculations are usually not wanted to be seen, when
>> looking at the file, so I'd like to specify, that this specific table
>> and this specific gnuplot code block are to be folded by default.
>>
>> Is there some way to achieve this?
>
> You can put them in a drawer.

... or in a ARCHIVE'd section (to be opened with `C-TAB').

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Marking specific elements for folding?
  2012-01-26 20:11 Marking specific elements for folding? Yu
  2012-01-26 20:36 ` Achim Gratz
@ 2012-01-27 17:02 ` Eric S Fraga
  2012-01-28 14:24   ` Yu
  1 sibling, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2012-01-27 17:02 UTC (permalink / raw)
  To: Yu; +Cc: org-mode mailing list

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

Yu <yu_icq@gmx.at> writes:

> Hello!
>
> I was wondering, if there is a way to mark specific elements for
> staying folded unless explicitly shown. Reading the manual I only
> found possibilities to control the global folding of sections and
> blocks in general.
>
> However, what I want to do is:
> - Embed a table of numerical data in my org-mode file.
> - Perform calculations on the data, using the spread sheet capabilities.
> - Plot the data, preferably using a (probably lengthy) gnuplot script.
> - Export only the result graph.
>
> However, the calculations are usually not wanted to be seen, when
> looking at the file, so I'd like to specify, that this specific table
> and this specific gnuplot code block are to be folded by default.
>
> Is there some way to achieve this?

If you are not planning on exporting the data and code, you can put them
into a subheading and "COMMENT" it out.  I do this frequently.  See the
attached file for a simple example.  The really nice thing, for me, is
that you can have the results appearing *before* the data and
code...  This is not necessarily so long as you can put the results in
some other heading, say.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: simple example --]
[-- Type: text/org, Size: 436 bytes --]

#+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc

* Results
  Our analysis gives us these results:
  #+results: generate-results
  : 6
  
*** COMMENT code and data
    #+name: datatable
    | 1 |
    | 2 |
    | 3 |

    #+name: generate-results
    #+begin_src octave :export results :results value :var x=datatable
sum(x)
    #+end_src



[-- Attachment #3: Type: text/plain, Size: 137 bytes --]


HTH,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.243.g0e7f)

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

* Re: Marking specific elements for folding?
  2012-01-27 17:02 ` Eric S Fraga
@ 2012-01-28 14:24   ` Yu
  0 siblings, 0 replies; 5+ messages in thread
From: Yu @ 2012-01-28 14:24 UTC (permalink / raw)
  To: Yu, org-mode mailing list

Hello!

Thanks for the suggestion, but sadly it doesn't entirely fit my
intention; The subheadings in particular kill the purpose of hiding,
because it makes something, of which I want only a "here is something
folded" indication in a full text view show up in the content view and
forces me to introduce subheadings, were I'd rather not have any
(after all, overstructuring is as much a diversion from the actual
workflow as understructuring).

As an alternative (and when the stuff is too unimportant for the main
document but still should be exportable as a separate pdf),
outsourcing parts to an external org file would be okay too, but there
I did not yet find a possibility to refer to a table in a totally
different file, e.g.
  * There is a data table in the main file.
  * In a child file I want to do some processing using Babel (in
particular with gnuplot, but maybe also python, elisp... depending on
the case). Here I want to avoid having to copy the tables back and
forth, but would rather directly use the data from the main file in
the child file (in order to avoid having outdated data in the child
file).

HOWEVER: For the case where I really just want to hide parts of the
documents, that will never be exported as a document and usually
shouldn't be visible while editing, I found a solution right now,
using the /drawers/ functionality.

   : # .. Must add PROPERTIES drawer, because otherwise
   : # .. tree local property definitions will be exported as text.
   : #+DRAWERS: PROPERTIES HIDDEN
   :
   : * Hello World
   :
   : #+TBLNAME: hello-world-table
   :     | This is a data table |
   :
   : # .. This block is folded to just
   : # ..   :HIDDEN:...
   : # .. unless explicitly unfolded.
   : :HIDDEN:
   : #+BEGIN_SRC gnuplot :var data=hello-world-table :file foo.pdf
:<"fold that block" header argument>
   :     set term pdfcairo mono
   :     plot data using 1:2 blablabla
   : #+END_SRC
   : :END:
   :
   : And this table looks like [[foo.pdf]] when folded.

king regards, Yu


2012/1/27 Eric S Fraga <e.fraga@ucl.ac.uk>:
> Yu <yu_icq@gmx.at> writes:
>
>> Hello!
>>
>> I was wondering, if there is a way to mark specific elements for
>> staying folded unless explicitly shown. Reading the manual I only
>> found possibilities to control the global folding of sections and
>> blocks in general.
>>
>> However, what I want to do is:
>> - Embed a table of numerical data in my org-mode file.
>> - Perform calculations on the data, using the spread sheet capabilities.
>> - Plot the data, preferably using a (probably lengthy) gnuplot script.
>> - Export only the result graph.
>>
>> However, the calculations are usually not wanted to be seen, when
>> looking at the file, so I'd like to specify, that this specific table
>> and this specific gnuplot code block are to be folded by default.
>>
>> Is there some way to achieve this?
>
> If you are not planning on exporting the data and code, you can put them
> into a subheading and "COMMENT" it out.  I do this frequently.  See the
> attached file for a simple example.  The really nice thing, for me, is
> that you can have the results appearing *before* the data and
> code...  This is not necessarily so long as you can put the results in
> some other heading, say.
>
>
>
> HTH,
> eric
>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
> : using Org-mode version 7.8.03 (release_7.8.03.243.g0e7f)
>

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

end of thread, other threads:[~2012-01-28 14:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-26 20:11 Marking specific elements for folding? Yu
2012-01-26 20:36 ` Achim Gratz
2012-01-27 13:43   ` Sebastien Vauban
2012-01-27 17:02 ` Eric S Fraga
2012-01-28 14:24   ` Yu

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