From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: src block: 'C-c C-c can do nothing useful here' if cursor on blank line Date: Fri, 27 Jan 2017 14:29:17 -0800 Message-ID: References: <874m0k9s1i.fsf@ucl.ac.uk> <87wpdgb4lz.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXF1R-0006X6-OQ for emacs-orgmode@gnu.org; Fri, 27 Jan 2017 17:29:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXF1O-0003mO-Lg for emacs-orgmode@gnu.org; Fri, 27 Jan 2017 17:29:33 -0500 Received: from iport-acv6-out.ucsd.edu ([132.239.0.13]:55292) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1cXF1O-0003fC-8S for emacs-orgmode@gnu.org; Fri, 27 Jan 2017 17:29:30 -0500 In-Reply-To: <87wpdgb4lz.fsf@kyleam.com> 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: Kyle Meyer Cc: emacs-orgmode@gnu.org On Fri, 27 Jan 2017, Kyle Meyer wrote: > Eric S Fraga writes: > >> On Friday, 27 Jan 2017 at 18:44, John Hendy wrote: >>> 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: >> >> I have noticed this recently as well. Not sure if it was always the >> case, mind you, but it would be nice if C-c C-c would work even when the >> cursor is on a blank line (within a src block, that is). > > I think this changed with 0b6a2e241 (C-c C-c does nothing when at a > blank line, 2013-02-15). I wasn't able to figure out the motivation for > that change. Nor I. Perhaps it was just an oversight. FWIW, in `org-ctrl-c-ctrl-c' : (looking-at-p "[ \t]*$") could be #+BEGIN_SRC emacs-lisp (and (looking-at-p "[ \t]*$") (not (eq 'src-block (org-element-type (org-element-context)))))) #+END_SRC without causing a lot of grief. I think `src-block' is the only relevant case. Chuck