[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/org/org-publish.el,v
From: |
Carsten Dominik |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/org/org-publish.el,v |
Date: |
Sun, 12 Oct 2008 06:12:54 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Carsten Dominik <cdominik> 08/10/12 06:12:47
Index: org-publish.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-publish.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- org-publish.el 25 Jul 2008 23:02:15 -0000 1.7
+++ org-publish.el 12 Oct 2008 06:12:46 -0000 1.8
@@ -4,7 +4,7 @@
;; Author: David O'Toole <address@hidden>
;; Maintainer: Bastien Guerry <bzg AT altern DOT org>
;; Keywords: hypermedia, outlines, wp
-;; Version: 6.06b
+;; Version: 6.09a
;; This file is part of GNU Emacs.
;;
@@ -23,8 +23,6 @@
;;; Commentary:
-;; Requires at least version 4.27 of org.el
-
;; This program allow configurable publishing of related sets of
;; Org-mode files as a complete website.
;;
@@ -408,24 +406,17 @@
all-files))
(defun org-publish-expand-projects (projects-alist)
- "Expand projects contained in PROJECTS-ALIST."
- (let (without-component with-component)
- (mapc (lambda(p)
- (add-to-list
- (if (plist-get (cdr p) :components)
- 'with-component 'without-component) p))
- projects-alist)
- (org-publish-delete-dups
- (append without-component
- (car (mapcar (lambda(p) (org-publish-expand-components p))
- with-component))))))
-
-(defun org-publish-expand-components (project)
- "Expand PROJECT into an alist of its components."
- (let* ((components (plist-get (cdr project) :components)))
- (org-publish-delete-dups
- (delq nil (mapcar (lambda(c) (assoc c org-publish-project-alist))
- components)))))
+ "Expand projects in PROJECTS-ALIST.
+This splices all the components into the list."
+ (let ((rest projects-alist) rtn p components)
+ (while (setq p (pop rest))
+ (if (setq components (plist-get (cdr p) :components))
+ (setq rest (append
+ (mapcar (lambda (x) (assoc x org-publish-project-alist))
+ components)
+ rest))
+ (push p rtn)))
+ (nreverse (org-publish-delete-dups (delq nil rtn)))))
(defun org-publish-get-base-files-1 (base-dir &optional recurse match
skip-file skip-dir)
"Set `org-publish-temp-files' with files from BASE-DIR directory.
@@ -487,8 +478,9 @@
(require 'org)
(unless (file-exists-p pub-dir)
(make-directory pub-dir t))
- (find-file filename)
- (let ((init-buf (current-buffer))
+ (let* ((visiting (find-buffer-visiting filename))
+ (plist (cons :buffer-will-be-killed (cons t plist)))
+ (init-buf (or visiting (find-file filename)))
(init-point (point))
(init-buf-string (buffer-string)) export-buf)
;; run hooks before exporting
@@ -510,7 +502,7 @@
(insert init-buf-string)
(save-buffer)
(goto-char init-point))
- (unless (eq init-buf org-publish-initial-buffer)
+ (unless visiting
(kill-buffer init-buf))))
(defun org-publish-org-to-latex (plist filename pub-dir)
- [Emacs-diffs] Changes to emacs/lisp/org/org-publish.el,v,
Carsten Dominik <=