unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* diary questions
@ 2005-12-27 10:31 Emabela
  2005-12-27 17:46 ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Emabela @ 2005-12-27 10:31 UTC (permalink / raw)









Hello everybody,





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



2)

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

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



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



Thanks for any help in advance.



Regards, 

B.





--------------------------Hirdetés-----------------------------

INTERNETES NYELVTANULÁS!

Tanulj ANGOLUL, NÉMETÜL kedvezményes áron a Médiabóval! 

3 Féle intenzitás; 3 Szint; Hanganyag CD-k; Ingyenes konzultáció!

http://www.mediabo.hu/akcio/vipmail/jelentkezesi_lap.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: diary questions
  2005-12-27 10:31 diary questions Emabela
@ 2005-12-27 17:46 ` Kevin Rodgers
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2005-12-27 17:46 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: diary questions
@ 2005-12-28 12:18 Emabela
  2005-12-28 18:39 ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Emabela @ 2005-12-28 12:18 UTC (permalink / raw)







Thank you for your help.



>(setq calendar-holidays nil)

This works perfectly.





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









 > 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-EV
ENT-ON

 > -THIS-DAY





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

Perhaps in the next/cvs version?







> 2b)

> How can I change the american format MM DD YYYY used in 

> diary-anniversary to

>

> YYYY MM DD?





> I've no idea.  diary-anniversary is unreadable, with all its free refe
rences

> to dynamically bound variables.



There must be a solution for this, because

(european-calendar) changes this from MM DD YYYY to DD MM YYYY,

according to the documentation.





Thanks for your help.



Regards,

B.





--------------------------Hirdetés-----------------------------

INTERNETES NYELVTANULÁS!

Tanulj ANGOLUL, NÉMETÜL kedvezményes áron a Médiabóval! 

3 Féle intenzitás; 3 Szint; Hanganyag CD-k; Ingyenes konzultáció!

http://www.mediabo.hu/akcio/vipmail/jelentkezesi_lap.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: diary questions
  2005-12-28 12:18 Emabela
@ 2005-12-28 18:39 ` Kevin Rodgers
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2005-12-28 18:39 UTC (permalink / raw)


Emabela wrote:
 > > > 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
 > >
 > > 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)
 >
 > Perhaps in the next/cvs version?

It would be easy to (defvar diary-entry-abbreviate t) and replace the
ABBREVIATE argument with diary-entry-abbreviate.  Then users like
yourself could just (setq diary-entry-abbreviate nil).

 > > > 2b)
 > > > How can I change the american format MM DD YYYY used in
 > > > diary-anniversary to YYYY MM DD?
 > >
 > > I've no idea.  diary-anniversary is unreadable, with all its free
 > > references to dynamically bound variables.
 >
 > There must be a solution for this, because
 > (european-calendar) changes this from MM DD YYYY to DD MM YYYY,
 > according to the documentation.

Indeed.  Try frobbing american-date-diary-pattern.

 > Thanks for your help.

You're welcome!
-- 
Kevin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-12-28 18:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-27 10:31 diary questions Emabela
2005-12-27 17:46 ` Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2005-12-28 12:18 Emabela
2005-12-28 18:39 ` Kevin Rodgers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).