On May 26, 2010, at 11:37 AM, Nick Dokos wrote: > Thomas S. Dye wrote: > > >> ("work" >> :base-directory "~/org/temp/" >> :base-extension "org" >> :publishing-directory "~/org/temp/publish-work/" >> :publishing-function org-publish-org-to-latex >> :select-tags ("@WORK") >> :title "Work Notes" >> :include ("index.org") <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >> :exclude "\\.org$" >> ) >> )) >> ---- .minimal.emacs ----- >> >> Debugger entered--Lisp error: (wrong-type-argument stringp >> ("index.org")) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > This is complaining that ``("index.org")'' is not a string, and indeed > it isn't: it's a list with one element. Should the :include line above > be > > :include "index.org" > > perhaps? But I'm shooting from the hip here, so take it with the > appropriate > grain of salt. > > Nick Hi Nick, The documentation for org-publish-projects-alist suggests that :include wants a list: > The :include property may be used to include extra files. Its > value may be a list of filenames to include. The filenames are > considered relative to the base directory. When I tried :include "index.org" I got this: Debugger entered--Lisp error: (wrong-type-argument sequencep 105) concat("~/org/temp/" 105) (expand-file-name (concat base-dir f)) ... I'm not going to pretend I know what I'm talking about here, but AFAICT the variable i in the following code needs some attention before it goes to string-match. According to the documentation, plist- get just returns the value assigned to a property (or nil) without doing anything to it, so i should be a list when it is passed to string-match. string-match wants REGEXP here, apparently not as a list. I couldn't persuade emacs to cough up the definition of REGEXP, but my brief forays into the emacs and org-mode source code lead me to believe it is probably a string. > (defun org-publish-get-project-from-filename (filename &optional up) > "Return the project FILENAME belongs." > (let* ((filename (expand-file-name filename)) > project-name) > > (catch 'p-found > (dolist (prj org-publish-project-alist) > (unless (plist-get (cdr prj) :components) > ;; [[info:org:Selecting%20files]] shows how this is supposed to > work: > (let* ((r (plist-get (cdr prj) :recursive)) > (b (expand-file-name (plist-get (cdr prj) :base-directory))) > (x (plist-get (cdr prj) :base-extension)) > (e (plist-get (cdr prj) :exclude)) > (i (plist-get (cdr prj) :include)) > (xm (concat "^" b (if r ".+" "[^/]+") "\\.\\(" x "\\)$"))) > (when (or > (and i (string-match i filename)) All the best, Tom