emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-wiki-discuss] Re: Publishing a list of files


From: Chris McMahan
Subject: Re: [emacs-wiki-discuss] Re: Publishing a list of files
Date: Wed, 13 Jul 2005 22:19:26 -0400

I was tinkering around with the index last night.       

Would it be possible to define an advice around 
planner-index-as-string that would append a <p> tag to the end of each
line of plan pages, then use this function in the WikiIndex page?

I've copied the function planner-index-as-string found in planner.el,
renamed it, then added the following lines:

*** c:/temp/org-def.txt Mon Jul 11 23:59:50 2005
--- c:/temp/cm-def.txt  Tue Jul 12 00:00:45 2005
***************
*** 8,13 ****
--- 8,21 ----
        (insert index)
        (goto-char (point-min))
        (delete-matching-lines 
"\\[\\[[0-9][0-9][0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\]\\]")
+ 
+       ;; cm add <p> tag at the end of all of the lines up to this point
+       (goto-char (point-min))
+       (while (re-search-forward "\]\]$" nil t)
+         (replace-match "]]<br>" nil nil))
+       (insert "<p>")
+ 
+       ;; cm back to the scheduled function
        (goto-char (point-max))
        (unless (bolp) (insert "\n"))
        (if planner-publish-dates-first-p

And it works like a champ when used in a WikiIndex page like this:

#title Index

<lisp>(cm-planner-index-as-string)</lisp>

How would this function be express as a defadvice? From what I can
gather, this would be a much better way than copying the function
itself just to add a few lines.

- Chris

drkm writes:
>Michael Olson writes:
>
>> With Muse, the WikiIndex is not generated.  You might instead want to
>> do the following, as I have done with my website.
>
>>  - Create a file called WikiIndex in each project.
>
>>  - Put the following in each file by that name.
>
>> #title Index
>
>> <lisp>(muse-index-as-string t t)</lisp>
>
>> In my opinion, this allows for greater flexibility.
>
>  I think so.  But with a planner project, it seems to not
>generate an emacswiki-planner-like index page (separating day
>page from plan page).
>
>--drkm
>
>
>
>_______________________________________________
>emacs-wiki-discuss mailing list
>address@hidden
>http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss

-- 
    ================================
    Chris McMahan | address@hidden
    ================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]