[Top][All Lists]

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

function to wrap a string for calendar-modify-diary-entry-string

From: ken
Subject: function to wrap a string for calendar-modify-diary-entry-string
Date: Thu, 05 Oct 2006 09:04:16 -0400
User-agent: Thunderbird (X11/20060911)

I found

(defvar diary-modify-entry-list-string-function nil
  "Function applied to entry string before putting it into the entries list.
Can be used by programs integrating a diary list into other buffers (e.g.
org.el and planner.el) to modify the string or add properties to it.
The function takes a string argument and must return a string.")

So created this ~/emacs.d/calendar-display-alter.el:

(defun calendar-modify-diary-entry-string (instring outstring)
  "Function to wrap ``\t* '' and ``.  \n'' around a diary entry."
  (defvar outstring (concat "\t* " instring ".  \n"))

Then put this in my ~/.emacs and eval'd it:

(defvar diary-modify-entry-list-string-function calendar-display-alter.el)

Ran M-x diary, but no difference in the output.

Frankly, I was doubtful it would work because there's nothing telling
anything that the variable "outstring" is what should be output.  What
would accomplish that.  (Also, of course, if there's anything else goofy
about the function above, please let me know.)


In a time of universal deceit, telling the truth becomes an act of
        --George Orwell

reply via email to

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