help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: diary-mail-entries


From: Emanuel Berg
Subject: Re: diary-mail-entries
Date: Thu, 13 Oct 2022 21:21:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

aalinovi wrote:

> 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.

Good, reading is always good, but write code from day 0 ...

> 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.

You can run an Elisp file like a shell script (not literally),
with Emacs,

  $ emacs --batch --load FILE

I'd recommend making that work _in_ Emacs first, then as
above, only the third step would be from cron ...

Here is an example, with emphasis on AN example, not saying
it's a GOOD example of program design ...

  https://dataswamp.org/~incal/emacs-init/piles.el
  https://dataswamp.org/~incal/hits/hits.gpi
  https://dataswamp.org/~incal/piles-all

With

  $ crontab -l
  30 2 * * * /home/incal/public_html/hits/piles-all; 
/home/incal/public_html/hits/hits.gpi

It's a cool pic anyway :)

  https://dataswamp.org/~incal/hits/hits.png

> Not knowing lisp I have no idea where or how to begin.

If you feel you don't know enough Lisp start with things at
a level where you can get going ... those very small programs
don't have to be useful. Typically you don't have to write so
many of those before you can actually start with things that
are simple yes but actually useful as well.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]