From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: aalinovi@riseup.net Newsgroups: gmane.emacs.help Subject: Re: diary-mail-entries Date: Fri, 14 Oct 2022 09:42:55 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39112"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 15:44:16 2022 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 1ojKz1-0009xx-Jl for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 15:44:15 +0200 Original-Received: from localhost ([::1]:50420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojKz0-0002nV-L0 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 09:44:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojKxp-0002nE-0V for help-gnu-emacs@gnu.org; Fri, 14 Oct 2022 09:43:01 -0400 Original-Received: from mx1.riseup.net ([198.252.153.129]:43952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojKxm-0000zF-R8 for help-gnu-emacs@gnu.org; Fri, 14 Oct 2022 09:43:00 -0400 Original-Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4MpndY22GxzDrZP for ; Fri, 14 Oct 2022 13:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1665754977; bh=orYYQbUYmz3V4Zj+vlilO8uQm6c+skM4dwgWLISsR8Y=; h=From:To:Subject:Date:From; b=rcMvZ0BREWRkIywfAqSdlyxDjbMGN4KalJyxn8Cwpp+Dz0AIM0yTi3I8ruB39FS05 nEK9qkiOcbEZPN/WxJRiUW9KM91bxYORbjAWBODFjprXUTsY+fDDPCOU6n3FfxkrzQ FXIraQu+ANDXTUgHTd/ze4JDNdccWAm5fTYzJNyM= X-Riseup-User-ID: 5D4435945C4D97202C4A5E88991B99AFA652042C17E32FDF33CE6FED80ECC161 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4MpndX6frRz5vNf for ; Fri, 14 Oct 2022 13:42:56 +0000 (UTC) Original-Received: from eddie.fios-router.home (localhost [127.0.0.1]) by eddie.fios-router.home (OpenSMTPD) with ESMTP id 9f9525dd for ; Fri, 14 Oct 2022 09:42:55 -0400 (EDT) Comments: In-reply-to aalinovi@riseup.net message dated "Thu, 13 Oct 2022 22:07:38 -0400." Content-ID: <14011.1665754975.1@eddie.fios-router.home> Received-SPF: pass client-ip=198.252.153.129; envelope-from=aalinovi@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.29 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:139930 Archived-At: It appears I spoke to soon. In ~/.emacs.d/init.el I have: (require 'midnight) (midnight-delay-set 'midnight-delay "0:40am") In midnight customization, the only thing I changed was to add "diary-mail-entries" to "Midnight hook". My problem is that not only does dairy-mail-entry run at 40 minutes after midnight, it also runs each and everytime I start emacs. I know some people keep emacs running for weeks or even months at a time. I don't work like that. I am retired and use my laptop to browse the web, read emails, etc. When I'm done I shut down and then boot up later in the day if I feel like it. Having emacs send me an email each time is not what I want. If anyone has any ideas I would be grateful. Thanks, Arthur aalinovi@riseup.net writes: >Thorsten Bonow writes: >>>>>> aalinovi writes: > >> I am running emacs-28.2 on OpenBSD-current. I will state at the outset t= >hat I >> do no know lisp but have acquired a copy of Robert Chassell's "Emacs Lis= >p: An >> Introduction" and have started going thru it. > >> After several hours of experimenting I have finally got M-x >> diary-mail-entries to work. What I now need is to enable that in a cron = >job >> to run each night. Not knowing lisp I have no idea where or how to begin= >. > >> Any assistance would be appreciated. Thank you. Arthur > >>>Hi, > >>>short answer, pressed for time: The help for `diary-mail-entries' has >>>an example script: "C-h f diary-mail-entries". > >>>But I think this can be handled by the "midnight.el" library, already >>>included: "run something every midnight, e.g., kill old buffers". > >I couldn't get the example script to run but I did get "midnight.el" >(which I didn't even know existed) to work. > >Thank you very much. > >Arthur