emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] How to show/hide the snippet block in org-babel when the cursor is i


From: Ivanov Dmitry
Subject: [O] How to show/hide the snippet block in org-babel when the cursor is inside the snippet text
Date: Tue, 16 Dec 2014 14:33:26 +0300

I would like to implement the following. Suppose, we have this org file:

#+BABEL: :cache yes :tangle yes :noweb yes

#+NAME: top_block
#+begin_src perl :tangle "test.pl" :noweb tangle :shebang #!/usr/bin/perl
  use strict;
  use warnings;

  open(my $fh, "<", "test.txt")
      or die "cannot open < file name: $!";
  <<output-all>>
  close($fh);
#+end_src

#+NAME: output-all
#+begin_src perl
  while (my $line = <$fh>) {
      print $line;
  }
#+end_src

I can expand/collapse src blocks only when the cursor is on the top lines:

#+NAME: top_block
#+begin_src perl ...

But when it is inside any text in the scr block, expand/collapse doesn't 
work. How can I add this functionality as moving the cursor every time is
not nice.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]