emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: 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	[thread overview]
Message-ID: <m24m0kjl5t.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <CA+M2ft_ZQJ4Jx7DnvOmG+2qB+KDFzh7837JnGE4BERN1i=7nig@mail.gmail.com>

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	other threads:[~2017-01-27 20:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 18:44 src block: 'C-c C-c can do nothing useful here' if cursor on blank line John Hendy
2017-01-27 20:35 ` John Kitchin [this message]
     [not found] <dfb1983ec7384aec9ca2172a9b27a66c@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-27 20:17 ` Eric S Fraga
2017-01-27 21:00   ` Kyle Meyer
2017-01-27 22:29     ` Charles C. Berry
2017-01-27 23:00       ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m24m0kjl5t.fsf@andrew.cmu.edu \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jw.hendy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).