[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Babel for blogging
From: |
Eric S Fraga |
Subject: |
Re: [Orgmode] Babel for blogging |
Date: |
Sat, 16 Oct 2010 00:03:05 +0100 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
On Fri, 15 Oct 2010 11:07:05 -0600, "Eric Schulte" <address@hidden> wrote:
>
> Hi Manuel,
>
> The following works for me, it creates an index of all files in the same
> directory as the Org-mode file.
>
> --8<---------------cut here---------------start------------->8---
> * index
>
> Create an index automatically with an elisp code block.
>
> #+begin_src emacs-lisp :exports results :results raw
> (mapconcat
> (lambda (file)
> (unless (file-directory-p file)
> (format "- [[%s][%s]]" (file-name-sans-extension file) file)))
> (directory-files (or default-directory
> (file-name-directory (buffer-file-name))))
> "\n")
> #+end_src
> --8<---------------cut here---------------end--------------->8---
Maybe the format statement should look like this instead (swap the two
arguments to the format string around):
: (format "- [[%s][%s]]" file (file-name-sans-extension file))))
Also, maybe change the link to include the current directory:
: (format "- [[./%s][%s]]" file (file-name-sans-extension file))))
Just some thoughts late on a Friday night... ;-)
--
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D