From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [PATCH] fix bug: org-babel-tangle-file can't limit collected source code block by argument. Date: Mon, 04 Mar 2013 06:45:02 -0700 Message-ID: <87sj4bl1nl.fsf@gmail.com> References: <1362401524-84463-1-git-send-email-ryo.takaishi.0@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCViJ-0004MP-6K for emacs-orgmode@gnu.org; Mon, 04 Mar 2013 08:46:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCViG-0000oj-FP for emacs-orgmode@gnu.org; Mon, 04 Mar 2013 08:45:59 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:45377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCViG-0000oZ-8x for emacs-orgmode@gnu.org; Mon, 04 Mar 2013 08:45:56 -0500 Received: by mail-pa0-f43.google.com with SMTP id bh2so3195139pad.30 for ; Mon, 04 Mar 2013 05:45:55 -0800 (PST) In-Reply-To: <1362401524-84463-1-git-send-email-ryo.takaishi.0@gmail.com> (Ryo TAKAISHI's message of "Mon, 4 Mar 2013 21:52:04 +0900") 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: Ryo TAKAISHI Cc: emacs-orgmode@gnu.org Applied. Thanks, Ryo TAKAISHI writes: > * lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Change argument name collid org-babel-map-src-blocks's variable 'lang'. > --- > lisp/ob-tangle.el | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el > index ef14f22..95433ee 100644 > --- a/lisp/ob-tangle.el > +++ b/lisp/ob-tangle.el > @@ -352,7 +352,7 @@ that the appropriate major-mode is set. SPEC has the form: > (org-fill-template org-babel-tangle-comment-format-end link-data))))) > > (defvar org-comment-string) ;; Defined in org.el > -(defun org-babel-tangle-collect-blocks (&optional lang tangle-file) > +(defun org-babel-tangle-collect-blocks (&optional language tangle-file) > "Collect source blocks in the current Org-mode file. > Return an association list of source-code block specifications of > the form used by `org-babel-spec-to-string' grouped by language. > @@ -378,7 +378,7 @@ used to limit the collected code blocks by target file." > (unless (or (string-match (concat "^" org-comment-string) current-heading) > (string= (cdr (assoc :tangle (nth 2 info))) "no") > (and tangle-file (not (equal tangle-file src-tfile)))) > - (unless (and lang (not (string= lang src-lang))) > + (unless (and language (not (string= language src-lang))) > ;; Add the spec for this block to blocks under it's language > (setq by-lang (cdr (assoc src-lang blocks))) > (setq blocks (delq (assoc src-lang blocks) blocks)) -- Eric Schulte http://cs.unm.edu/~eschulte