From: Jambunathan K To: "Eric Schulte" Subject: Re: [BABEL] [PROPOSAL] Seemless editing of Babel Blocks References: <4C459236.3@gmail.com> <87k4opu5fk.fsf@gmail.com> <81hbivx88y.fsf@gmail.com> <8139ueykvc.fsf_-_@gmail.com> <878w3j1zos.fsf@stats.ox.ac.uk> <81k4n13mww.fsf@gmail.com> <87r5h9czxf.fsf@gmail.com> X-Draft-From: ("nntp+news.gmane.org:gmane.emacs.orgmode" 29790) Date: Sun, 05 Sep 2010 14:28:16 +0530 In-Reply-To: <87r5h9czxf.fsf@gmail.com> (Eric Schulte's message of "Sat, 04 Sep 2010 09:04:03 -0600") Message-ID: <81d3ssva6v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (windows-nt) --text follows this line-- jambu> How about providing user-accessible tapping points within jambu> 'org-babel-map-src-blocks' (or a variation thereof) that would jambu> enable me have a custom command in my .emacs. jambu> jambu> For the sake of record, my suggestion is very closely related to jambu> what is discussed here. jambu> jambu> http://eschulte.github.com/babel-dev/PROPOSED-tangle-entire-org-mode-file-in-comments.html Eric> I've just pushed up an implementation of the functionality Eric> described at the link above, see [1] for examples and details. Eric> Eric> Is this sufficient to satisfy the need you were addressing? If Eric> not how could it be improved? Eric> Footnotes: Eric> [1] http://eschulte.github.com/babel-dev/DONE-tangle-entire-org-mode-file-in-comments.html I am making a request for an API from BABEL core which roughly parallels org's org-map-entries. Using this API a user should be able to 'traverse' babel and non-babel blocks within a given scope (region, buffer), examine the local state (say a tag or a user-defined property on a subtree), provide a verdict on it's inclusion (yes I want it, no skip it) or possibly return a transformed custom content (as a list). 'org-babel-map-src-blocks' has the skeletal structure for this API. All it needs is some minimal tinkering to take on a more user-pluggable form. The proposed API would make UseCase-1 and UseCase-2 possible. UseCase-1: http://article.gmane.org/gmane.emacs.orgmode/28823 Section-6 provides an illustration. Section-5 helps one visualize the essentials of the propsed API. a) org-to-org-src-view => potential consumer of the proposed API. b) beg-org, end-org, beg-babel, end-babel => strategic 'points' of user-interest. c) body, body1 => Hooks for user UseCase-2: Tangling with custom pragmas. http://article.gmane.org/gmane.emacs.orgmode/29805 Additional Note: Thinking out loud here (aka contrived, over-the-top requirement). A user might want to override the in-buffer babel-control parameters while tangling or execution. Think of this scenario, I would like to tangle but with comments and line nos as a one-off (say for circulating to my colleagues). The in-buffer 'static/default' settings suppresses comments. I couldn't be bothered to edit the in-buffer settings just for this one-off case. Is there a possible way I can achieve this? Jambunathan K.