all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs Calendar - Removing holidays
@ 2020-11-19 13:56 Christopher Dimech
  2020-11-19 14:02 ` Christopher Dimech
  2020-11-19 14:09 ` Jean Louis
  0 siblings, 2 replies; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 13:56 UTC (permalink / raw)
  To: Help Gnu Emacs

Am trying to remove these holidays but the plan is not working.

(general-holidays nil)
(local-holidays nil)
(christian-holidays nil)
(hebrew-holidays nil)
(islamic-holidays nil)





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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 13:56 Emacs Calendar - Removing holidays Christopher Dimech
@ 2020-11-19 14:02 ` Christopher Dimech
  2020-11-19 14:09 ` Jean Louis
  1 sibling, 0 replies; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 14:02 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: Help Gnu Emacs

Have also used the following setq expressions, but I am still noticing
christmass and others as holidays


(setq general-holidays nil)
(setq local-holidays nil)
(setq christian-holidays nil)
(setq hebrew-holidays nil)
(setq islamic-holidays nil)


> Sent: Thursday, November 19, 2020 at 2:56 PM
> From: "Christopher Dimech" <dimech@gmx.com>
> To: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Emacs Calendar - Removing holidays
>
> Am trying to remove these holidays but the plan is not working.
>
> (general-holidays nil)
> (local-holidays nil)
> (christian-holidays nil)
> (hebrew-holidays nil)
> (islamic-holidays nil)
>
>
>
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 13:56 Emacs Calendar - Removing holidays Christopher Dimech
  2020-11-19 14:02 ` Christopher Dimech
@ 2020-11-19 14:09 ` Jean Louis
  2020-11-19 15:21   ` Christopher Dimech
  1 sibling, 1 reply; 26+ messages in thread
From: Jean Louis @ 2020-11-19 14:09 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: Help Gnu Emacs

* Christopher Dimech <dimech@gmx.com> [2020-11-19 16:58]:
> Am trying to remove these holidays but the plan is not working.
> 
> (general-holidays nil)

As in that above case `general-holidays' is supposed to be function as
it comes first in the list.

Maybe you wish to inspect if such function exists by doing:

{C-h f general-holidays RET}

And if it does not exist, it will not work.

I can see that variable `holiday-general-holidays' exists.

To nullify the variable you can do:

(setq holiday-general-holidays nil)

You may also use the {M-:} to open up prompt for evaluations.

For example:

{M-: holiday-general-holidays RET}

And you may see there are some values under that variable. In the next
step you may evaluate nullify it:

{M-: (setq holiday-general-holidays nil) RET}

and then verify again what is the value of variable:

{M-: holiday-general-holidays RET}

Any time you wish to find out if variable exists I suggest that you
use {C-h v}

> (local-holidays nil)
> (christian-holidays nil)
> (hebrew-holidays nil)
> (islamic-holidays nil)
       ^
I do suggest using completion package ivy, you may install it with:

{M-x package-install RET ivy RET}

as it is more visual when searching for variables.

If I have ivy installed and I bring cursor to above `islamic-holidays'
then I can just press {C-h v} and `ivy' will show me completion and
locate the highlighted line on the variable if such variable
exists. If it does not exists I will get first item highlighted.

Otherwise if you use the built-in Emacs completion and you press
{C-h v} to search for variable then I recommend using `*' joker
character to search for variables.

Let us say you search for something containing "islamic", you would
do:

{C-h v *islamic TAB TAB}

Then you get the list such as:

Possible completions are:
calendar-islamic-all-holidays-flag
diary-islamic-entry-symbol
holiday-islamic-holidays

and you can find out which variable exist related to "islamic" and
inspect such variables.





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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 14:09 ` Jean Louis
@ 2020-11-19 15:21   ` Christopher Dimech
  2020-11-19 15:32     ` Jean Louis
  0 siblings, 1 reply; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 15:21 UTC (permalink / raw)
  To: Jean Louis; +Cc: Help Gnu Emacs


How can I turn holidays off???

This is what Emacs Manual says

31.13.2 Customizing the Holidays

There are several variables listing the default holidays that
Emacs knows about. These are: holiday-general-holidays,
holiday-local-holidays, holiday-solar-holidays,
holiday-bahai-holidays, holiday-christian-holidays,
holiday-hebrew-holidays, holiday-islamic-holidays,
holiday-oriental-holidays, and holiday-other-holidays.


> Sent: Thursday, November 19, 2020 at 3:09 PM
> From: "Jean Louis" <bugs@gnu.support>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: Emacs Calendar - Removing holidays
>
> * Christopher Dimech <dimech@gmx.com> [2020-11-19 16:58]:
> > Am trying to remove these holidays but the plan is not working.
> >
> > (general-holidays nil)
>
> As in that above case `general-holidays' is supposed to be function as
> it comes first in the list.
>
> Maybe you wish to inspect if such function exists by doing:
>
> {C-h f general-holidays RET}
>
> And if it does not exist, it will not work.
>
> I can see that variable `holiday-general-holidays' exists.
>
> To nullify the variable you can do:
>
> (setq holiday-general-holidays nil)
>
> You may also use the {M-:} to open up prompt for evaluations.
>
> For example:
>
> {M-: holiday-general-holidays RET}
>
> And you may see there are some values under that variable. In the next
> step you may evaluate nullify it:
>
> {M-: (setq holiday-general-holidays nil) RET}
>
> and then verify again what is the value of variable:
>
> {M-: holiday-general-holidays RET}
>
> Any time you wish to find out if variable exists I suggest that you
> use {C-h v}
>
> > (local-holidays nil)
> > (christian-holidays nil)
> > (hebrew-holidays nil)
> > (islamic-holidays nil)
>        ^
> I do suggest using completion package ivy, you may install it with:
>
> {M-x package-install RET ivy RET}
>
> as it is more visual when searching for variables.
>
> If I have ivy installed and I bring cursor to above `islamic-holidays'
> then I can just press {C-h v} and `ivy' will show me completion and
> locate the highlighted line on the variable if such variable
> exists. If it does not exists I will get first item highlighted.
>
> Otherwise if you use the built-in Emacs completion and you press
> {C-h v} to search for variable then I recommend using `*' joker
> character to search for variables.
>
> Let us say you search for something containing "islamic", you would
> do:
>
> {C-h v *islamic TAB TAB}
>
> Then you get the list such as:
>
> Possible completions are:
> calendar-islamic-all-holidays-flag
> diary-islamic-entry-symbol
> holiday-islamic-holidays
>
> and you can find out which variable exist related to "islamic" and
> inspect such variables.
>
>
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 15:21   ` Christopher Dimech
@ 2020-11-19 15:32     ` Jean Louis
  2020-11-19 15:37       ` Christopher Dimech
  2020-11-19 15:43       ` Christopher Dimech
  0 siblings, 2 replies; 26+ messages in thread
From: Jean Louis @ 2020-11-19 15:32 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: Help Gnu Emacs

* Christopher Dimech <dimech@gmx.com> [2020-11-19 18:21]:
> 
> How can I turn holidays off???

Just don't do what other people do at those days, like don't remain
home laying around, watching TV, or hacking Emacs (at home), don't go
to nature and do not celebrate anything.

To get prepared for those days, use M-x calendar




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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 15:32     ` Jean Louis
@ 2020-11-19 15:37       ` Christopher Dimech
  2020-11-19 15:43       ` Christopher Dimech
  1 sibling, 0 replies; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 15:37 UTC (permalink / raw)
  To: Jean Louis; +Cc: Help Gnu Emacs

Can't you say you don,t know how to shut them up.

The question still stands.  How can the calendar holidays be
stopped from being marked?

---------------------
Christopher Dimech
General Administrator - Naiad Informatics - GNU Project (Geocomputation)
- Geophysical Simulation
- Geological Subsurface Mapping
- Disaster Preparedness and Mitigation
- Natural Resource Exploration and Production
- Free Software Advocacy


> Sent: Thursday, November 19, 2020 at 4:32 PM
> From: "Jean Louis" <bugs@gnu.support>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: Emacs Calendar - Removing holidays
>
> * Christopher Dimech <dimech@gmx.com> [2020-11-19 18:21]:
> >
> > How can I turn holidays off???
>
> Just don't do what other people do at those days, like don't remain
> home laying around, watching TV, or hacking Emacs (at home), don't go
> to nature and do not celebrate anything.
>
> To get prepared for those days, use M-x calendar
>
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 15:32     ` Jean Louis
  2020-11-19 15:37       ` Christopher Dimech
@ 2020-11-19 15:43       ` Christopher Dimech
  2020-11-19 16:05         ` Jean Louis
  2020-11-19 16:26         ` Michael Heerdegen
  1 sibling, 2 replies; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 15:43 UTC (permalink / raw)
  To: Jean Louis; +Cc: Help Gnu Emacs

> Sent: Thursday, November 19, 2020 at 4:32 PM
> From: "Jean Louis" <bugs@gnu.support>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: Emacs Calendar - Removing holidays
>
> * Christopher Dimech <dimech@gmx.com> [2020-11-19 18:21]:
> >
> > How can I turn holidays off???
>
> Just don't do what other people do at those days, like don't remain
> home laying around, watching TV, or hacking Emacs (at home), don't go
> to nature and do not celebrate anything.

I am only interested in the phases of nature, nothing else.

> To get prepared for those days, use M-x calendar
>
>
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 15:43       ` Christopher Dimech
@ 2020-11-19 16:05         ` Jean Louis
  2020-11-19 16:38           ` Christopher Dimech
  2020-11-19 16:26         ` Michael Heerdegen
  1 sibling, 1 reply; 26+ messages in thread
From: Jean Louis @ 2020-11-19 16:05 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: Help Gnu Emacs


I understand you wish to highlight those days by your choice but not
holidays when you press `x', is it so?

Then maybe you do not need to erase holidays, you could maybe make a
function to mark those days you wish to mark and you can bind it to
any other key or even to `x'.

Holidays are in the list:

(((10 3 2020) "Sukkot") ((10 10 2020) "Shemini Atzeret") ((10 11 2020) "Simchat Torah") ((10 12 2020) "Columbus Day") ((10 20 2020) "Birth of the Báb") ((10 31 2020) "Halloween") ((11 11 2020) "Veteran's Day") ((11 12 2020) "Birth of Bahá’u’lláh") ((11 26 2020) "Thanksgiving") ((12 11 2020) "Hanukkah") ((12 21 2020) "Summer Solstice 1:02pm (EAT)") ((12 25 2020) "Christmas"))

One holiday is in this form:

((10 3 2020) "Sukkot")

So you could construct your list of holidays this way:

'((10 3 2020) "Sukkot")
  (11 29 2020) "Something else"))

And you put it in some function that returns such list or you can
simply construct that list and call it `my-important-dates'

Then copy this function `calendar-mark-holidays' to your file from holidays.el

(defun calendar-mark-holidays (&optional event)
  "Mark notable days in the calendar window.
If EVENT is non-nil, it's an event indicating the buffer position to
use instead of point."
  (interactive (list last-nonmenu-event))
  ;; If called from a menu, with the calendar window not selected.
  (with-current-buffer
      (if event (window-buffer (posn-window (event-start event)))
        (current-buffer))
    (setq calendar-mark-holidays-flag t)
    (message "Marking holidays...")
    (dolist (holiday (calendar-holiday-list))
      (calendar-mark-visible-date (car holiday) calendar-holiday-marker))
    (message "Marking holidays...done")))

Then change it little by:

(defun my-calendar-mark-my-days (&optional event)
  "Mark notable days in the calendar window.
  (interactive)
  ;; If called from a menu, with the calendar window not selected.
  (with-current-buffer
    (setq calendar-mark-holidays-flag t)
    (message "Marking my days...")
    (dolist (holiday (this-function-returns-my-days))
      (calendar-mark-visible-date (car holiday) calendar-holiday-marker))
    (message "Marking my days...done")))

Then you may bind that function to a key in calendar mode map.



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 15:43       ` Christopher Dimech
  2020-11-19 16:05         ` Jean Louis
@ 2020-11-19 16:26         ` Michael Heerdegen
  2020-11-19 16:46           ` Christopher Dimech
  2020-11-19 17:21           ` Christopher Dimech
  1 sibling, 2 replies; 26+ messages in thread
From: Michael Heerdegen @ 2020-11-19 16:26 UTC (permalink / raw)
  To: help-gnu-emacs

Christopher Dimech <dimech@gmx.com> writes:

> I am only interested in the phases of nature, nothing else.

Maybe you are better off with using the diary for your purpose.

If your `diary-file' contains a line like this (I've tried that just
now):

%%(diary-lunar-phases 'warning)

and you hit "m" in calendar, the moon phases are (all) marked using the
"warning" face.  Just for testing.

If that approach would be acceptable for you, we could use something
better than `diary-lunar-phases' so that different phases are
highlighted differently.

Michael.




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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 16:05         ` Jean Louis
@ 2020-11-19 16:38           ` Christopher Dimech
  0 siblings, 0 replies; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 16:38 UTC (permalink / raw)
  To: Jean Louis; +Cc: Help Gnu Emacs

> Sent: Thursday, November 19, 2020 at 5:05 PM
> From: "Jean Louis" <bugs@gnu.support>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: Emacs Calendar - Removing holidays
>
> 
> I understand you wish to highlight those days by your choice but not
> holidays when you press `x', is it so?
> 
> Then maybe you do not need to erase holidays, you could maybe make a
> function to mark those days you wish to mark and you can bind it to
> any other key or even to `x'.

Sure as long as it works.  I just want markings for work related dates,
without any other dates when using Emacs for a particular project.
 
> Holidays are in the list:
> 
> (((10 3 2020) "Sukkot") ((10 10 2020) "Shemini Atzeret") ((10 11 2020) "Simchat Torah") ((10 12 2020) "Columbus Day") ((10 20 2020) "Birth of the Báb") ((10 31 2020) "Halloween") ((11 11 2020) "Veteran's Day") ((11 12 2020) "Birth of Bahá’u’lláh") ((11 26 2020) "Thanksgiving") ((12 11 2020) "Hanukkah") ((12 21 2020) "Summer Solstice 1:02pm (EAT)") ((12 25 2020) "Christmas"))
> 
> One holiday is in this form:
> 
> ((10 3 2020) "Sukkot")
> 
> So you could construct your list of holidays this way:
> 
> '((10 3 2020) "Sukkot")
>   (11 29 2020) "Something else"))
> 
> And you put it in some function that returns such list or you can
> simply construct that list and call it `my-important-dates'
> 
> Then copy this function `calendar-mark-holidays' to your file from holidays.el
> 
> (defun calendar-mark-holidays (&optional event)
>   "Mark notable days in the calendar window.
> If EVENT is non-nil, it's an event indicating the buffer position to
> use instead of point."
>   (interactive (list last-nonmenu-event))
>   ;; If called from a menu, with the calendar window not selected.
>   (with-current-buffer
>       (if event (window-buffer (posn-window (event-start event)))
>         (current-buffer))
>     (setq calendar-mark-holidays-flag t)
>     (message "Marking holidays...")
>     (dolist (holiday (calendar-holiday-list))
>       (calendar-mark-visible-date (car holiday) calendar-holiday-marker))
>     (message "Marking holidays...done")))
> 
> Then change it little by:
> 
> (defun my-calendar-mark-my-days (&optional event)
>   "Mark notable days in the calendar window.
>   (interactive)
>   ;; If called from a menu, with the calendar window not selected.
>   (with-current-buffer
>     (setq calendar-mark-holidays-flag t)
>     (message "Marking my days...")
>     (dolist (holiday (this-function-returns-my-days))
>       (calendar-mark-visible-date (car holiday) calendar-holiday-marker))
>     (message "Marking my days...done")))
> 
> Then you may bind that function to a key in calendar mode map.
> 
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 16:26         ` Michael Heerdegen
@ 2020-11-19 16:46           ` Christopher Dimech
  2020-11-19 17:21           ` Christopher Dimech
  1 sibling, 0 replies; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 16:46 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

You're fantastic my dear friend.  Good job!

> Sent: Thursday, November 19, 2020 at 5:26 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Emacs Calendar - Removing holidays
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > I am only interested in the phases of nature, nothing else.
>
> Maybe you are better off with using the diary for your purpose.
>
> If your `diary-file' contains a line like this (I've tried that just
> now):
>
> %%(diary-lunar-phases 'warning)
>
> and you hit "m" in calendar, the moon phases are (all) marked using the
> "warning" face.  Just for testing.
>
> If that approach would be acceptable for you, we could use something
> better than `diary-lunar-phases' so that different phases are
> highlighted differently.
>
> Michael.
>
>
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 16:26         ` Michael Heerdegen
  2020-11-19 16:46           ` Christopher Dimech
@ 2020-11-19 17:21           ` Christopher Dimech
  2020-11-19 18:58             ` Michael Heerdegen
  1 sibling, 1 reply; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 17:21 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

> Sent: Thursday, November 19, 2020 at 5:26 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Emacs Calendar - Removing holidays
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > I am only interested in the phases of nature, nothing else.
>
> Maybe you are better off with using the diary for your purpose.
>
> If your `diary-file' contains a line like this (I've tried that just
> now):
>
> %%(diary-lunar-phases 'warning)
>
> and you hit "m" in calendar, the moon phases are (all) marked using the
> "warning" face.  Just for testing.

Then I would like to mark them as soon as you get the calendar, without having
to press 'm'.

The last thing would be to unmark all holidays (christian, hebrew, etc).

> If that approach would be acceptable for you, we could use something
> better than `diary-lunar-phases' so that different phases are
> highlighted differently.
>
> Michael.
>
>
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 17:21           ` Christopher Dimech
@ 2020-11-19 18:58             ` Michael Heerdegen
  2020-11-19 19:06               ` Jean Louis
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Heerdegen @ 2020-11-19 18:58 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: help-gnu-emacs

Christopher Dimech <dimech@gmx.com> writes:

> Then I would like to mark them as soon as you get the calendar,
> without having to press 'm'.

That should work by setting `calendar-mark-diary-entries-flag' in your
init file or customizing it, as you wish, to enable it.

> The last thing would be to unmark all holidays (christian, hebrew, etc).

Why are they marked for you at all?  By default, (uncustomized Emacs) no
holidays are marked as far as I know.  So I guess it's caused by
something you added to your config while experimenting?

Michael.



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 18:58             ` Michael Heerdegen
@ 2020-11-19 19:06               ` Jean Louis
  2020-11-19 19:40                 ` Michael Heerdegen
  0 siblings, 1 reply; 26+ messages in thread
From: Jean Louis @ 2020-11-19 19:06 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Christopher Dimech, help-gnu-emacs

* Michael Heerdegen <michael_heerdegen@web.de> [2020-11-19 21:59]:
> Christopher Dimech <dimech@gmx.com> writes:
> 
> > Then I would like to mark them as soon as you get the calendar,
> > without having to press 'm'.
> 
> That should work by setting `calendar-mark-diary-entries-flag' in your
> init file or customizing it, as you wish, to enable it.
> 
> > The last thing would be to unmark all holidays (christian, hebrew, etc).
> 
> Why are they marked for you at all?  By default, (uncustomized Emacs) no
> holidays are marked as far as I know.  So I guess it's caused by
> something you added to your config while experimenting?

When buffer is buried it then new invocation of calendar brings it
back marked. Could be it?



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 19:06               ` Jean Louis
@ 2020-11-19 19:40                 ` Michael Heerdegen
  2020-11-19 19:52                   ` Jean Louis
  2020-11-19 19:52                   ` Christopher Dimech
  0 siblings, 2 replies; 26+ messages in thread
From: Michael Heerdegen @ 2020-11-19 19:40 UTC (permalink / raw)
  To: Jean Louis; +Cc: Christopher Dimech, help-gnu-emacs

Jean Louis <bugs@gnu.support> writes:

> When buffer is buried it then new invocation of calendar brings it
> back marked. Could be it?

Not sure if I understand correctly what you mean.
If I understand correctly, that's not what I see in emacs -Q.  I never
see any holidays unless I hit x (which my recipe didn't include).  Then
u seems to unmark that stuff.

Michael.



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 19:40                 ` Michael Heerdegen
@ 2020-11-19 19:52                   ` Jean Louis
  2020-11-19 20:17                     ` Christopher Dimech
  2020-11-19 20:24                     ` Michael Heerdegen
  2020-11-19 19:52                   ` Christopher Dimech
  1 sibling, 2 replies; 26+ messages in thread
From: Jean Louis @ 2020-11-19 19:52 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Christopher Dimech, help-gnu-emacs

* Michael Heerdegen <michael_heerdegen@web.de> [2020-11-19 22:41]:
> Jean Louis <bugs@gnu.support> writes:
> 
> > When buffer is buried it then new invocation of calendar brings it
> > back marked. Could be it?
> 
> Not sure if I understand correctly what you mean.
> If I understand correctly, that's not what I see in emacs -Q.  I never
> see any holidays unless I hit x (which my recipe didn't include).  Then
> u seems to unmark that stuff.

Christopher will say about his case.

What I mean is after marking with x and burying the buffer, buffer is
not killed and holidays appear still marked when again invoked with
M-x calendar

If buffer is killed instead of buried then it comes back plain without
marks.



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 19:40                 ` Michael Heerdegen
  2020-11-19 19:52                   ` Jean Louis
@ 2020-11-19 19:52                   ` Christopher Dimech
  2020-11-19 20:09                     ` Jean Louis
  1 sibling, 1 reply; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 19:52 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs, Jean Louis

Have used calendar-mark-diary-entries-flag and the dates
get marked.

(setq calendar-mark-diary-entries-flag t)

I also want to set other dates for appointments and other dates
and using holiday, although holiday is not an appropriate term.

Is there something like holidays but work related.  Because
I do not want to show standard holidays like christian, hebrew,
etc.



---------------------
Christopher Dimech
General Administrator - Naiad Informatics - GNU Project (Geocomputation)
- Geophysical Simulation
- Geological Subsurface Mapping
- Disaster Preparedness and Mitigation
- Natural Resource Exploration and Production
- Free Software Advocacy


> Sent: Thursday, November 19, 2020 at 8:40 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: "Jean Louis" <bugs@gnu.support>
> Cc: "Christopher Dimech" <dimech@gmx.com>, help-gnu-emacs@gnu.org
> Subject: Re: Emacs Calendar - Removing holidays
>
> Jean Louis <bugs@gnu.support> writes:
>
> > When buffer is buried it then new invocation of calendar brings it
> > back marked. Could be it?
>
> Not sure if I understand correctly what you mean.
> If I understand correctly, that's not what I see in emacs -Q.  I never
> see any holidays unless I hit x (which my recipe didn't include).  Then
> u seems to unmark that stuff.
>
> Michael.
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 19:52                   ` Christopher Dimech
@ 2020-11-19 20:09                     ` Jean Louis
  0 siblings, 0 replies; 26+ messages in thread
From: Jean Louis @ 2020-11-19 20:09 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: Michael Heerdegen, help-gnu-emacs

* Christopher Dimech <dimech@gmx.com> [2020-11-19 22:53]:
> Have used calendar-mark-diary-entries-flag and the dates
> get marked.
> 
> (setq calendar-mark-diary-entries-flag t)
> 
> I also want to set other dates for appointments and other dates
> and using holiday, although holiday is not an appropriate term.
> 
> Is there something like holidays but work related.  Because
> I do not want to show standard holidays like christian, hebrew,
> etc.

On GNU ELPA search for holidays and download one of those packages and
you may use such to make your own.

See example here:

https://github.com/abo-abo/netherlands-holidays

Also see in Emacs Manual:

File: emacs.info,  Node: Holiday Customizing,  Next: Mayan Calendar,  Prev: Calendar Customizing,  Up: Advanced Calendar/Diary Usage

31.13.2 Customizing the Holidays
--------------------------------

   The general holidays are, by default, holidays common throughout the
United States.  In contrast, ‘holiday-local-holidays’ and
‘holiday-other-holidays’ are both empty by default.  These are intended
for system-wide settings and your individual use, respectively.


   For example, suppose you want to add Bastille Day, celebrated in
France on July 14 (i.e., the fourteenth day of the seventh month).  You
can do this as follows:

     (setq holiday-other-holidays '((holiday-fixed 7 14 "Bastille Day")))

     (setq holiday-other-holidays
           '((holiday-hebrew 10 2 "Last day of Hanukkah")
             (holiday-islamic 3 12 "Mohammed's Birthday")
             (holiday-julian 4 2 "Jefferson's Birthday")))




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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 19:52                   ` Jean Louis
@ 2020-11-19 20:17                     ` Christopher Dimech
  2020-11-19 20:50                       ` Michael Heerdegen
  2020-11-19 20:24                     ` Michael Heerdegen
  1 sibling, 1 reply; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 20:17 UTC (permalink / raw)
  To: Jean Louis; +Cc: Michael Heerdegen, help-gnu-emacs



> Sent: Thursday, November 19, 2020 at 8:52 PM
> From: "Jean Louis" <bugs@gnu.support>
> To: "Michael Heerdegen" <michael_heerdegen@web.de>
> Cc: "Christopher Dimech" <dimech@gmx.com>, help-gnu-emacs@gnu.org
> Subject: Re: Emacs Calendar - Removing holidays
>
> * Michael Heerdegen <michael_heerdegen@web.de> [2020-11-19 22:41]:
> > Jean Louis <bugs@gnu.support> writes:
> >
> > > When buffer is buried it then new invocation of calendar brings it
> > > back marked. Could be it?
> >
> > Not sure if I understand correctly what you mean.
> > If I understand correctly, that's not what I see in emacs -Q.  I never
> > see any holidays unless I hit x (which my recipe didn't include).  Then
> > u seems to unmark that stuff.

Correct.  But then I have additional dates I want marked anh have put them
as holidays, but cannot get the christian, hebrew etc to stop showing.

What are the other options for marking dates?

> Christopher will say about his case.
>
> What I mean is after marking with x and burying the buffer, buffer is
> not killed and holidays appear still marked when again invoked with
> M-x calendar
>
> If buffer is killed instead of buried then it comes back plain without
> marks.
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 19:52                   ` Jean Louis
  2020-11-19 20:17                     ` Christopher Dimech
@ 2020-11-19 20:24                     ` Michael Heerdegen
  2020-11-19 20:36                       ` Christopher Dimech
  1 sibling, 1 reply; 26+ messages in thread
From: Michael Heerdegen @ 2020-11-19 20:24 UTC (permalink / raw)
  To: Jean Louis; +Cc: Christopher Dimech, help-gnu-emacs

Jean Louis <bugs@gnu.support> writes:

> What I mean is after marking with x and burying the buffer, buffer is
> not killed and holidays appear still marked when again invoked with
> M-x calendar
>
> If buffer is killed instead of buried then it comes back plain without
> marks.

I think that is expected.  But u should work to unmark.

Michael.



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 20:24                     ` Michael Heerdegen
@ 2020-11-19 20:36                       ` Christopher Dimech
  0 siblings, 0 replies; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 20:36 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs, Jean Louis

Can users add mark dates in calendar not related to holidays.

What I would like to have is

1. One colour mark for availability dates
2. Another colour mark for deadlines

And how to set things up.

Perhaps something similar to what was done for lunar phases
in diary file?

%%(diary-lunar-phases 'warning)




> Sent: Thursday, November 19, 2020 at 9:24 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: "Jean Louis" <bugs@gnu.support>
> Cc: "Christopher Dimech" <dimech@gmx.com>, help-gnu-emacs@gnu.org
> Subject: Re: Emacs Calendar - Removing holidays
>
> Jean Louis <bugs@gnu.support> writes:
>
> > What I mean is after marking with x and burying the buffer, buffer is
> > not killed and holidays appear still marked when again invoked with
> > M-x calendar
> >
> > If buffer is killed instead of buried then it comes back plain without
> > marks.
>
> I think that is expected.  But u should work to unmark.
>
> Michael.
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 20:17                     ` Christopher Dimech
@ 2020-11-19 20:50                       ` Michael Heerdegen
  2020-11-19 20:59                         ` Christopher Dimech
  2020-11-19 21:11                         ` Christopher Dimech
  0 siblings, 2 replies; 26+ messages in thread
From: Michael Heerdegen @ 2020-11-19 20:50 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: help-gnu-emacs, Jean Louis

Christopher Dimech <dimech@gmx.com> writes:

> Correct.  But then I have additional dates I want marked anh have put them
> as holidays, but cannot get the christian, hebrew etc to stop showing.

I think I see now why your attempts failed.  Emacs consults the variable
`calendar-holidays' - and only that, when marking holidays.  When that
variable is initialized, the bindings of all the holiday-... variables
are appended.  That means that changing any of these variables later
does not have an effect.

So what you want is to change or customize `calendar-holidays' I think,
e.g. by appending only some those holiday-... var values, or specifying
your own stuff etc.  The variable should be bound to a list of holiday
style diary expressions, that's the only requirement.

You could also add the lunar phases there, but I don't think that would
allow you to change the color of the highlighting, you are limited to
one highlighting style.

Let me add: the code of calendar and diary is old, written in a style
that is ok but nobody would write it like that today.  And it has not
been touched that much in the last years, probably because we also have
org-mode now (and the agenda views, which offer a super set of calendar
features).  That means that the behavior is sometimes a bit more 70s
like than that of newer stuff.

I'm a fan of diary symbolic expressions.  They allow you to specify
anything that Lisp allows, quite powerful.  org-mode also supports using
them in time stamps or so.

Michael.



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 20:50                       ` Michael Heerdegen
@ 2020-11-19 20:59                         ` Christopher Dimech
  2020-11-19 21:11                         ` Christopher Dimech
  1 sibling, 0 replies; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 20:59 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs, Jean Louis

This diary thing cropped up because I want to use Org-Capture
to Select a date for "Scheduled: %^t\n".

 ("Tc" "Project Gunga Din" entry
         (file+headline "~/02agenda/rapid-capture.org" "Project")
         "* Gunga Din\n
** %^{Value |Augment|Include|Clarify|Organise}\n
  Title: %?\n  Brief:\n  Detail:\n
  # Traverse Calendar with S-<right>, S-<left>, S-<down>, S-<up>.
  Scheduled: %^t\n  Entered: %T\n  Link: %a\n")


> Sent: Thursday, November 19, 2020 at 9:50 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: help-gnu-emacs@gnu.org, "Jean Louis" <bugs@gnu.support>
> Subject: Re: Emacs Calendar - Removing holidays
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > Correct.  But then I have additional dates I want marked anh have put them
> > as holidays, but cannot get the christian, hebrew etc to stop showing.
>
> I think I see now why your attempts failed.  Emacs consults the variable
> `calendar-holidays' - and only that, when marking holidays.  When that
> variable is initialized, the bindings of all the holiday-... variables
> are appended.  That means that changing any of these variables later
> does not have an effect.
>
> So what you want is to change or customize `calendar-holidays' I think,
> e.g. by appending only some those holiday-... var values, or specifying
> your own stuff etc.  The variable should be bound to a list of holiday
> style diary expressions, that's the only requirement.
>
> You could also add the lunar phases there, but I don't think that would
> allow you to change the color of the highlighting, you are limited to
> one highlighting style.
>
> Let me add: the code of calendar and diary is old, written in a style
> that is ok but nobody would write it like that today.  And it has not
> been touched that much in the last years, probably because we also have
> org-mode now (and the agenda views, which offer a super set of calendar
> features).  That means that the behavior is sometimes a bit more 70s
> like than that of newer stuff.
>
> I'm a fan of diary symbolic expressions.  They allow you to specify
> anything that Lisp allows, quite powerful.  org-mode also supports using
> them in time stamps or so.
>
> Michael.
>
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 20:50                       ` Michael Heerdegen
  2020-11-19 20:59                         ` Christopher Dimech
@ 2020-11-19 21:11                         ` Christopher Dimech
  2020-11-21 19:47                           ` Michael Heerdegen
  1 sibling, 1 reply; 26+ messages in thread
From: Christopher Dimech @ 2020-11-19 21:11 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs, Jean Louis



> Sent: Thursday, November 19, 2020 at 9:50 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Jean Louis" <bugs@gnu.support>, help-gnu-emacs@gnu.org
> Subject: Re: Emacs Calendar - Removing holidays
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > Correct.  But then I have additional dates I want marked anh have put them
> > as holidays, but cannot get the christian, hebrew etc to stop showing.
>
> I think I see now why your attempts failed.  Emacs consults the variable
> `calendar-holidays' - and only that, when marking holidays.  When that
> variable is initialized, the bindings of all the holiday-... variables
> are appended.  That means that changing any of these variables later
> does not have an effect.
>
> So what you want is to change or customize `calendar-holidays' I think,
> e.g. by appending only some those holiday-... var values, or specifying
> your own stuff etc.  The variable should be bound to a list of holiday
> style diary expressions, that's the only requirement.
>
> You could also add the lunar phases there, but I don't think that would
> allow you to change the color of the highlighting, you are limited to
> one highlighting style.
>
> Let me add: the code of calendar and diary is old, written in a style
> that is ok but nobody would write it like that today.  And it has not
> been touched that much in the last years, probably because we also have
> org-mode now (and the agenda views, which offer a super set of calendar
> features).  That means that the behavior is sometimes a bit more 70s
> like than that of newer stuff.
>
> I'm a fan of diary symbolic expressions.  They allow you to specify
> anything that Lisp allows, quite powerful.  org-mode also supports using
> them in time stamps or so.

Could you give some examples of "diary symbolic expressions" and how they
would be useful for setting work dates.  I am particularly interested in
marking dates that are available for deadlines, meetings.  And another for
those already set with deadlines, meetings, etc.

> Michael.
>



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

* Re: Emacs Calendar - Removing holidays
  2020-11-19 21:11                         ` Christopher Dimech
@ 2020-11-21 19:47                           ` Michael Heerdegen
  2020-11-21 20:16                             ` Christopher Dimech
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Heerdegen @ 2020-11-21 19:47 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: help-gnu-emacs, Jean Louis

Christopher Dimech <dimech@gmx.com> writes:

> Could you give some examples of "diary symbolic expressions" and how
> they would be useful for setting work dates.

The Emacs diary supports symbolic expressions that return a boolean
value depending on the free variable `date'. Functions that can be used
in such expressions are described in the manual.  As a special non-nil
value a string describing the event, and a cons (mark . string)
including a mark type for the calendar are allowed.  See
`diary-lunar-phases' for an example.

The good thing is that anything Elisp supports is allowed to be used in
such expressions.  The bad thing is that not so super many are
predefined.

> I am particularly interested in marking dates that are available for
> deadlines, meetings.  And another for those already set with
> deadlines, meetings, etc.

For org?  For that you would need to have a predicate that would tell
whether a given `date' is available or not.  I guess someone on the
org-mode user list might have an idea how to implement that.  Maybe
reusing some of the agenda code.  Depending on how your meetings
etc. are specified.

Regards,

Michael.



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

* Re: Emacs Calendar - Removing holidays
  2020-11-21 19:47                           ` Michael Heerdegen
@ 2020-11-21 20:16                             ` Christopher Dimech
  0 siblings, 0 replies; 26+ messages in thread
From: Christopher Dimech @ 2020-11-21 20:16 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs, Jean Louis



---------------------
Christopher Dimech
General Administrator - Naiad Informatics - GNU Project (Geocomputation)
- Geophysical Simulation
- Geological Subsurface Mapping
- Disaster Preparedness and Mitigation
- Natural Resource Exploration and Production
- Free Software Advocacy


> Sent: Saturday, November 21, 2020 at 8:47 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: help-gnu-emacs@gnu.org, "Jean Louis" <bugs@gnu.support>
> Subject: Re: Emacs Calendar - Removing holidays
>
> Christopher Dimech <dimech@gmx.com> writes:
>
> > Could you give some examples of "diary symbolic expressions" and how
> > they would be useful for setting work dates.
>
> The Emacs diary supports symbolic expressions that return a boolean
> value depending on the free variable `date'. Functions that can be used
> in such expressions are described in the manual.  As a special non-nil
> value a string describing the event, and a cons (mark . string)
> including a mark type for the calendar are allowed.  See
> `diary-lunar-phases' for an example.
>
> The good thing is that anything Elisp supports is allowed to be used in
> such expressions.  The bad thing is that not so super many are
> predefined.
>
> > I am particularly interested in marking dates that are available for
> > deadlines, meetings.  And another for those already set with
> > deadlines, meetings, etc.
>
> For org?  For that you would need to have a predicate that would tell
> whether a given `date' is available or not.  I guess someone on the
> org-mode user list might have an idea how to implement that.  Maybe
> reusing some of the agenda code.  Depending on how your meetings
> etc. are specified.

Yes, for org.

> Regards,
>
> Michael.
>
>



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

end of thread, other threads:[~2020-11-21 20:16 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-19 13:56 Emacs Calendar - Removing holidays Christopher Dimech
2020-11-19 14:02 ` Christopher Dimech
2020-11-19 14:09 ` Jean Louis
2020-11-19 15:21   ` Christopher Dimech
2020-11-19 15:32     ` Jean Louis
2020-11-19 15:37       ` Christopher Dimech
2020-11-19 15:43       ` Christopher Dimech
2020-11-19 16:05         ` Jean Louis
2020-11-19 16:38           ` Christopher Dimech
2020-11-19 16:26         ` Michael Heerdegen
2020-11-19 16:46           ` Christopher Dimech
2020-11-19 17:21           ` Christopher Dimech
2020-11-19 18:58             ` Michael Heerdegen
2020-11-19 19:06               ` Jean Louis
2020-11-19 19:40                 ` Michael Heerdegen
2020-11-19 19:52                   ` Jean Louis
2020-11-19 20:17                     ` Christopher Dimech
2020-11-19 20:50                       ` Michael Heerdegen
2020-11-19 20:59                         ` Christopher Dimech
2020-11-19 21:11                         ` Christopher Dimech
2020-11-21 19:47                           ` Michael Heerdegen
2020-11-21 20:16                             ` Christopher Dimech
2020-11-19 20:24                     ` Michael Heerdegen
2020-11-19 20:36                       ` Christopher Dimech
2020-11-19 19:52                   ` Christopher Dimech
2020-11-19 20:09                     ` Jean Louis

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.