Feature request: put preamble inside html comment tags for editing email #176

Closed
opened 2022-09-02 06:03:32 +03:00 by oblitum · 10 comments

This is one small request that would greatly improve my user experience. Currently
I edit my emails in NeoVim, and I edit them in Markdown, with Markdown filetype, I get many many Markdown authoring features from my setup. I make meli then send this Markdown as multipart email, original Markdown as text and the rendered HTML counterpart. One little annoyance I have is when I start editing an email in meli, it puts a header preamble at the top of the file, this section doesn't play well with the Markdown content below, even more when I wish to render for preview, that blob of text sticks in the rendered Markdown.

What about putting this section inside an HTML comment tag, that works well in Markdown too, and makes it standout from the rest of the email content? Like this:

<!--
Date: Thu, 01 Sep 2022 23:34:28 -0300
From: Foo <foo@example.com>
To: Bar <bar@example.com>
Cc: Baz <baz@example.com>
Bcc: 
Subject: Something
User-Agent: meli 0.7.2
References:  <912327193y912>
In-Reply-To: <8973292819381>
-->

Email text starts here....

Sometimes I do that manually to check rendered email without the preamble clutter, but I have to remove it before finishing editing, because meli doesn't recognize that. I get many "IDE" diagnostics in that section too, which is avoided with this trick.

This is one small request that would greatly improve my user experience. Currently I edit my emails in NeoVim, and I edit them in Markdown, with Markdown filetype, I get many many Markdown authoring features from my setup. I make meli then send this Markdown as multipart email, original Markdown as text and the rendered HTML counterpart. One little annoyance I have is when I start editing an email in meli, it puts a header preamble at the top of the file, this section doesn't play well with the Markdown content below, even more when I wish to render for preview, that blob of text sticks in the rendered Markdown. What about putting this section inside an HTML comment tag, that works well in Markdown too, and makes it standout from the rest of the email content? Like this: ``` <!-- Date: Thu, 01 Sep 2022 23:34:28 -0300 From: Foo <foo@example.com> To: Bar <bar@example.com> Cc: Baz <baz@example.com> Bcc: Subject: Something User-Agent: meli 0.7.2 References: <912327193y912> In-Reply-To: <8973292819381> --> Email text starts here.... ``` Sometimes I do that manually to check rendered email without the preamble clutter, but I have to remove it before finishing editing, because meli doesn't recognize that. I get many "IDE" diagnostics in that section too, which is avoided with this trick.
How about this? https://git.meli.delivery/meli/meli/pulls/144

@epilys nice!, and generic.

@epilys nice!, and generic.

Merged!

Merged!
Manos Pitsidianakis added the
enhancement
label 2022-09-02 16:12:26 +03:00

Thx, just tried.

One thing I notice is that the preamble has an additional empty line at the end, it's coming like this while editing an email:

<!--
nhonho
nhonho


-->
cursor here
Thx, just tried. One thing I notice is that the preamble has an additional empty line at the end, it's coming like this while editing an email: <!-- nhonho nhonho --> cursor here

Will fix in a future commit!

Will fix in a future commit!

Hopefully this seems to fix it based on the unit test:

2de69d17f1

Hopefully this seems to fix it based on the unit test: https://git.meli.delivery/meli/meli/commit/2de69d17f14e79ce2a35564d278b5e895d16a48f

Yes it's. Many thanks for these improvements it's really turning into an ideal experience (except for the counters 😅).

Yes it's. Many thanks for these improvements it's really turning into an ideal experience (except for the counters 😅).

There's just two or three issues I'm facing with meli: counters, that it sometimes crashes on deleting e-mails at random, no idea how to repro that, and that sometimes I'm still having to press p twice to display an email on conversation that for some tricky reason doesn't show up. I can live with those at the moment and plan to dig/report further when counters rewrite is done.

There's just two or three issues I'm facing with meli: counters, that it sometimes crashes on deleting e-mails at random, no idea how to repro that, and that sometimes I'm still having to press p twice to display an email on conversation that for some tricky reason doesn't show up. I can live with those at the moment and plan to dig/report further when counters rewrite is done.

I have to solve the counter thing soon, it's driving me nuts...

I have to solve the counter thing soon, it's driving me nuts...

it's driving me nuts...

Sorry if my complains have any relation with that :) In case it's not that, I share your pain.

> it's driving me nuts... Sorry if my complains have any relation with that :) In case it's not that, I share your pain.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: meli/meli#176
There is no content yet.