send and display format=flowed messages

This commit is contained in:
Felix Van der Jeugt 2021-05-06 23:53:06 +02:00
parent 52bcd03dd7
commit 90bbd45d50
No known key found for this signature in database
GPG Key ID: 58B209295023754D
4 changed files with 36 additions and 0 deletions

View File

@ -162,6 +162,15 @@ vis:map(vis.modes.VISUAL, ';a', function()
end end
end) end)
vis:map(vis.modes.NORMAL, ';a', function()
if vis.count then
vis:command(string.format(':1,$|mreflow %d', vis.count))
vis.count = nil
else
vis:command(':1,$|mreflow')
end
end)
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Strip trailing spaces -- Strip trailing spaces

25
local/bin/mreflow Executable file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# Do not modify headers
while read line && [ -n "$line" ]; do
printf "%s\n" "$line"
done
printf "\n"
read line || exit 0
while true; do
if [ "${line% wrote:}" != "$line" ]; then
printf "%s\n" "$line"
read line || exit 0
fi
while [ -n "$line" ]; do
printf "%s\n" "$line"
read line || exit 0
done | par $* | sed 's/$/ /;$s/ $//'
read line || exit 0
if [ -z "$line" ]; then
exit 0
else
printf "\n"
fi
done

View File

@ -1,2 +1,3 @@
text/html: w3m -dump -o display_link_number=1 -I $PIPE_CHARSET -T text/html text/html: w3m -dump -o display_link_number=1 -I $PIPE_CHARSET -T text/html
text/calendar: cat text/calendar: cat
text/plain: mflow

1
mblaze/headers Normal file
View File

@ -0,0 +1 @@
Content-Type: text/plain; charset=UTF-8; format=flowed