Re:Pandoc
by tambourine_man on Friday February 02, 2024 @10:24AM
(#39229650)
I had a script that piped to curl to send, Mail.app for downloading via POP and Vim to read/write, but I gave up and ended up copy/pasting as well.
Someday I may try that again, if email is still relevant by then. Vim and email would be my perfect set up.
Re:Pandoc
by kugurerdem on Friday February 02, 2024 @10:46AM
(#39229909)
> I had a script that piped to curl to send, Mail.app for downloading via POP and Vim to read/write
Wow, this is very interesting, and I might even try it at some point. It might have been a bit challenging to sync and read the emails though, but the sending part seems nice.
Was the reason for why you gave up related to syninc emails?
Re:Pandoc
by tambourine_man on Friday February 02, 2024 @11:34AM
(#39230676)
I liked that Mail.app stored every message as a single separate file, instead of the mbox that Thunderbird and others did. But at some version they started saving a hash with a multiple folder structure and that broke the setup. I had a few issues with MIME encoding as well, which were probably my fault. It was too much work and I eventually gave up, but if I find the will to do it again, I'd choose a simple POP downloader + some filter (if not in address book or previous recipients, move message to “Unknown”).
qlmanage worked great for HTML messages and attachments, though.
Re:Pandoc
by dredmorbius on Saturday February 03, 2024 @01:41AM
(#39238082)
FYI, the maildir format (usable with mutt and numerous other email clients) also saves each email message as an individual file, and avoids mbox's notorious quoting issue.
You might find vim-anywhere what you need. Roughly speaking, in almost any text-entry field you can hit a hotkey, get a temporary macvim buffer, and when you wq the contents are pasted where you came from.
Re:Pandoc
by dredmorbius on Saturday February 03, 2024 @01:40AM
(#39238074)
You might find the "edit in vim" extension useful.
I've got it installed on MacOS and Linux, occasionally use it for longer HN comments.
The extension automatically invokes a vim session with the contents of your current browser edit window, and reads back in the output of your vim session when you're done with it.
<https://addons.mozilla.org/en-US/firefox/addon/edit-with-vim...>
Currently, I just open vim in the terminal, write what I need, then copy the text. I open dmenu using a shortcut, type something like "unwr", which is sufficient for selecting the "unwrap-clipboard" script of mine, press enter, which unwraps the text on the clipboard. Finally, I paste it in the email client.
I know it might seem a bit tricky, but it's better than what I did before. I used to set the textwidth to a really large number like 9999, highlight the text I wanted to unwrap, and then type 'gqq' for formatting. And don't forget, you also have to wrap the text back if you don't want to change the original format of the text file you wrote.
You can use soft-wrapping in vim, but I don't prefer it. Soft-wrapping is not as convenient to me as hard-wrapped text when using vim shortcuts. For instance, if you are using soft-wrapping in vim and you press 'o,' the insertion mode will start at the end of the paragraph because vim will consider the entire paragraph as a single line. However, there are many situations where I only want to insert text in the middle of a paragraph. You will also most likely set j to act like gj and k to act like gk, to make the cursor move between lines that are visually separated but actually form a single line. I don't like this either.