help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Insert date from calendar


From: Oliver Scholz
Subject: Re: Insert date from calendar
Date: Fri, 19 Sep 2003 12:16:03 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (windows-nt)

KIRCHE Sébastien <Sebastien.Kirche@sage.com> writes:
[...]
> (defun my-insert-date ()  (interactive)  (insert (calendar-date-string
> (calendar-current-date)))) 
> I would like to tune this to insert the date corresponding to where the
> cursor is currently
> in the calendar

(when (and (boundp 'calendar-buffer)
           (buffer-live-p (get-buffer calendar-buffer))
  (let ((str
         (with-current-buffer calendar-buffer
           (calendar-date-string (calendar-cursor-to-date t)))))
    (insert str)))


    Oliver
-- 
Jour du Travail de l'Année 211 de la Révolution
Liberté, Egalité, Fraternité!


reply via email to

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