From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: src block: 'C-c C-c can do nothing useful here' if cursor on blank line Date: Fri, 27 Jan 2017 12:44:07 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXBVK-0003qn-Vb for emacs-orgmode@gnu.org; Fri, 27 Jan 2017 13:44:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXBVK-0000UK-6B for emacs-orgmode@gnu.org; Fri, 27 Jan 2017 13:44:11 -0500 Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]:37521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cXBVK-0000SY-18 for emacs-orgmode@gnu.org; Fri, 27 Jan 2017 13:44:10 -0500 Received: by mail-it0-x235.google.com with SMTP id r185so62421586ita.0 for ; Fri, 27 Jan 2017 10:44:08 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode 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