From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ethan Ligon Subject: [PATCH] org.texi: Replace broken example script for batch execution Date: Thu, 07 Apr 2016 21:05:27 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1144f9129bfbfc052feb7062 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoH7V-0004Jq-8m for emacs-orgmode@gnu.org; Thu, 07 Apr 2016 17:05:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoH7S-0007IE-0I for emacs-orgmode@gnu.org; Thu, 07 Apr 2016 17:05:41 -0400 Received: from mail-vk0-f47.google.com ([209.85.213.47]:34182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoH7R-0007Hz-Qx for emacs-orgmode@gnu.org; Thu, 07 Apr 2016 17:05:37 -0400 Received: by mail-vk0-f47.google.com with SMTP id e185so115442113vkb.1 for ; Thu, 07 Apr 2016 14:05:37 -0700 (PDT) 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: "Emacs-orgmode@gnu.org" --001a1144f9129bfbfc052feb7062 Content-Type: text/plain; charset=UTF-8 There is an example bash script in section 14.12 of the org manual which is meant to tangle source blocks from a supplied list of org files. The present version is broken in several small ways (it appears to date from a period when babel was still part of contrib), and requires a hard-coded specification of the path ORG_HOME. I've fixed the issue with ORG_HOME, another issue with grepping for strings that no longer are emitted by ob-tangle, and removed some obsolete dependencies. I'm finding the corrected script a useful thing to call from makefiles. -Ethan * doc/org.texi: Example bash script to tangle from *.org file was broken and obsolete; fixed to now work with recent versions of org. --- doc/org.texi | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 8b8dc65..f935692 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -16838,14 +16838,12 @@ for i in $@@; do done emacs -Q --batch \ ---eval "(progn -(add-to-list 'load-path (expand-file-name \"~/src/org/lisp/\")) -(add-to-list 'load-path (expand-file-name \"~/src/org/contrib/lisp/\" t)) -(require 'org)(require 'org-exp)(require 'ob)(require 'ob-tangle) -(mapc (lambda (file) - (find-file (expand-file-name file \"$DIR\")) - (org-babel-tangle) - (kill-buffer)) '($FILES)))" 2>&1 |grep tangled + --eval "(progn + (require 'org)(require 'ob)(require 'ob-tangle) + (mapc (lambda (file) + (find-file (expand-file-name file \"$DIR\")) + (org-babel-tangle) + (kill-buffer)) '($FILES)))" 2>&1 |grep -i tangled @end example @node Miscellaneous --001a1144f9129bfbfc052feb7062 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
There is an example bash script in section =C2=A014.12 of = the org manual which is meant to tangle source blocks from a supplied list of org files.

The present version is broken in several small ways (it appears to date from a period when babel was still part of contrib), and requires a hard-coded specification of the path ORG_HOME.

I've fixed the issue with ORG_HOME, another issue with grepping for strings that no longer are emitted by ob-tangle, and removed some obsolete dependencies.

I'm finding the corrected script a useful thing to call from makefiles.
-Ethan

* doc/org.texi: Example b= ash script to tangle from *.org file was broken and obsolete; fixed to now = work with recent versions of org.
---
=C2=A0doc/org.tex= i | 14 ++++++--------
=C2=A01 file changed, 6 insertions(+), 8 de= letions(-)

diff --git a/doc/org.texi b/doc/org.tex= i
index 8b8dc65..f935692 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -16838,14 +16838,12 @@ for i in $@@; = do
=C2=A0done
=C2=A0
=C2=A0emacs -Q --batch \=
---eval "(progn
-(add-to-list 'load-path (exp= and-file-name \"~/src/org/lisp/\"))
-(add-to-list '= load-path (expand-file-name \"~/src/org/contrib/lisp/\" t))
=
-(require 'org)(require 'org-exp)(require 'ob)(require = 9;ob-tangle)
-(mapc (lambda (file)
- =C2=A0 =C2=A0 =C2= =A0 (find-file (expand-file-name file \"$DIR\"))
- =C2= =A0 =C2=A0 =C2=A0 (org-babel-tangle)
- =C2=A0 =C2=A0 =C2=A0 (kill= -buffer)) '($FILES)))" 2>&1 |grep tangled
+ =C2= =A0 =C2=A0 --eval "(progn
+ =C2=A0 =C2=A0 (require 'org)= (require 'ob)(require 'ob-tangle)
+ =C2=A0 =C2=A0 (mapc (= lambda (file)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(find-fi= le (expand-file-name file \"$DIR\"))
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-babel-tangle)
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(kill-buffer)) '($FILES)))" 2>&1 |g= rep -i tangled
=C2=A0@end example
=C2=A0
=C2= =A0@node Miscellaneous

--001a1144f9129bfbfc052feb7062--