emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] src block: 'C-c C-c can do nothing useful here' if cursor on bla


From: John Kitchin
Subject: Re: [O] src block: 'C-c C-c can do nothing useful here' if cursor on blank line
Date: Fri, 27 Jan 2017 15:35:42 -0500
User-agent: mu4e 0.9.19; emacs 25.1.1

I get this all the time too. It would be nice if it went away, I also
find it annoying.

John Hendy writes:

> Perhaps this is the intended behavior, but I noticed that I go to
> execute a code block and get the message "C-c C-c can do nothing
> useful here" if I'm not on the actual src block definition or a line
> of code. If I'm on a blank line inside it, it doesn't execute. Here
> was my test:
>
> #+begin min_config
>
> (add-to-list 'load-path "~/.elisp/org/lisp/")
> (add-to-list 'load-path "~/.elisp/org/contrib/lisp")
>
> (org-babel-do-load-languages
>  'org-babel-load-languages
>  '((R . t)))
>
> #+end
>
> Start with =emacs -Q= and then =M-x load-file RET
> ~/path/to/min-config=, then use this test file:
>
> * heading
>
> #+begin_src R
> ^
> x <- 1:10
> x
>
> #+end_src
>
> With the cursor at ^ it won't run. I would understand if this were in
> interactive mode using =C-c '=, but the behavior of C-c C-c is to run
> the whole block anyway. It seems like Org doesn't know I'm in a src
> block. Since blank lines are common, I'd expect not to have to make
> *sure* I'm on an actual line of code and that being anywhere in a src
> block should work.
>
> Thoughts?
>
>
> Thanks,
> John


-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



reply via email to

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