Gnus development mailing list
 help / color / mirror / Atom feed
* Re: Display markdown emails via markdown-mode
       [not found] <11609.6634463005$1732153019@news.gmane.org>
@ 2024-11-22  8:06 ` Robert Pluim
  2024-12-02 22:21 ` Adam Sjøgren
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Pluim @ 2024-11-22  8:06 UTC (permalink / raw)
  To: Husain Alshehhi; +Cc: ding

>>>>> On Wed, 20 Nov 2024 19:35:33 -0600, "Husain Alshehhi" <husain@alshehhi.io> said:

    Husain> Hi all,
    Husain> I have emails with Content-Type: text/markdown and I would like to view
    Husain> such emails in markdown mode somehow. Currently, when I receive such
    Husain> email, gnus/message-mode knows to identify the mime, but it displays the
    Husain> email the same way it displays text/plain.

    Husain> Ideally, I would like gnus/message-mode to process such emails the same
    Husain> way it processes html: identify the Content-Type, and send it to
    Husain> eww. For markdown, it would be through markdown-mode's live-preview,
    Husain> which displays markdown buffers in eww. Worse case scenario, I can
    Husain> convert markdown to html and open it via eww.

I think this is possible, I suggest you check (info "(emacs-mime) Display Customization")

Robert
-- 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Display markdown emails via markdown-mode
       [not found] <11609.6634463005$1732153019@news.gmane.org>
  2024-11-22  8:06 ` Display markdown emails via markdown-mode Robert Pluim
@ 2024-12-02 22:21 ` Adam Sjøgren
  1 sibling, 0 replies; 3+ messages in thread
From: Adam Sjøgren @ 2024-12-02 22:21 UTC (permalink / raw)
  To: ding

Husain writes:

> I have emails with Content-Type: text/markdown and I would like to view
> such emails in markdown mode somehow.

If you have markdown-mode installed, try this:

    ; Display text/markdown:
    (require 'markdown-mode)
    (defun mm-display-markdown (handle)
      (mm-display-inline-fontify handle 'markdown-mode))
    (add-to-list 'mm-inline-media-tests '("text/markdown" mm-display-markdown identity))

It's not perfect (I see some line-break problems at least), but it's a
start.


  Best regards,

    Adam

-- 
 "Though I have not tested it, I trust it works."           Adam Sjøgren
                                                       asjo@koldfront.dk



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Display markdown emails via markdown-mode
@ 2024-11-21  1:35 Husain Alshehhi
  0 siblings, 0 replies; 3+ messages in thread
From: Husain Alshehhi @ 2024-11-21  1:35 UTC (permalink / raw)
  To: ding

Hi all,

I have emails with Content-Type: text/markdown and I would like to view
such emails in markdown mode somehow. Currently, when I receive such
email, gnus/message-mode knows to identify the mime, but it displays the
email the same way it displays text/plain.

Ideally, I would like gnus/message-mode to process such emails the same
way it processes html: identify the Content-Type, and send it to
eww. For markdown, it would be through markdown-mode's live-preview,
which displays markdown buffers in eww. Worse case scenario, I can
convert markdown to html and open it via eww.

Context:

At work, there are many tools that generate all sorts of updates. I have
a process that collect these updates for me and store it as messages in
maildir format. I use markdown for the message Content-Type, and use
gnus to read these messages.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-02 22:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <11609.6634463005$1732153019@news.gmane.org>
2024-11-22  8:06 ` Display markdown emails via markdown-mode Robert Pluim
2024-12-02 22:21 ` Adam Sjøgren
2024-11-21  1:35 Husain Alshehhi

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).