From: Richard KLINDA <rklinda@gmail.com>
To: emacs-orgmode@gnu.org
Subject: New :base-extension parameter: :none
Date: Thu, 12 Feb 2009 16:07:44 +0100 [thread overview]
Message-ID: <87eiy3ae2n.fsf@gmail.com> (raw)
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
next reply other threads:[~2009-02-12 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-12 15:07 Richard KLINDA [this message]
2009-02-12 17:14 ` New :base-extension parameter: :none Daniel Clemente
2009-02-12 17:16 ` Daniel Clemente
2009-02-12 17:32 ` Richard KLINDA
2009-02-12 17:30 ` Richard KLINDA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eiy3ae2n.fsf@gmail.com \
--to=rklinda@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).