all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ken <gebser@speakeasy.net>
Subject: function to wrap a string for calendar-modify-diary-entry-string
Date: Thu, 05 Oct 2006 09:04:16 -0400	[thread overview]
Message-ID: <452502D0.8080000@speakeasy.net> (raw)


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

Thanks.

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

             reply	other threads:[~2006-10-05 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 13:04 ken [this message]
2006-10-05 15:55 ` function to wrap a string for calendar-modify-diary-entry-string Kevin Rodgers
2006-10-05 19:56   ` ken

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=452502D0.8080000@speakeasy.net \
    --to=gebser@speakeasy.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.