Re: Scheduling mails

2024-04-03 Thread João Pedro
Em quarta, 03/04/2024 às 07:06 (-03), David Bremner  
escreveu:

> Message properties might work a bit better than tags

Ah, indeed message properties seem to be more appropriate. Are they
persisted, or are they tied to an Emacs session? Because I would like to
have it so that even if I kill my Emacs session and open a new one, if
the message has the `:scheduled' property with the right time, it should
be sent. There's also concerns on what to do when Emacs was not up when
the scheduled time arrived. Do we 1. send it immediately? or 2. inform
the user it was not able to deliver the message? Going with the latter
has the caveat that it might be missed by the user, and one would be
clueless to the fact that their message hadn't arrived.

> but your periodic search would still have to search for all of the
> scheduled=time properties (wildcard search is currently only supported
> using s-exp queries).

How about having a list of '(MESSAGE-ID . SCHEDULED-TIME), with the
periodic check looking in that list for the scheduled times? It would
have the issue of it not being persistent between Emacs sessions, but I
think that could be addressed by letting the users know this lack of
persistance, and documenting how you could achieve it with
`savehist-additional-variables'.

> I would suggest having a look at the existing draft handling, as what
> you describe sounds like it is related.

Taking a quick glance at it, it seems like we could have a similar
thing, where scheduled messages are saved to the database somewhere,
with either the tag, as it is with drafts, or just the message property
as you suggested.

-- 
João Pedro de A. Paula
IT bachelors at Universidade Federal do Rio Grande do Norte (UFRN)
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Forward email error - forward-sexp: Scan error

2024-04-03 Thread David Bremner
Jon Fineman  writes:

> Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 22384 
> 32216)
>   scan-sexps(22384 1)
>   forward-sexp()
>   mml-expand-html-into-multipart-related((part (type . "text/html") (charset 
> . "UTF-8") (nofile . "yes") (tag-location . 907) (contents . " 

Re: Scheduling mails

2024-04-03 Thread David Bremner
João Pedro  writes:

> Em terça, 02/04/2024 às 02:05 (+01), Jose A Ortega Ruiz  
> escreveu:
>
>> I might be wrong, but I don't think the Gnus agent can be easily reused
>> from notmuch. We could perhaps save the message as a draft upon C-c C-j,
>> and then have a periodic timer that checks if any of the drafts has
>> expired (maybe using a special, additional tag for the search) and send
>> it?
>
> I think we should be able to use a similar logic to
> `gnus-delay-article': it adds an X-Gnus-Delayed header with a timestamp
> and seems to, as you proposed, periodically check for scheduled
> messages. The header holds a timestamp for the prompted scheduled time
> (which can be given in as an absolute date, or relative to the current
> time) and we could add to that a `scheduled' tag or something along
> those lines.

Message properties might work a bit better than tags, but your periodic
search would still have to search for all of the scheduled=time
properties (wildcard search is currently only supported using s-exp
queries).

I would suggest having a look at the existing draft handling, as what
you describe sounds like it is related.
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org