unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* diary-mail-entries
@ 2022-10-13 16:53 aalinovi
  2022-10-13 17:31 ` diary-mail-entries Thorsten Bonow
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: aalinovi @ 2022-10-13 16:53 UTC (permalink / raw)
  To: help-gnu-emacs

I am running emacs-28.2 on OpenBSD-current. I will state at the outset
that I do no know lisp but have acquired a copy of Robert Chassell's
"Emacs Lisp: 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



^ permalink raw reply	[flat|nested] 11+ messages in thread
* diary-mail-entries
@ 2024-07-22 15:40 Arthur Alinovi
  2024-07-22 18:33 ` diary-mail-entries Michael Heerdegen via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 11+ messages in thread
From: Arthur Alinovi @ 2024-07-22 15:40 UTC (permalink / raw)
  To: help-gnu-emacs

I have the following in ~/.emacs.d/init.el:

(require 'midnight)
(setq midnight-period 39600) ;; (eq (* 11 60 60) "12 hours")
(midnight-delay-set 'midnight-delay 1800)
(add-hook 'midnight-hook 'diary-mail-entries)

My thinking is that this sets "midnight" for 11:00am and runs the
midnight-hook diary-mail-entries 30 minutes later.

Obviously, my thinking is flawed or I wouldn't be here.

So, what am I doing wrong and how do I correct it?

Thanks



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: diary-mail-entries
@ 2022-10-14 13:42 aalinovi
  2022-10-16 20:31 ` diary-mail-entries Thorsten Bonow
  0 siblings, 1 reply; 11+ messages in thread
From: aalinovi @ 2022-10-14 13:42 UTC (permalink / raw)
  To: help-gnu-emacs

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 <thorsten.bonow@post.rwth-aachen.de> writes:
>>>>>> aalinovi  <aalinovi@riseup.net> 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



^ permalink raw reply	[flat|nested] 11+ messages in thread
* diary-mail-entries
@ 2007-03-20 21:49 sven.bretfeld
  2007-03-21  4:45 ` diary-mail-entries Kevin Rodgers
  0 siblings, 1 reply; 11+ messages in thread
From: sven.bretfeld @ 2007-03-20 21:49 UTC (permalink / raw)
  To: help-gnu-emacs

Hello list

I'm trying to set up a cron job sending me the entries of the Emacs
diary every morning, just as described in

http://www.emacswiki.org/cgi-bin/wiki/DiaryMode#DiaryMode3

It's not working, since the mail sent by the script doesn't contain
all of the entries of my diary file. It contains almost only
automatical entries like holidays. A few personal entries are
included, however, about two out of 20. Does anybody have an idea
what's going wrong here?

I add the script and my settings below.

Thanks for help
Sven

------------

Here is the script (it's one line in the original; I tried 50 days
just to see if any entry is caught at all, it should be 7 or less
after I got it working):

#!/bin/bash
emacs --batch --eval "(setq diary-mail-days 50 european-calendar-style
t diary-file \"~/aktuell/myconf/diary\" diary-mail-addr
\"sven.bretfeld@relwi.unibe.ch\")" -l diary-lib -f diary-mail-entries

And here are the diary-settings of my .emacs:

(setq diary-file "~/aktuell/myconf/diary")

;; Europäisch
(setq european-calendar-style 't)
(setq calendar-week-start-day 1
       calendar-day-name-array
         ["Sonntag" "Montag" "Dienstag" "Mittwoch" 
          "Donnerstag" "Freitag" "Samstag"]
       calendar-month-name-array
         ["Januar" "Februar" "März" "April" "Mai" 
          "Juni" "Juli" "August" "September" 
          "Oktober" "November" "Dezember"])

;; Start with diary (if there is an entry today)
(diary)

;; Timer
(display-time)
(add-hook 'diary-hook 'appt-make-list)
(diary 0)

;; LaTeX output des Kalenders
(setq cal-tex-diary 't)

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

end of thread, other threads:[~2024-07-22 18:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-13 16:53 diary-mail-entries aalinovi
2022-10-13 17:31 ` diary-mail-entries Thorsten Bonow
2022-10-13 19:21 ` diary-mail-entries Emanuel Berg
2022-10-13 19:23 ` diary-mail-entries Emanuel Berg
  -- strict thread matches above, loose matches on Subject: below --
2024-07-22 15:40 diary-mail-entries Arthur Alinovi
2024-07-22 18:33 ` diary-mail-entries Michael Heerdegen via Users list for the GNU Emacs text editor
2022-10-14 13:42 diary-mail-entries aalinovi
2022-10-16 20:31 ` diary-mail-entries Thorsten Bonow
2022-10-17 11:21   ` diary-mail-entries aalinovi
2007-03-20 21:49 diary-mail-entries sven.bretfeld
2007-03-21  4:45 ` diary-mail-entries Kevin Rodgers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).