emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Manuel Giraud <manuel.giraud@univ-nantes.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel for blogging
Date: Fri, 15 Oct 2010 11:07:05 -0600	[thread overview]
Message-ID: <87ocavfkqu.fsf@gmail.com> (raw)
In-Reply-To: <87y69zqw20.fsf@univ-nantes.fr> (Manuel Giraud's message of "Fri, 15 Oct 2010 18:07:19 +0200")

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---

Does this solve your requirement?

Cheers -- Eric

Manuel Giraud <manuel.giraud@univ-nantes.fr> writes:

> Hi, 
>
> I'd like to set up a simple blog (with static page only) using emacs. So
> far, I was able to use emacs-muse based on the following instructions:
> http://alexott.net/en/writings/EmacsMuseMyPage.html
> http://www.diale.org/muse-functions.html
>
> Now, I'd like to give org-publish a try because it seems to provide nice
> features (and i'm already using org-mode as an agenda anyway).  So far
> so good I can publish entries, but I can't find a way to produce an
> index of all the entries sorted by date.
>
> With muse, i created a file with a <lisp></lisp> block to call the
> function muse-index-as-string-sort-by-date and this call insert the
> updated index in place.
>
> Now I'd like to do something similar using org-mode babel feature, but
> if i try this:
> ---8<-----
> #+BEGIN_SRC emacs-lisp :results output :exports results
>   (list "[[bar][1]]" "[[foo][2]]")
> #+END_SRC
> ---8<-----
>
> The content appears as a code snippet in the html export which is not
> exactly what I want. How can I do this? Am I misleaded because
> org-publish already provide this?

  reply	other threads:[~2010-10-15 17:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15 16:07 Babel for blogging Manuel Giraud
2010-10-15 17:07 ` Eric Schulte [this message]
2010-10-15 17:44   ` Pere Quintana Seguí
2010-10-15 20:32     ` Eric Schulte
2010-10-15 22:13       ` Pere Quintana Seguí
2010-10-16 17:17         ` Olivier Schwander
2010-10-15 23:03   ` Eric S Fraga
2010-10-18 14:22     ` Manuel Giraud
2010-10-18 21:36       ` Sebastian Rose
2010-10-20 17:09         ` Manuel Giraud

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=87ocavfkqu.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=manuel.giraud@univ-nantes.fr \
    /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).