unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Including AI into Emacs
@ 2024-12-06 17:22 Jean Louis
  2024-12-06 18:25 ` Eli Zaretskii
  0 siblings, 1 reply; 22+ messages in thread
From: Jean Louis @ 2024-12-06 17:22 UTC (permalink / raw)
  To: Emacs Tangents

My previous e-mail about AI was written only to test the following
function:

(defun rcd-monitor-directory-for-mail-files (directory)
  "Monitor DIRECTORY for creation of *.mail files, and call `msmtp-count-remaining` when one is created.

DIRECTORY should be the path to the directory you want to monitor.

This function sets up a file notification watch on DIRECTORY.
When a new file with the `.mail` extension is created within DIRECTORY,
the `msmtp-count-remaining` function is called."
  (file-notify-add-watch
   directory
   '(change)
   (lambda (event)
     ;; Structure of EVENT:
     ;; (ACTION EVENT-TYPE FILE)
     (let* ((event-type (cadr event))
            (file-path (caddr event))
            (file-name (file-name-nondirectory file-path)))
       (when (and (eq event-type 'created)
                  (string-suffix-p ".mail" file-name))
         (msmtp-count-remaining))))))

As I was invoking the function always manually with: M-x msmtp-count-remaining

(defun msmtp-count-remaining ()
  "Count and send any remaining MSMTP messages in the queue"
  (interactive)
  (let ((default-directory (rcd-my-home))
	(msmtp-runqueue (executable-find "msmtp-runqueue.sh")))
    (rcd-general-log "Function `msmtp-count-remaining' invoked" nil 1 nil nil nil 6)
    (let ((count (length (directory-files "~/.msmtpqueue" nil "\\.mail"))))
      (if (> count 0)
	  (progn
	    (start-process msmtp-runqueue "RCD MSMTP" msmtp-runqueue)
	    (rcd-message "MSMTP: There is %s e-mails in queue." count))
	(rcd-message "MSMTP: No emails.")))))

Now I can just put:

(rcd-monitor-directory-for-mail-files "~/.msmtpqueue")

in the Emacs configuration and as soon as e-mail is sent, it is also
dispatched with msmtp:

msmtp is an SMTP client that can be used to send mails from Mutt and
probably other MUAs (mail user agents). It forwards mails to an SMTP
server (for example at a free mail provider), which takes care of the
final delivery.  Using profiles, it can be easily configured to use
different SMTP servers with different configurations, which makes it
ideal for mobile clients.

Jean Louis



^ permalink raw reply	[flat|nested] 22+ messages in thread
* Including AI into Emacs
@ 2024-12-06 17:19 Jean Louis
  2024-12-06 18:16 ` Bruno Barbier
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Jean Louis @ 2024-12-06 17:19 UTC (permalink / raw)
  To: Emacs Tangents

Today, I’ve noticed that there are many free software projects that
use artificial intelligence, or AI for short. These projects are
created by developers all around the world who want to make useful
tools available to everyone. AI can help solve complex problems,
automate tasks, and improve the way we interact with technology. It’s
exciting to see so many people contributing to these projects and
making AI more accessible to everyone.

I believe it would be really beneficial to include AI into GNU
Emacs. Emacs is already a powerful tool, but adding AI features could
make it even better. For example, AI could help with writing by
suggesting improvements or catching mistakes. It could also assist
with coding by providing smart autocomplete options or debugging
help. These features would make Emacs more efficient and
user-friendly, helping users get their work done faster and with fewer
errors.

I am using AI every day, and will soon provide references on how to
use it self-contained, as every user can download it and run it on
their own computers.

Jean Louis



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

end of thread, other threads:[~2024-12-10 14:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 17:22 Including AI into Emacs Jean Louis
2024-12-06 18:25 ` Eli Zaretskii
2024-12-06 18:32   ` John Yates
2024-12-06 19:06   ` Jean Louis
  -- strict thread matches above, loose matches on Subject: below --
2024-12-06 17:19 Jean Louis
2024-12-06 18:16 ` Bruno Barbier
2024-12-06 22:18   ` Jean Louis
2024-12-07  9:32     ` Bruno Barbier
2024-12-07 10:30       ` Jean Louis
2024-12-07 11:29         ` Bruno Barbier
2024-12-09 21:06           ` Jean Louis
2024-12-09 22:56             ` Bruno Barbier
2024-12-10  8:03               ` Jean Louis
2024-12-10 10:37                 ` Bruno Barbier
2024-12-10 14:27                   ` Jean Louis
2024-12-06 18:22 ` Eli Zaretskii
2024-12-06 19:11 ` Basile Starynkevitch
2024-12-06 21:14   ` Jean Louis
2024-12-06 22:26   ` Jean Louis
2024-12-06 22:59 ` Christopher Howard
2024-12-06 23:21   ` Jean Louis
2024-12-10 10:45   ` Basile Starynkevitch

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