From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: Proposal to replace the prefix repetition with whitespace during expansion of noweb references Date: Sat, 29 Mar 2014 15:30:40 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTvDo-0006qx-UE for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 11:31:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTvDh-0003YD-FH for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 11:31:00 -0400 Received: from plane.gmane.org ([80.91.229.3]:37376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTvDh-0003Y2-8R for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 11:30:53 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WTvDe-0004Ws-HP for emacs-orgmode@gnu.org; Sat, 29 Mar 2014 16:30:50 +0100 Received: from 137.110.32.33 ([137.110.32.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2014 16:30:50 +0100 Received: from ccberry by 137.110.32.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2014 16:30:50 +0100 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Pontus Michael gmail.com> writes: > > I would like to propose a change to the behavior of noweb expansion in > relation to prefix handling. [snip] > I recommend to introduce a change that will replace the inserted prefix > with whitespace of equal length. [snip] The behavior you desire can be obtained by using the <> idiom for noweb. For example, with a suitably crafted block called 'my-noweb', this reference <> would expand just as you want. You can use the functions org-babel-goto-named-src-block and org-babel-get-src-block-info to achieve this. Multiple noweb references might be handled as well by delimiting the second argument, e.g. "foo,bar". --- Revising the behavior of the existing code base might break code that folks have written that depend on the current behavior. HTH, Chuck