Browse Source

Fix site-map directory bug.

Report and patch by Sebastian Rose.
Carsten Dominik 16 years ago
parent
commit
0df8bfb77c
3 changed files with 12 additions and 5 deletions
  1. 1 1
      lisp/ChangeLog
  2. 7 1
      lisp/org-publish.el
  3. 4 3
      lisp/org.el

+ 1 - 1
lisp/ChangeLog

@@ -17,7 +17,7 @@
 2008-10-22  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org-exp.el (org-export-as-ascii): Handle the case that we are
-	bulishing from an indirect buffer.
+	publishing from an indirect buffer.
 
 	* org-table.el (org-table-copy-down): Fix bug with time stamp
 	increment.

+ 7 - 1
lisp/org-publish.el

@@ -645,8 +645,14 @@ Default for INDEX-FILENAME is 'index.org'."
 			  (directory-file-name
 			   (file-name-directory
 			    (file-relative-name localdir dir))) "/"))
-			(subdir ""))
+			(subdir "")
+			(old-subdirs (split-string
+				      (file-relative-name oldlocal dir) "/")))
 		    (setq indent-str (make-string 2 ?\ ))
+		    (while (string= (car old-subdirs) (car subdirs))
+		      (setq indent-str (concat indent-str (make-string 2 ?\ )))
+		      (pop old-subdirs)
+		      (pop subdirs))
 		    (dolist (d subdirs)
 		      (setq subdir (concat subdir d "/"))
 		      (insert (concat indent-str " + [[file:" 

+ 4 - 3
lisp/org.el

@@ -13879,12 +13879,13 @@ beyond the end of the headline."
 In fact, if the yanked text is a sequence of subtrees, fold all of them."
   (interactive)
   (if org-yank-folded-subtrees
-      (let ((beg (point)) end)
+      (let ((beg (point))
+	    (subtreep (org-kill-is-subtree-p))
+	    end)
 	(call-interactively 'yank)
 	(setq end (point))
 	(goto-char beg)
-	(when (and (bolp)
-		   (org-kill-is-subtree-p))
+	(when (and (bolp) subtreep)
 	  (or (looking-at outline-regexp)
 	      (re-search-forward (concat "^" outline-regexp) end t))
 	  (while (and (< (point) end) (looking-at outline-regexp))