9front - general discussion about 9front
 help / color / mirror / Atom feed
From: theinicke@bss-wf.de
To: 9front@9front.org
Subject: Re: [9front] Mail rewrite; open path with stored mails
Date: Sun, 14 Feb 2021 23:05:51 +0100	[thread overview]
Message-ID: <1E541693CE1BA38297468F967BA35FF2@bss-wf.de> (raw)
In-Reply-To: <092467A66CAF76198A34F2514264C1BC@eigenstate.org>

Thanks for the write-up. I appreciate it and get most of your points.
Here are some notes regarding your comments:

> Why not just make this flag modify the interpretation
> of argv[0]?

Frankly I do not get this - I thought about the new option behaving as opening the desired path at given name,
if name is given via argv[0] (otherwise using last path component as name).

> closembox()?

removeopened is arguably not a nice name, however closembox would be imho not so good either, because we only close previously opened mbox and not in general

> There's no real harm in skipping this special case.
> It's one open in code that does an open for every
> mail in the mailbox.

What special case exactly? I thought that we may want to be able to open relative paths (for that I used fd2path(2));
this however would remove us from having the possibility to open another imap (/imaps/mailserver/...) directory - thus if the path is already absolute I decided to leave it as it is (except for 1 possibly trailing slash, as this happens likely; with multiple trailing slashes one may be doomed, but deserves it probably).

> Why the termination and unterminaton?

Arguably ugly - still use abspath below (read: extract last path component and leave absolute path intact)..

> Why is this being repeated 10 times? [...]

It tries with a modified mbox name each time - say you got something like
$home/mail/9front/archive
and
$home/mail/9fans/archive
Then upon invoking 'Mail -p $home/mail/9front/archive' you would get /mail/fs/archive
and if you have this running somewhere and decided to open your other archive (without passing argument) this would be opened as /mail/fs/archive-0

That way we may have up to 11 mailboxes with the same name - 11 may be unnecessary high, but no harm I think? Taken from old Mail.


The remaining comments point out some obvious flaws and I'll gladly fix them; just wanted to quickly leave this here and thanks again for the feedback


  reply	other threads:[~2021-02-14 22:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 20:54 theinicke
2021-02-12 21:10 ` ori
2021-02-13 20:47   ` theinicke
2021-02-13 21:25     ` theinicke
2021-02-13 23:59       ` Alex Musolino
2021-02-14 10:42         ` theinicke
2021-02-14 20:57           ` ori
2021-02-14 22:05             ` theinicke [this message]
2021-02-14 22:55           ` Alex Musolino
2021-02-15  8:15             ` theinicke
2021-02-15  9:56               ` theinicke
  -- strict thread matches above, loose matches on Subject: below --
2021-02-12 20:50 [9front] Mail rewrite " theinicke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1E541693CE1BA38297468F967BA35FF2@bss-wf.de \
    --to=theinicke@bss-wf.de \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).