From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin 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 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXDFQ-0004Ft-7W for emacs-orgmode@gnu.org; Fri, 27 Jan 2017 15:35:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXDFL-00045H-7c for emacs-orgmode@gnu.org; Fri, 27 Jan 2017 15:35:52 -0500 Received: from mail-qt0-x233.google.com ([2607:f8b0:400d:c0d::233]:36012) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cXDFL-00044v-2I for emacs-orgmode@gnu.org; Fri, 27 Jan 2017 15:35:47 -0500 Received: by mail-qt0-x233.google.com with SMTP id k15so155355750qtg.3 for ; Fri, 27 Jan 2017 12:35:45 -0800 (PST) In-reply-to: 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: John Hendy Cc: emacs-orgmode 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