From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Emacs Calendar - Removing holidays Date: Thu, 19 Nov 2020 17:38:20 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23215"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 19 17:46:41 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfn4z-0005wO-8i for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 19 Nov 2020 17:46:41 +0100 Original-Received: from localhost ([::1]:41002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfn4y-0006WP-0T for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 19 Nov 2020 11:46:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfmxV-0007t3-Qb for help-gnu-emacs@gnu.org; Thu, 19 Nov 2020 11:38:57 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:41885) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfmxT-00065F-IB for help-gnu-emacs@gnu.org; Thu, 19 Nov 2020 11:38:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1605803900; bh=yqZcSCL/oCZp4GxeQ5hsR4jFWamgFRn0YuXQHf1vfos=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=IVRQHv/krbkOYrcoAUEeB9zAFUZoOlAvAv1YtB2WnWhXJ17RzlAsNNZQovFtLjsJ4 U53QNCFkehgIUeRznBApJ3h9G0qVAZBXLCRpUD9TXz+rytvv+iizB4ggU8jmQmWD6i KLjEyoCF1JCW+BZW02+SaQYLXmpVSxK5g5YaHMEM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs05.server.lan [172.19.170.173]) (via HTTP); Thu, 19 Nov 2020 17:38:20 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:gOKThFfWPBT7EE4tBbjwXC6rJ6leBGpe+yiLVYye78Hbff/4wrWPdF4zkUy6m6csI2NYt jRPHJ+bz6t7KqaiXfCXo8ETSLS9okgBmzpeR5Yhvos0qsrKmr64qAJU2IxgYi1fxk2xRJy9u0xHR P00WJOPQtABH4TQ0s8lsH9iqE8yySGpMK1JNEYxPKMUMgGJgUSg/g8IfMuulzEY5Fx4p6nAiJjbP n9FhYWLeDIBQ0swTbphXWtFcGA0bBfB6cnZjz+Jn83JR/w1tGFxTWpWLaky3YS+aVXKQTaqOnH7T U8= X-UI-Out-Filterresults: notjunk:1;V03:K0:zhO62R5thhY=:dEQYmyMvT40bQeCBYQKNKX AW2Zf2V0ZauZOyrLNNYSTiCK77xoo5sFzvJNxLL34gmf9JfSY7bwiU5Um2tiPW1F7f4rSVhIV cvvMXfHoO1qM6n2CK0Xa3eZcWlIDlrizeAt9CkWKv7apqeFT/GzuO4tCU8od9gPWo3A3LAhFf PasItW9Ik6CNJBQ9+ID/a3DAZHgW9GrBrVJSsuz+mfoCpKaNLd1PTmTFNgWBro91qlcbwFtxJ RWCw1VHx1uxXenk2OGSaSwCRXEnEF++qTouadEVXY5Fi/B+h+U5EAPivtyDkyCXm1Qqy0stN6 +PoIegDHUWMKa+oTHuaNp4f0+btvd+vdBqGL1yOanrR/cBrP7H9bRFtD4QvanNsqSOeq3VFEW e7XKlBVyLzcByO0ds0oywaYdzws1fn2Z2KCWf91oHxmGe3pBFdOfeuW3m1MXxueSnhqD5PRBP qS5AqxF/Viq0H51co87pC8/QFVNwwbw7sJJQsaafsv56t8KG0y777MpY9BMibhRdUJnN5Au6S 7sQyXB+hEVU1vAtinwCbMHApXuq+N9BWQIIQhDKwxtqPVXklPtBuyqosf6Xk2wU8LSSvrRHu4 s+zRl30n3reXo= Received-SPF: pass client-ip=212.227.17.21; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125385 Archived-At: > Sent: Thursday, November 19, 2020 at 5:05 PM > From: "Jean Louis" > To: "Christopher Dimech" > Cc: "Help Gnu Emacs" > Subject: Re: Emacs Calendar - Removing holidays > >=20 > I understand you wish to highlight those days by your choice but not > holidays when you press `x', is it so? >=20 > 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'=2E Sure as long as it works=2E I just want markings for work related dates, without any other dates when using Emacs for a particular project=2E =20 > Holidays are in the list: >=20 > (((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= =C3=A1b") ((10 31 2020) "Halloween") ((11 11 2020) "Veteran's Day") ((11 12= 2020) "Birth of Bah=C3=A1=E2=80=99u=E2=80=99ll=C3=A1h") ((11 26 2020) "Tha= nksgiving") ((12 11 2020) "Hanukkah") ((12 21 2020) "Summer Solstice 1:02pm= (EAT)") ((12 25 2020) "Christmas")) >=20 > One holiday is in this form: >=20 > ((10 3 2020) "Sukkot") >=20 > So you could construct your list of holidays this way: >=20 > '((10 3 2020) "Sukkot") > (11 29 2020) "Something else")) >=20 > And you put it in some function that returns such list or you can > simply construct that list and call it `my-important-dates' >=20 > Then copy this function `calendar-mark-holidays' to your file from holid= ays=2Eel >=20 > (defun calendar-mark-holidays (&optional event) > "Mark notable days in the calendar window=2E > If EVENT is non-nil, it's an event indicating the buffer position to > use instead of point=2E" > (interactive (list last-nonmenu-event)) > ;; If called from a menu, with the calendar window not selected=2E > (with-current-buffer > (if event (window-buffer (posn-window (event-start event))) > (current-buffer)) > (setq calendar-mark-holidays-flag t) > (message "Marking holidays=2E=2E=2E") > (dolist (holiday (calendar-holiday-list)) > (calendar-mark-visible-date (car holiday) calendar-holiday-marker)= ) > (message "Marking holidays=2E=2E=2Edone"))) >=20 > Then change it little by: >=20 > (defun my-calendar-mark-my-days (&optional event) > "Mark notable days in the calendar window=2E > (interactive) > ;; If called from a menu, with the calendar window not selected=2E > (with-current-buffer > (setq calendar-mark-holidays-flag t) > (message "Marking my days=2E=2E=2E") > (dolist (holiday (this-function-returns-my-days)) > (calendar-mark-visible-date (car holiday) calendar-holiday-marker)= ) > (message "Marking my days=2E=2E=2Edone"))) >=20 > Then you may bind that function to a key in calendar mode map=2E >=20 >