Re: [Orgmode] Re: [PATCH] can't :include files in org-publish-project-alist

2010-09-02 Thread Bastien
Łukasz Stelmach lukasz.stelm...@iem.pw.edu.pl writes:

 Yes it was. I forgot to pull. However the part with appending / to b
 might still be valuable at least for building xm regexp. If
 :base-directory is set to ~/dydaktyka (my example) then xm becomes
 ^/home/steelman/dydaktyka[^/]+\.\(org\) which not necessarily makes
 sense. It may go like this

(xm (concat ^ b
 (when (string-match ^[/]$ b) /)
 (if r .+ [^/]+)
  \\.\\( x \\)$)))

:base-directory now allows a directory name with no ending slash.

I did this in a slightly different way than the one you suggest:

,
| (let* ((r (plist-get (cdr prj) :recursive))
| -  (b (expand-file-name (plist-get (cdr prj) :base-directory)))
| +  (b (expand-file-name (file-name-as-directory
| +(plist-get (cdr prj) :base-directory
|(x (or (plist-get (cdr prj) :base-extension) org))
`

Thanks!

-- 
 Bastien

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [PATCH] can't :include files in org-publish-project-alist

2010-09-02 Thread Łukasz Stelmach
Bastien bastien.gue...@wikimedia.fr writes:

 :base-directory now allows a directory name with no ending slash.

 I did this in a slightly different way than the one you suggest:

 ,
 |   (let* ((r (plist-get (cdr prj) :recursive))
 | -(b (expand-file-name (plist-get (cdr prj) :base-directory)))
 | +(b (expand-file-name (file-name-as-directory
 | +  (plist-get (cdr prj) :base-directory
 |  (x (or (plist-get (cdr prj) :base-extension) org))
 `

Great :-) I didn't know there is the `file-name-as-directory' function.

-- 
Miłego dnia,
Łukasz Stelmach


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [PATCH] can't :include files in org-publish-project-alist

2010-08-21 Thread Łukasz Stelmach
Nick Dokos nicholas.do...@hp.com writes:

 =?utf-8?Q?=C5=81ukasz?= Stelmach lukasz.stelm...@iem.pw.edu.pl wrote:

  :include (index.org)) ;  HERE
... 
 However, with parenthesis around index.org removed the function seems to
 work fine and returns
 

 Wasn't that fixed by the following commit?

 commit 3529be82eff7906c1182fafbea6012fb6bfec160
 Author: Carsten Dominik carsten.domi...@gmail.com
 Date:   Mon Aug 16 17:27:25 2010 +0200

 Fix interpretation of the :include property as a list of file names

Yes it was. I forgot to pull. However the part with appending / to b
might still be valuable at least for building xm regexp. If
:base-directory is set to ~/dydaktyka (my example) then xm becomes
^/home/steelman/dydaktyka[^/]+\.\(org\) which not necessarily makes
sense. It may go like this

   (xm (concat ^ b
(when (string-match ^[/]$ b) /)
(if r .+ [^/]+)
 \\.\\( x \\)$)))

-- 
Miłego dnia,
Łukasz Stelmach


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode