On 15/05/2024 02:32, Greg Wooledge wrote:
On Tue, May 14, 2024 at 08:16:20PM +0200, Nicolas George wrote:[...]
Messages in Markdown in the Windows world? I have never seen it.
The only sensible interpretation I can
come up with for why these asterisks were added is that they're being
placed around text that's supposed to be emphasized/italicized.
*Bold*, /italics/, and _underlined_ markup is supported by various
mailers, e.g. Thunderbird and Gnus. Some render superscripts^1 and subscripts_2 as well.
Backticks (`echo $PATH`) are more specific to markdown. However
sometimes I use them not expecting that the message will be rendered as markdown. Just to avoid ambiguity where a piece of code starts and ends.
On 15/05/2024 03:17, Max Nikulin wrote:
On 15/05/2024 02:32, Greg Wooledge wrote:
On Tue, May 14, 2024 at 08:16:20PM +0200, Nicolas George wrote:
Messages in Markdown in the Windows world? I have never seen it.
[...]
The only sensible interpretation I can
come up with for why these asterisks were added is that they're being placed around text that's supposed to be emphasized/italicized.
*Bold*, /italics/, and _underlined_ markup is supported by various
mailers, e.g. Thunderbird and Gnus. Some render superscripts^1 and subscripts_2 as well.
Backticks (`echo $PATH`) are more specific to markdown. However
sometimes I use them not expecting that the message will be rendered as markdown. Just to avoid ambiguity where a piece of code starts and ends.
When this sort of subject comes up (as it does, every so often), I
wonder why `text/markdown` isn't offered as a mime type for sending
emails. If you're an MUA and you're going to parse text/plain for
markup, then why not offer text/markdown as the body of the message? I
know that there have been various attempts to bridge the gap between "text/plain is too basic" and "text/html is too powerful" such as text/enriched and text/rtf, but Markdown seems to be hitting a sweet
spot of being easy to write and being widely adopted elsewhere.
When this sort of subject comes up (as it does, every so often), I wonder
why `text/markdown` isn't offered as a mime type for sending emails.
On Thu, May 16, 2024 at 09:28:05AM -0400, Stefan Monnier wrote:
[...]
So, yes, I encourage you to send more of those, and if your recipients don't like the result, try and get them to complain to their
MUA's authors (most of those MUAs are of course proprietary and are not very ... responsive, but that's all we can do).
Actually I've been tempted to teach my mail reader to transform HTML
into some lightweight markup (yeah, you need a bit of heuristics for
that ;-) -- say Org, but why not its poor sister Markdown.
So, yes, I encourage you to send more of those, and if your recipients
don't like the result, try and get them to complain to their
MUA's authors (most of those MUAs are of course proprietary and are not
very ... responsive, but that's all we can do).
The stupidest case I bumped into is Github where replying by `plain/text` email lets you add comments to an issue, but `text/markdown` replies are simply sent to `/dev/null` even though Markdown is the standard format
they use in the web interface.
When this sort of subject comes up (as it does, every so often), I wonder
why `text/markdown` isn't offered as a mime type for sending emails.
FWIW, last time I tried to send `text/(x-)markdown` messages,
On Thu, May 16, 2024 at 09:48:23AM -0400, tomas@tuxteam.de wrote:
Actually I've been tempted to teach my mail reader to transform HTML
into some lightweight markup (yeah, you need a bit of heuristics for
that ;-) -- say Org, but why not its poor sister Markdown.
On 17/05/2024 10:16, Karl Vogel wrote:
https://github.com/aaronsw/html2text/ might interest you. It converts
(relatively) sane HTML into Markdown.
I put html2text.py into $HOME/lib and use this to call it:
#!/bin/sh
#<html2mkd: convert reasonable HTML to Markdown
exec /usr/bin/env python $HOME/lib/html2text.py ${1+"$@"}
exit 1
I am puzzled by this wrapper. I expect that "$@" is enough here and namely {1+"$@"} is redundant. Am I wrong?
Actually I've been tempted to teach my mail reader to transform HTMLPlease don't settle for markdown. I would love a org filter!
into some lightweight markup (yeah, you need a bit of heuristics for
that ;-) -- say Org, but why not its poor sister Markdown.
org-mode just handles tabular data admirably :)
Actually I've been tempted to teach my mail reader to transform HTMLPlease don't settle for markdown. I would love a org filter!
into some lightweight markup (yeah, you need a bit of heuristics for
that ;-) -- say Org, but why not its poor sister Markdown.
org-mode just handles tabular data admirably :)
Just beware that Org's code is generally written under the implicit assumption that the Org document is trusted, so if you try to reuse
parts of Org's code to do the rendering be extra mindful of the
potential for security holes.
[ This applies to many other ELisp packages, of course; it's not
exclusive to Org. ]
Actually I've been tempted to teach my mail reader to transform HTMLPlease don't settle for markdown. I would love a org filter!
into some lightweight markup (yeah, you need a bit of heuristics for
that ;-) -- say Org, but why not its poor sister Markdown.
org-mode just handles tabular data admirably :)
Just beware that Org's code is generally written under the implicit assumption that the Org document is trusted, so if you try to reuse
parts of Org's code to do the rendering be extra mindful of the
potential for security holes.
On 17/05/2024 18:10, Greg Wooledge wrote:
On 17/05/2024 10:16, Karl Vogel wrote:
https://github.com/aaronsw/html2text/ might interest you. It converts
(relatively) sane HTML into Markdown.
I put html2text.py into $HOME/lib and use this to call it:
[...]#!/bin/sh
#<html2mkd: convert reasonable HTML to Markdown
exec /usr/bin/env python $HOME/lib/html2text.py ${1+"$@"}
exit 1
https://mywiki.wooledge.org/WrapperScript
Short version: "$@" is good enough if your /bin/sh isn't museum-era. ${1+"$@"} works around a bug in some very old shells.
Thanks. I am unsure if a python2 script from 2011 is consistent with a sh expanding "$@" to empty string, but the reason of the construct might be
just muscle memory or some guide.
P.S.
Portable shell section in autoconf manual mentions "${1+"$@"}" issues with zsh (the script above requires /bin/sh explicitly): https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html#index-_0022_0024_0040_0022
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 166:44:22 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,529 |