From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: pietru@caramail.com Newsgroups: gmane.emacs.help Subject: Re: Toggle appointment notification Date: Tue, 1 Dec 2020 19:35:43 +0100 Message-ID: References: <87sg8q86p0.fsf@zoho.eu> <87o8je86dm.fsf@zoho.eu> 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="21339"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: moasenwood@zoho.eu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 01 19:37:25 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 1kkAWi-0005Pf-4Z for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Dec 2020 19:37:24 +0100 Original-Received: from localhost ([::1]:35990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkAWg-0006R3-Us for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Dec 2020 13:37:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkAVA-0006QZ-MS for help-gnu-emacs@gnu.org; Tue, 01 Dec 2020 13:35:48 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:42467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkAV8-0004yX-KJ for help-gnu-emacs@gnu.org; Tue, 01 Dec 2020 13:35:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606847743; bh=9oeUqBvAlVDQbjVnqemf4Yf0WxbIVTKnJ15RYOoZT4Q=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=YddR1nFuBm9HVs4OaNsb+W9lzYSED+ohVkiVmwlxs81FplUjcEuMIlgGROpQoVkyz FTUeE787bRo3j3LAvurljnhU5FDvJKL4Kf/zPNP8x94VxGht0bfAAB4iVsB+a8IzGS zl2smkqlwvQtYIf2ONkPnm1EMdhSyfNrso1Prxcc= 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-bs14.server.lan [172.19.170.182]) (via HTTP); Tue, 1 Dec 2020 19:35:43 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87o8je86dm.fsf@zoho.eu> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:7pDmRRxQ5FbUTonakW+aPWnuMQaSUWor7ugWrYtMLA9f2cTUF3nIeYYPo6z95Ayuth1zS aU0R8g9LihwAGU507Mw7Df+76oaikRT2K8EVJ009VNJnT9zQ9v4Ovo2CZbpg9e5gc1zFHfBbBjWr WEyy9ZjypWD6wSIrIufN5Nr1n7jbmisvWiarIOmzF4XJwp57eNo9M2xSl7xNUcLN06sBHDVy5bLt 3RvB2/MZHtYD3SbQF563iLi5GzBqT5B1c1jeTQVbZ8ziZzyuRwmjRkQvg51oijeO7ZZffPaZfFs+ 2g= X-UI-Out-Filterresults: notjunk:1;V03:K0:Ye7Wk7S5Ufc=:IF9xTbEtgCMHxOzDeoVdYU cgb3zkft0Mn2d0GCzs5YlxHxEqDVx7ABRDs7rnDxzT0h2raZzuS8pg5j+0pOlZByXtjJmdOW6 n095EJl8/qGYHYM24NC4t2T6OXPDZTsV+In0HMEdVnWBJnhS/4GTYAFubhUQRE71p9T8iQST3 EisUd/e7jw/Eu9arXZIWGHR4X6/HrC5ZXtu7E/9IgP5V0bRfKm6HLjBi/sgcR0cSG1SC0yNxB ejqxR1fCCvgMa3DZTU7lV9OBhTjtYN4rsaHDE5V2UQ23k9HkqaDlNi1WpIUVrau3ILSsFhb7P 2cEnTyTCOrxYmTyG9yqHT6n+lNUlSyEloL9Gx/AyYhdes1OXjuFmhYlc2urEcrZFG9mDJg9D1 AP9psKjxqjLFP+/NU0zXLKeoUUa/sKRTEdRZUPhMrtwXruUmEK15a4hGjmPudZv4WwGt7ujFV hYgkj5c9wvcFbKlHHcQjEXvmCeP7PLWHYCaGbMFPCPUEPtE5otKUsRBsbzFnqbo8cvhqHKNxy luPSUORDYVDZ5bLOMk4KY3isMiyNcYL41GLsZph+ZznzG7PrTR0mbV5DD5jWOAj0qeZbvZ2IF mmLG90K/OTEX4= Received-SPF: pass client-ip=212.227.15.18; envelope-from=pietru@caramail.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:125794 Archived-At: There is one thing that is bugging me while testing my approach. If I get the state of a function, how can I then print the state in the messages buffer? (get 'appt-ntf-cycle 'state) > Sent: Tuesday, December 01, 2020 at 6:03 AM > From: "Emanuel Berg via Users list for the GNU Emacs text editor" > To: help-gnu-emacs@gnu.org > Subject: Re: Toggle appointment notification > > >> (defun diary-appt-ntf (n) > >> "Switches diary appointment notification." > >> > >> (appt-activate n) ; Activates diary appointment notification > >> > >> (if (< n 1) > >> (appt-check 1) ; Checks appointments and updates reminders. > >> (appt-check nil)) ; Disables appt-check > >> ) > > > > Looks good [...] > > I mean _the Elisp_ looks good. I don't use appt so I don't know > if what happens with `appt-check' is perhaps implied when you > activate/inactivate appt with `appt-activate'. Read the > docstrings and browse the code to find out, perhaps! > > Still, if what you do makes sense, it is nothing to worry about, > really. Doing the right thing twice isn't a problem :) > > -- > underground experts united > http://user.it.uu.se/~embe8573 > https://dataswamp.org/~incal > > >