From c16fcd05e8d0cc7c9a704ac285d1e5f8f3b3d835 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sat, 6 Feb 2010 23:50:34 -0500 Subject: [PATCH] babel: Fix tangle file names with multiple '.'s --- contrib/babel/lisp/org-babel-tangle.el | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/babel/lisp/org-babel-tangle.el b/contrib/babel/lisp/org-babel-tangle.el index d75f1d2..5cfdca5 100644 --- a/contrib/babel/lisp/org-babel-tangle.el +++ b/contrib/babel/lisp/org-babel-tangle.el @@ -108,10 +108,10 @@ exported source code blocks by language." ((> (length tangle) 0) tangle)) target-file)) (file-name (when base-name - (if (and ext - (string= base-name - (file-name-sans-extension base-name))) - (concat base-name "." ext) base-name)))) + (if ext + (if (string= (file-name-extension base-name) ext) + base-name (concat base-name "." ext)) + base-name)))) ;; ;; debugging ;; (message ;; "tangle=%S base-name=%S file-name=%S she-bang=%S commentable=%s" -- 1.6.3.3