Re: [O] auto hiding src blocks upon toggling headers

2014-10-09 Thread Adriaan Sticker
Works perfectly!
thanks!

2014-10-09 1:33 GMT+02:00 John Kitchin :

> Sorry for the weird from email below. This was from me. I have a
> separate email setup in Emacs for a class I am teaching.
>
> Instructor account  writes:
>
> > Adriaan Sticker  writes:
> >
> > This is not perfect but it seems close:
> >
> > #+BEGIN_SRC emacs-lisp
> > (defun my-hide (state)
> >   (message "%s" state)
> >   (if (or (eq state 'children)
> > (eq state 'subtree))
> >   (save-restriction
> >   (org-narrow-to-subtree)
> >   (org-hide-block-all
> >
> > (add-hook 'org-cycle-hook 'my-hide)
> > #+END_SRC
> >
> >
> >
> >
> >> Hi all
> >>
> >> Is there a way to automatically hide a source block when toggling the
> >> fold status of the parent header.
> >>
> >> Currently the hide status is remembered when folding its parent
> >> headers but this turned out not to be to practical in my current
> >> workflow.
> >>
> >> Greetings
> >>
>
> --
> ---
> John Kitchin
> Professor
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> http://kitchingroup.cheme.cmu.edu
>


[O] auto hiding src blocks upon toggling headers

2014-10-08 Thread Adriaan Sticker
Hi all

Is there a way to automatically hide a source block when toggling the fold
status of the parent  header.

Currently the hide status is remembered when folding its parent headers but
this turned out not to be to practical in my current workflow.

Greetings


Re: [O] autosave in org-src buffer only works ones

2014-09-28 Thread Adriaan Sticker
Hi,
 no, the point is not moving. Its the view. The view shift frow the point
in th middle of the view to the point at the last line in the view. It's
only in opened src blocks. I should maybe also point out that I use
prelude. I now very recently started to adopt a workflow with polymode in
org with src block and have had no issues so far.

Greetz

2014-09-27 23:10 GMT+02:00 Nicolas Goaziou :

> Hello,
>
> Adriaan Sticker  writes:
>
> > Hi, is it possible that these function cause the buffer automatically
> > scrolling when saving?
> > When I save My buffer jumps/scrolls up so that my cursor is on the last
> row
> > on my screen.
>
> I do not understand. Are you saying that auto-saving feature in src
> blocks moves point?
>
> If so, I cannot reproduce it.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] autosave in org-src buffer only works ones

2014-09-23 Thread Adriaan Sticker
Hi, is it possible that these function cause the buffer automatically
scrolling when saving?
When I save My buffer jumps/scrolls up so that my cursor is on the last row
on my screen.

Greets

2014-09-11 23:55 GMT+02:00 Adriaan Sticker :

> Cool, thanks!
>
> 2014-09-11 18:28 GMT+02:00 Nicolas Goaziou :
>
>> Hello,
>>
>> Adriaan Sticker  writes:
>>
>> > I've the following in my init.el
>> >
>> > (setq org-edit-src-auto-save-idle-delay 5)
>> >
>> > If I open in my org file a R code block with C-c ', edit into the opened
>> > org-src buffer with the ESS major mode activated and wait for 5s, I can
>> see
>> > autosave kicking in and my org buffer gets updated with my new code. But
>> > when I keep editing it doesn't save anymore. So it only save ones after
>> the
>> > first 5s when the org-src got openend and then it stops.
>>
>> This should now be fixed. Thank you for reporting it.
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>
>


Re: [O] meaningfull names for org-src buffers

2014-09-21 Thread Adriaan Sticker
Well, I ussually just try to live with this limitation. :)
I try to C-c ' in and out src block whenever possible so my my list with
buffer names doesnt get to cluttered.

Im also thinking about investigating the usefullness of polymode (
https://github.com/vitoshka/polymode)
So I dont have to go to a different buffer all the time. Do you have any
experience with this?

Greetings

2014-09-21 15:49 GMT+02:00 Grant Rettke :

> On Thu, Sep 11, 2014 at 5:05 PM, Adriaan Sticker
>  wrote:
> > I was wondering if it's somehow possible to give named org src buffer the
> > name they were give in their #+NAME tag? Now there are just called
> something
> > like:
> > *Org Src test.org[ R ]*
> >
> > But if you have multiple org-src buffers opened at the same time, its
> hard
> > to find the correct one back.
>
> Excellent idea. I've got so many small source blocks that it is too
> difficult to make sense of
> keeping multiple source block edit buffers open and limit them to one
> at a time eg
>
> ,
> | (setq org-src-window-setup 'current-window)
> `
>
> How have you come upon your workflow of keeping multiple open and what
> are some of the pros and
> cons that you've found with it?
>
> --
> Grant Rettke
> g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
> “Wisdom begins in wonder.” --Socrates
> ((λ (x) (x x)) (λ (x) (x x)))
> “Life has become immeasurably better since I have been forced to stop
> taking it seriously.” --Thompson
>


[O] meaningfull names for org-src buffers

2014-09-11 Thread Adriaan Sticker
Hi all

I was wondering if it's somehow possible to give named org src buffer the
name they were give in their #+NAME tag? Now there are just called
something like:
*Org Src test.org[ R ]*

But if you have multiple org-src buffers opened at the same time, its hard
to find the correct one back.

Greets


Re: [O] autosave in org-src buffer only works ones

2014-09-11 Thread Adriaan Sticker
Cool, thanks!

2014-09-11 18:28 GMT+02:00 Nicolas Goaziou :

> Hello,
>
> Adriaan Sticker  writes:
>
> > I've the following in my init.el
> >
> > (setq org-edit-src-auto-save-idle-delay 5)
> >
> > If I open in my org file a R code block with C-c ', edit into the opened
> > org-src buffer with the ESS major mode activated and wait for 5s, I can
> see
> > autosave kicking in and my org buffer gets updated with my new code. But
> > when I keep editing it doesn't save anymore. So it only save ones after
> the
> > first 5s when the org-src got openend and then it stops.
>
> This should now be fixed. Thank you for reporting it.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] autosave in org-src buffer only works ones

2014-09-11 Thread Adriaan Sticker
Hi all

I've the following in my init.el

(setq org-edit-src-auto-save-idle-delay 5)

If I open in my org file a R code block with C-c ', edit into the opened
org-src buffer with the ESS major mode activated and wait for 5s, I can see
autosave kicking in and my org buffer gets updated with my new code. But
when I keep editing it doesn't save anymore. So it only save ones after the
first 5s when the org-src got openend and then it stops.

Can this somehow be fixed or is this behaviour expected? I have quite big
source block so this can be an issue.

Thanks in advance