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

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

[emacs-wiki-discuss] Re: Schedule, Diary and Planner


From: Michael Olson
Subject: [emacs-wiki-discuss] Re: Schedule, Diary and Planner
Date: Mon, 06 Jun 2005 15:18:37 -0500
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

address@hidden (Edgar Gonçalves) writes:

> I'm sorry if this is topic is already discussed, but could anyone
> tell me what's the proper (intended) usage of a diary and/or
> schedule section in a planner page?

It's mostly used for viewing your diary quickly from within a Planner
buffer.  The diary section doesn't publish well by default.

> In my schedule, I have planner-diary to put my entry for a few days,
> like
>
> Wednesday, June 8, 2005
> -----------------------
> 09:30-11:00 PPADNI (T) FA3 (LeicIst)
> 15:00-15:40 Pool (LeicIst)
>
> but this ends up with an horrible html formatting, withouth linebreaks, etc,
> etc. Could anyone point me to some info on this matter?

Try adding something like the following to your planner settings file
(.emacs or whatever).

(defun planner-diary-insert-diary (&optional force)
  "Insert the fancy diary for the day into the day plan file.
If FORCE is non-nil, insert a diary section even if there is no
`planner-diary-string' in the buffer."
  (interactive "P")
  ;; sanity check
  (let ((date (planner-diary-get-name)))
    (unless (string-match planner-date-regexp date)
      (error "Cannot insert diary in this buffer"))
    (planner-diary-update-section
     date ; file
     planner-diary-string ; title
     (concat "<example>\n" (planner-diary-get-diary-entries     ; text
      (planner-filename-to-calendar-date  ; date
       date)
      planner-diary-number-of-days
      planner-diary-file)
       "\n</example>")
     force)))

This is nearly the same as the version of `planner-diary-insert-diary'
that is found in planner-diary.el, with the exception that it
surrounds the diary text with "<example>" and "</example>".  This
should cause the newlines to be preserved during publishing and make
the columns line up.

Hopefully this helps; I haven't tested it myself.

-- 
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Jabber: mwolson_at_hcoop.net -- IRC: mwolson on freenode.net: #muse, #pulug
  /` |\ | | |
 |_] | \| |_|   Interests: anime, Debian GNU/Linux, XHTML, wiki, Emacs Lisp

Attachment: pgpVlEVznMDi2.pgp
Description: PGP signature


reply via email to

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