GNU bug report logs - #50763
Markdown blocks in Gnus messages

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 23 Sep 2021 16:01:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50763 in the body.
You can then email your comments to 50763 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50763; Package emacs. (Thu, 23 Sep 2021 16:01:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 23 Sep 2021 16:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Markdown blocks in Gnus messages
Date: Thu, 23 Sep 2021 18:47:51 +0300
Tags: patch

People use markdown blocks on e.g. Reddit, StackOverflow, etc.
and maybe this is the reason why such blocks are used in bug reports.
But without proper highlighting such bug reports as bug#50752
are unreadable.  This patch adds support for highlighting
of such blocks:

```patch
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index 494221adee..b6acd2e32a 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -145,6 +145,14 @@ mm-uu-type-alist
      ,#'mm-uu-pgp-key-extract
      ,#'mm-uu-gpg-key-skip-to-last
      nil)
+    (markdown-emacs-sources
+     "^```\\(?:elisp\\|emacs-lisp\\|(\\|\n(\\)"
+     "^```$"
+     ,#'mm-uu-emacs-sources-extract)
+    (markdown-diff ;; this should be higher than `git-format-patch'
+     "^```\\(?:diff\\|patch\\|\ndiff --git \\)"
+     "^```$"
+     ,#'mm-uu-diff-extract)
     (emacs-sources
      "^;;;?[ \t]*[^ \t]+\\.el[ \t]*--"
      "^;;;?[ \t]*\\([^ \t]+\\.el\\)[ \t]+ends here"
```

PS: This patch is highlighted properly in Gnus when the same patch is applied.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50763; Package emacs. (Thu, 23 Sep 2021 21:21:02 GMT) Full text and rfc822 format available.

Message #8 received at 50763 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 50763 <at> debbugs.gnu.org
Subject: Re: bug#50763: Markdown blocks in Gnus messages
Date: Thu, 23 Sep 2021 23:19:58 +0200
Juri Linkov <juri <at> linkov.net> writes:

> People use markdown blocks on e.g. Reddit, StackOverflow, etc.
> and maybe this is the reason why such blocks are used in bug reports.
> But without proper highlighting such bug reports as bug#50752
> are unreadable.  This patch adds support for highlighting
> of such blocks:

Makes sense to me; please go ahead and push.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50763; Package emacs. (Fri, 24 Sep 2021 06:46:01 GMT) Full text and rfc822 format available.

Message #11 received at 50763 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50763 <at> debbugs.gnu.org
Subject: Re: bug#50763: Markdown blocks in Gnus messages
Date: Fri, 24 Sep 2021 09:45:08 +0300
tags 50763 fixed
close 50763 28.0.50
quit

>> People use markdown blocks on e.g. Reddit, StackOverflow, etc.
>> and maybe this is the reason why such blocks are used in bug reports.
>> But without proper highlighting such bug reports as bug#50752
>> are unreadable.  This patch adds support for highlighting
>> of such blocks:
>
> Makes sense to me; please go ahead and push.

Pushed and closed.




Added tag(s) fixed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Fri, 24 Sep 2021 06:46:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.0.50, send any further explanations to 50763 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Fri, 24 Sep 2021 06:46:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Oct 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 178 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.