[emacs-berlin] gnus "cut here" code snippets

Dieter Kluenter dieter at dkluenter.de
Sun Mar 26 13:20:57 UTC 2023


Hi,
Boxquote.el might be of help.

-Dieter


⁣Gesendet mit BlueMail ​

Am 26. März 2023, 14:05, um 14:05, jman <emacs-berlin at city17.xyz> schrieb:
>
>hey!
>
>I was looking again at one of the last email from Michael in this
>list[0], there is a special marker for code snippets that gnus
>recognizes and applies a special coloring (a "face", I guess?).
>
>So, the command is `message-mark-inserted-region` (C-c M-m), described
>as "Mark some region in the current article with enclosing tags."
>
>--8<---------------cut here---------------start------------->8---
>whatever goes inside here will appear different, right?
>--8<---------------cut here---------------end--------------->8---
>
>I was curious, so I've tried hacking this long marker string
>(`message-mark-insert-begin` and `message-mark-insert-end`), can it be
>made shorter?
>
>If I am not wrong this is defined by a regexp in mm-ul.el:
>
>--8<---------------cut here---------------start------------->8---
>(message-marks
>  ;; Text enclosed with tags similar to `message-mark-insert-begin' and
>     ;; `message-mark-insert-end'.  Don't use those variables to avoid
>     ;; dependency on `message.el'.
>     "^-+[8<>]*-\\{9,\\}[a-z ]+-\\{9,\\}[a-z ]+-\\{9,\\}[8<>]*-+$"
>     "^-+[8<>]*-\\{9,\\}[a-z ]+-\\{9,\\}[a-z ]+-\\{9,\\}[8<>]*-+$"
>     ,(lambda () (mm-uu-verbatim-marks-extract 0 0 1 -1))
>     nil)
>--8<---------------cut here---------------end--------------->8---
>
>Which translated to English should be:
>1. one "-" optionally followed by one "8" and one of "<" or ">"
>2. nine times "-"
>3. one alphabetic string (or space)
>4. nine times "-"
>5. one alphabetic string (or space)
>6. nine times "-"
>7. optionally one "8" and one of "<" or ">"
>8. a closing "-"
>
>and this leads me to think that these delimiters ...
>
>----------s---------s----------
>... can be reduced to this, but not any further, right?
>----------e---------e----------
>
>Wow, 47% of the original length! I'm sure this will save some trees
>when
>sending emails around! :D
>
>Anyway, it was fun digging into this completely useless thing and
>customize my own shorter snippet message markers :)
>
>happy hacking!
>
>[0]: https://mailb.org/pipermail/emacs-berlin/2023/000997.html
>_______________________________________________
>emacs-berlin mailing list
>emacs-berlin at emacs-berlin.org
>https://mailb.org/mailman/listinfo/emacs-berlin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailb.org/pipermail/emacs-berlin/attachments/20230326/49be3f94/attachment.htm>


More information about the emacs-berlin mailing list