emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] New :base-extension parameter: :none


From: Richard KLINDA
Subject: [Orgmode] New :base-extension parameter: :none
Date: Thu, 12 Feb 2009 16:07:44 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Educational Television, linux)

Hello, I don't use filename extensions for my org files and I could not
publish my files that way because you have to give a string parameter to
:base-extension.

I modified the org-publish-get-base-files function to support a :none
keyword, that means that every file gets exported (except those thats
name start with a dot):

,----
|        '("test" . (:base-directory "~/test/"
|                    :base-extension :none  ;; <---- new :none keyword
|                    :publishing-directory "/tmp/"
|                    :with-section-numbers nil
|                    :table-of-contents nil
|                    ))
`----

Here is the modified function, 2 lines changed (look for the "<-----").
Carsten, please include this change in the next version of Org if you
think it's ok, thank you.

,----
| (defun org-publish-get-base-files (project &optional exclude-regexp)
|   "Return a list of all files in PROJECT.
| If EXCLUDE-REGEXP is set, this will be used to filter out
| matching filenames."
|   (let* ((project-plist (cdr project))
|        (base-dir (file-name-as-directory
|                   (plist-get project-plist :base-directory)))
|        (include-list (plist-get project-plist :include))
|        (recurse (plist-get project-plist :recursive))
|        (extension (or (plist-get project-plist :base-extension) "org"))
|        (match (if (eq extension :none)  ;; <-----
|                     "^[^\\.]"           ;; <-----
|                     (concat "^[^\\.].*\\.\\(" extension "\\)$"))))
|     (setq org-publish-temp-files nil)
|     (org-publish-get-base-files-1 base-dir recurse match
|                                 ;; FIXME distinguish exclude regexp
|                                 ;; for skip-file and skip-dir?
|                                 exclude-regexp exclude-regexp)
|     (mapc (lambda (f)
|           (pushnew
|            (expand-file-name (concat base-dir f))
|            org-publish-temp-files))
|         include-list)
|     org-publish-temp-files))
`----

-- 
Udv, Richard




reply via email to

[Prev in Thread] Current Thread [Next in Thread]