emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Make org-babel-tangle work when target-file is nil
@ 2009-11-29 15:48 Nicolas Girard
  2009-11-29 17:10 ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Girard @ 2009-11-29 15:48 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

Hi all,

I'm glad to be back around there, it's been a while !

As the title says, the attached file makes org-babel-tangle work when
its "target-file" optional argument is nil.

Cheers,
Nicolas

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 814 bytes --]

diff --git a/contrib/babel/lisp/org-babel-tangle.el b/contrib/babel/lisp/org-babel-tangle.el
index c805373..103cc44 100644
--- a/contrib/babel/lisp/org-babel-tangle.el
+++ b/contrib/babel/lisp/org-babel-tangle.el
@@ -100,7 +100,7 @@ exported source code blocks by language."
                                       (file-name-sans-extension (buffer-file-name)))
                                      ((string= "no" tangle) nil)
                                      ((> (length tangle) 0) tangle))
-                                    target-file))
+                                    (or target-file buffer-file-name)))
                      (file-name (when base-name
                                   (if (string= base-name
                                                (file-name-sans-extension base-name))

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-30 15:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-29 15:48 [PATCH] Make org-babel-tangle work when target-file is nil Nicolas Girard
2009-11-29 17:10 ` Eric Schulte
2009-11-29 18:34   ` [babel] " Dan Davison
2009-11-29 19:12     ` Nicolas Girard
2009-11-30 15:55       ` Eric Schulte

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).