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

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

Re: diary questions


From: Kevin Rodgers
Subject: Re: diary questions
Date: Tue, 27 Dec 2005 10:46:14 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Emabela wrote:
> 1)
> How can I specify that no holidays should be displayed?
>
> That is, no (Chinese or Gregorian) New Year,
> no Easter, no Equinox, no Christmas, etc
>
> Only those, that I specify myself in ~/diary (or in ~/.emacs).

(setq calendar-holidays nil)

(setq other-holidays '(...))

> 2)
> How can I specify the date formats emacs uses in ~/diary?

,----[ C-h v diary-date-forms RET ]
| diary-date-forms's value is
| ((month "/" day "[^/0-9]")
|  (month "/" day "/" year "[^0-9]")
|  (monthname " *" day "[^,0-9]")
|  (monthname " *" day ", *" year "[^0-9]")
|  (dayname "\\W"))
|
|
| Documentation:
| *List of pseudo-patterns describing the forms of date used in the diary.
| The patterns on the list must be MUTUALLY EXCLUSIVE and must not match
| any portion of the diary entry itself, just the date component.
|
| A pseudo-pattern is a list of regular expressions and the keywords `month',
| `day', `year', `monthname', and `dayname'.  The keyword `monthname' will
| match the name of the month, capitalized or not, or its three-letter
| abbreviation, followed by a period or not; it will also match `*'.
| Similarly, `dayname' will match the name of the day, capitalized or not, or
| its three-letter abbreviation, followed by a period or not.  The keywords
| `month', `day', and `year' will match those numerical values, preceded by
| arbitrarily many zeros; they will also match `*'.
|
| The matching of the diary entries with the date forms is done with the
| standard syntax table from Fundamental mode, but with the `*' changed so
| that it is a word constituent.
|
| If, to be mutually exclusive, a pseudo-pattern must match a portion of the
| diary entry itself, the first element of the pattern MUST be `backup'. This
| directive causes the date recognizer to back up to the beginning of the
| current word of the diary entry, so in no case can the pattern match more than
| a portion of the first word of the diary entry.
|
| You can customize this variable.
|
| Defined in `calendar'.
`----

> 2a) I would like that if I insert a yearly entry (i y),
> then emacs would put an entry into ~/diary like
>
> full-monthname-as-in-calendar-month-name-array day. THE-IMPORTANT-EVENT-ON
> -THIS-DAY
>
> How can I specify this?
> Now, emacs inserts an entry like
>
> first-3-letters-of-calendar-month-name-array day THE-IMPORTANT-EVENT-ON-THI
> S-DAY
>
> which is misleading, because the first 3 letters of some monthnames
> match  the first 3 letters of some daynames...

You can't, because the insert-*-diary-entry commands all explicitly
specify a non-nil ABBREVIATE argument when they call
calendar-date-string, e.g.

    (make-diary-entry (calendar-date-string (calendar-cursor-to-date t) t)
                      arg)

> 2b)
>
> How can I change the american format MM DD YYYY used in diary-anniversary t
> o
>
> YYYY MM DD?
>
> (And the same in diary-block.)

I've no idea.  diary-anniversary is unreadable, with all its free references
to dynamically bound variables.


> I use GNU Emacs 21.3.1 and I have
>
> (setq diary-date-forms '(
>   (monthname day)
>   (monthname "," day)
>   (day "/" month "[^/0-9]")
>   (day "/" month "/" year "[^0-9]")
> (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|\\([0-9]+[:aApP]\\)\\)
> ")
>   (day " *" monthname " *" year "[^0-9]")
>   (dayname "\\W")
>   (year ". " month ". " day "[.\\(,\\)?]?" )
>  )
> )
>
> in my .emacs.

--
Kevin





reply via email to

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