From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Babel for blogging Date: Sat, 16 Oct 2010 00:03:05 +0100 Message-ID: <87pqvbm53q.wl%ucecesf@ucl.ac.uk> References: <87y69zqw20.fsf@univ-nantes.fr> <87ocavfkqu.fsf@gmail.com> Reply-To: Eric S Fraga Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Sat_Oct_16_00:03:05_2010-1" Return-path: Received: from [140.186.70.92] (port=55797 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6tJC-0001B9-MZ for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 19:03:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6tJB-0003Ix-BT for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 19:03:30 -0400 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]:58897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6tJB-0003IV-7N for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 19:03:29 -0400 In-Reply-To: <87ocavfkqu.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org, Manuel Giraud --Multipart_Sat_Oct_16_00:03:05_2010-1 Content-Type: text/plain; charset=US-ASCII On Fri, 15 Oct 2010 11:07:05 -0600, "Eric Schulte" 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... ;-) --Multipart_Sat_Oct_16_00:03:05_2010-1 Content-Type: text/plain; charset=US-ASCII -- Eric S Fraga GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D --Multipart_Sat_Oct_16_00:03:05_2010-1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --Multipart_Sat_Oct_16_00:03:05_2010-1--