From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Newsgroups: gmane.emacs.help Subject: Re: Toggle appointment notification Date: Tue, 01 Dec 2020 10:13:57 +0100 Message-ID: <87mtyx51nu.fsf@luflow.net> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33922"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 01 16:30:51 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 1kk7cB-0008j9-NN for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Dec 2020 16:30:51 +0100 Original-Received: from localhost ([::1]:45072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kk7cA-0005Dy-OM for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Dec 2020 10:30:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kk1jb-0001ZF-3X for help-gnu-emacs@gnu.org; Tue, 01 Dec 2020 04:14:07 -0500 Original-Received: from libre.luflow.net ([172.105.73.23]:48768) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kk1jZ-0000Ld-IW for help-gnu-emacs@gnu.org; Tue, 01 Dec 2020 04:14:06 -0500 Original-Received: from luflow.net (indeed [192.168.1.19]) by libre.luflow.net (Postfix) with ESMTPSA id 932AAB6FBCA for ; Tue, 1 Dec 2020 10:13:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=luflow.net; s=2019080101; t=1606814037; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HKWNZLus52D1nucMT7TBviBeme++lq0i2tDrEbD1SJs=; b=PRU54pI/McvxBp8lRjxMrJVIbnw8dUmMUH6yMibvbm9Tv3/dc1P2Zb0Z1NNdW8c1eGDQIQ jBPIE/ovDWKfOlvCkzfBMA01QOmovKN6EgRl6sDZAX5ZABBoGpkLC8MCaakFyvPpCogWO4 QBDKDf/cuT2Un6jAY1SqKhexMM5vxvw= In-Reply-To: (pietru@caramail.com's message of "Tue, 1 Dec 2020 04:47:55 +0100") Received-SPF: pass client-ip=172.105.73.23; envelope-from=aw@luflow.net; helo=libre.luflow.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 01 Dec 2020 10:30:27 -0500 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:125789 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, Dec 01, 2020 at 04:47:55 AM, pietru@caramail.com wrote: > Want to toggle between enable and disable appointment notification and ha= ve > put a defun as so below. I reckon that both appt-activate and appt-check > are needed but not absolutely aware of what and how they activate things > for appointments. > > What would be a right approach to toggle between enable and disable using > a single key-sequence for my case here? > > (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 > ) > > > =2D-=20 Regards, Andreas --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEj9YeaaVVsh0jR+6tW4X5tfV2pmcFAl/GCVUACgkQW4X5tfV2 pmfEKxAAgLYNpEXlcbrY6INqsM9Z4AKOG3cYdnCJzhko4u/1GDNoylNx5sXJpkMS euEVdhTg4vOu7k4I1RlYO8I5f9X3ITWN5pX/RJl8KI52/ZLF4D21NuZUgHcnSEgx 5naWgWlnG86NknHIx19w0f+d+0244w98Yb8jFFiNWoYSXfGv9fNhQ3dnWRQELG55 JDpMluSPwCiMILsQnCrKsBNhXJ2QsxwPF2N9oFFJz6mbzo5kWRKevnLCC0kU+LQW kb5fj/u2YkgvZE32DgQKGX/BR/69DEGUIyy7v9qc7cmxWwIp7veiuKM/r69DBAWI bnanZtE9/dphGHwOGJH4nmg/sr04oNsTcqjUM2Hr4l4n4PXvw3KyMC5HFMXEP4sa WuPxHc6TGJe/V1JL3cxIYAfliq5H3pzFE91dJGOyVZlhSGetR7U4B2qJpj69AGSN jX39REtjgD9orhptcAmspIDNTeCGdu4AohuRqQ5THhFEIffQcGBa3TMoW4d2VQlk vjXGmTnnaG8RZc0P8dP9dYdApPwuhJPd4EWZCD+8e5A2jYZCS4c7q6IIZcwqh+Fd HUduTeaZVbXLmTqWrxxNkKtyijP+tlttGVQ+OXmpTYJjfFbKfrtMS2WZ3pPXVBqA Zir6q/2qUWYw1boGxdzqVPCm10fCvTA/kq5Tq6sVyu0j4wHF+Go= =j5IT -----END PGP SIGNATURE----- --=-=-=--