From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: [PATCH] org-babel-goto-named-src-block bugfix and test Date: Sun, 12 Jun 2016 09:05:28 -0700 Message-ID: References: <84bn36k8ro.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bC7tH-0007l8-NL for emacs-orgmode@gnu.org; Sun, 12 Jun 2016 12:05:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bC7tD-0001l0-AF for emacs-orgmode@gnu.org; Sun, 12 Jun 2016 12:05:34 -0400 Received: from iport-bcv3-out.ucsd.edu ([132.239.0.89]:15410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bC7tD-0001kt-1g for emacs-orgmode@gnu.org; Sun, 12 Jun 2016 12:05:31 -0400 In-Reply-To: <84bn36k8ro.fsf@gmail.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: Marco Wahl , Org-Mode mailing list On Sun, 12 Jun 2016, Marco Wahl wrote: > The following message is a courtesy copy of an article > that has been posted to gmane.emacs.orgmode as well. > > Hi Charles, > >> [...] >> The test uses lines like: >> >> (execute-kbd-macro "\M-xorg-babel-goto-named-src-block\n\n") >> >> to emulate interactive usage. >> >> This feels like a hack, and the messages generated spill into my >> *shell* buffer when I run `make test'. If there is a cleaner way to >> do this, I'd like to know it. >> >> WDYT? > > Why not just use e.g. > > (org-babel-goto-named-src-block "def") > Because that does not test the `(interactive ...)' form, which comprises most of the code in `org-babel-goto-named-src-block'. Chuck