emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Charles Berry <ccberry@ucsd.edu>
To: emacs-orgmode@gnu.org
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)	[thread overview]
Message-ID: <loom.20140329T160427-687@post.gmane.org> (raw)
In-Reply-To: CAPpfmHKkpZEqFnPo8E0ow5Upb1rRR=UWRg43FcBJerTdOsqnJQ@mail.gmail.com

Pontus Michael <m.pontus <at> 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 

     <<code-block-name(optional arguments)>>

idiom for noweb. For example, with a suitably crafted block called 
'my-noweb', this reference

    <<my-noweb( "(concat", "foo", ")" )>>

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

  reply	other threads:[~2014-03-29 15:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28 23:46 Proposal to replace the prefix repetition with whitespace during expansion of noweb references Pontus Michael
2014-03-29 15:30 ` Charles Berry [this message]
2014-03-31  8:17 ` Sebastien Vauban
2014-08-16 12:55   ` Pierre-Henry FRÖHRING
2014-08-18 11:55     ` Sebastien Vauban
2014-08-23  8:35       ` Aaron Ecay
2014-10-12 12:43         ` Bastien
2014-10-12 15:42           ` Aaron Ecay
  -- strict thread matches above, loose matches on Subject: below --
2014-03-30 21:13 Pontus Michael
2014-04-11  9:36 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20140329T160427-687@post.gmane.org \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).