Gnus development mailing list
 help / color / mirror / Atom feed
* what is the best way to include code snippets in plain mail body
@ 2023-11-11 13:21 Uwe Brauer
  2023-11-11 13:39 ` Emanuel Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2023-11-11 13:21 UTC (permalink / raw)
  To: ding


Hi

Sometimes I have to include an example which is some code.
If it is on a emacs mailing list I would do 
#+begin_src 
\documentclass{article}
\usepackage{mathtools}
\mathtoolsset{showonlyrefs}
\usepackage[colorlinks]{hyperref}
\usepackage{xpatch}
\makeatletter
\xpretocmd\HyRef@autoref{\noeqref{#2}}{}{}% small hack
\makeatother
#+end_src


And this  is fine.

If I write to an author that used some html based mail, (using a gmail
account or thunderbird) I would use org-mime to htmlize the above code,
but in general I would use

,----
| \documentclass{article}
| \usepackage{mathtools}
| \mathtoolsset{showonlyrefs}
| \usepackage[colorlinks]{hyperref}
| \usepackage{xpatch}
| \makeatletter
| \xpretocmd\HyRef@autoref{\noeqref{#2}}{}{}% small hack
| \makeatother
`----

Is there any better way for plain based mailing lists say



Regards

Uwe Brauer 



-- 
I strongly condemn Hamas heinous atrocities on Israel, especially the despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the NATO membership of Ukraine.
I support the EU membership of Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/



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

* Re: what is the best way to include code snippets in plain mail body
  2023-11-11 13:21 what is the best way to include code snippets in plain mail body Uwe Brauer
@ 2023-11-11 13:39 ` Emanuel Berg
  2023-11-11 15:47   ` Uwe Brauer
  0 siblings, 1 reply; 8+ messages in thread
From: Emanuel Berg @ 2023-11-11 13:39 UTC (permalink / raw)
  To: ding

Uwe Brauer wrote:

> ,----
> | \documentclass{article}
> | \usepackage{mathtools}
> | \mathtoolsset{showonlyrefs}
> | \usepackage[colorlinks]{hyperref}
> | \usepackage{xpatch}
> | \makeatletter
> | \xpretocmd\HyRef@autoref{\noeqref{#2}}{}{}% small hack
> | \makeatother
> `----
>
> Is there any better way for plain based mailing lists say

That makes kill/yank slower and don't really increase
readability to an eye that is even remotely trained, which
will instantly recognize it as LaTeX source, box or no box.

-- 
underground experts united
https://dataswamp.org/~incal



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

* Re: what is the best way to include code snippets in plain mail body
  2023-11-11 13:39 ` Emanuel Berg
@ 2023-11-11 15:47   ` Uwe Brauer
  2023-11-11 18:41     ` Arash Esbati
  2023-11-11 19:23     ` Uwe Brauer
  0 siblings, 2 replies; 8+ messages in thread
From: Uwe Brauer @ 2023-11-11 15:47 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]

>>> "EB" == Emanuel Berg <incal@dataswamp.org> writes:

> Uwe Brauer wrote:
>> ,----
>> | \documentclass{article}
>> | \usepackage{mathtools}
>> | \mathtoolsset{showonlyrefs}
>> | \usepackage[colorlinks]{hyperref}
>> | \usepackage{xpatch}
>> | \makeatletter
>> | \xpretocmd\HyRef@autoref{\noeqref{#2}}{}{}% small hack
>> | \makeatother
>> `----
>> 
>> Is there any better way for plain based mailing lists say

> That makes kill/yank slower and don't really increase
> readability to an eye that is even remotely trained, which
> will instantly recognize it as LaTeX source, box or no box.

Ok point taken whats about the famous 

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{mathtools}
\mathtoolsset{showonlyrefs}
\usepackage[colorlinks]{hyperref}
\usepackage{xpatch}
\makeatletter
\xpretocmd\HyRef@autoref{\noeqref{#2}}{}{}% small hack
\makeatother
--8<---------------cut here---------------end--------------->8---


BTW, I swore I have seen code for inserting some code or marking the
code and inserting these lines, but I can't find it anymore

Any ideas?

Regards



-- 
I strongly condemn Hamas heinous atrocities on Israel, especially the despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the NATO membership of Ukraine.
I support the EU membership of Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: what is the best way to include code snippets in plain mail body
  2023-11-11 15:47   ` Uwe Brauer
@ 2023-11-11 18:41     ` Arash Esbati
  2023-11-11 19:44       ` Emanuel Berg
  2023-11-11 19:23     ` Uwe Brauer
  1 sibling, 1 reply; 8+ messages in thread
From: Arash Esbati @ 2023-11-11 18:41 UTC (permalink / raw)
  To: ding

Uwe Brauer <oub@mat.ucm.es> writes:

> BTW, I swore I have seen code for inserting some code or marking the
> code and inserting these lines, but I can't find it anymore
>
> Any ideas?

,----[ C-h f message-mark-inserted-region RET ]
| message-mark-inserted-region is an interactive native-compiled Lisp
| function in ‘message.el’.
| 
| It is bound to C-c M-m.
| 
| (message-mark-inserted-region BEG END &optional VERBATIM)
| 
| Mark some region in the current article with enclosing tags.
| See ‘message-mark-insert-begin’ and ‘message-mark-insert-end’.
| If VERBATIM, use slrn style verbatim marks ("#v+" and "#v-").
| 
`----

Best, Arash


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

* Re: what is the best way to include code snippets in plain mail body
  2023-11-11 15:47   ` Uwe Brauer
  2023-11-11 18:41     ` Arash Esbati
@ 2023-11-11 19:23     ` Uwe Brauer
  2023-11-11 19:32       ` Emanuel Berg
  1 sibling, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2023-11-11 19:23 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 925 bytes --]




> Ok point taken whats about the famous 

> \documentclass{article}
> \usepackage{mathtools}
> \mathtoolsset{showonlyrefs}
> \usepackage[colorlinks]{hyperref}
> \usepackage{xpatch}
> \makeatletter
> \xpretocmd\HyRef@autoref{\noeqref{#2}}{}{}% small hack
> \makeatother


> BTW, I swore I have seen code for inserting some code or marking the
> code and inserting these lines, but I can't find it anymore


Ah, message-mark-inserted-region and friends I the answer, sorry for the
noise then.

> Any ideas?

> Regards

-- 
I strongly condemn Hamas heinous atrocities on Israel, especially the despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the NATO membership of Ukraine.
I support the EU membership of Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

* Re: what is the best way to include code snippets in plain mail body
  2023-11-11 19:23     ` Uwe Brauer
@ 2023-11-11 19:32       ` Emanuel Berg
  2023-11-11 22:22         ` Emanuel Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Emanuel Berg @ 2023-11-11 19:32 UTC (permalink / raw)
  To: ding

Uwe Brauer wrote:

> Ah, message-mark-inserted-region and friends I the answer,
> sorry for the noise then.

Let me try that on what you just wrote,

--8<---------------cut here---------------start------------->8---
Ah, message-mark-inserted-region and friends I the answer,
sorry for the noise then.
--8<---------------cut here---------------end--------------->8---

Oh, those I do recognize!

Okay, so what are they supposed to do?

Actually I have a function that removes them [1] but if they
are beneficial, maybe I'll allow them then.

[1] https://dataswamp.org/~incal/emacs-init/gnus/article.el

-- 
underground experts united
https://dataswamp.org/~incal



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

* Re: what is the best way to include code snippets in plain mail body
  2023-11-11 18:41     ` Arash Esbati
@ 2023-11-11 19:44       ` Emanuel Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Emanuel Berg @ 2023-11-11 19:44 UTC (permalink / raw)
  To: ding

> Mark some region in the current article with enclosing tags.
> See ‘message-mark-insert-begin’ and
> ‘message-mark-insert-end’. If VERBATIM, use slrn style
> verbatim marks ("#v+" and "#v-").

Here is that software:

  https://en.wikipedia.org/wiki/Slrn

From 1994! (Gnus is from 1995.)

But there is no mention of the "#v+" and "#v-" notation on
that page.

-- 
underground experts united
https://dataswamp.org/~incal



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

* Re: what is the best way to include code snippets in plain mail body
  2023-11-11 19:32       ` Emanuel Berg
@ 2023-11-11 22:22         ` Emanuel Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Emanuel Berg @ 2023-11-11 22:22 UTC (permalink / raw)
  To: ding

> Okay, so what are they supposed to do?

They font lock in `mm-uu-extract', but that seems to work even
if I remove them. Maybe my washing function kicks in later
than the fontifying, so that part is already done, and
remains. Don't know if there is some other part?

What did the Usenet/slrn guys do with it?

Facts for fan(s), in the Debian repos there are these hits for
"slrn",

  p slrn     - threaded text-mode news reader           
  p slrnface - shows X-Faces from a newsposting on an X1
  p slrnpull - pulls a small newsfeed from an NNTP serve

slrn is also mentioned 125 times in this document from 1993,
1994, and 1995,

  https://web.archive.org/web/20160512160602/http://alcor.concordia.ca/topics/netnews/slrn/intro/

-- 
underground experts united
https://dataswamp.org/~incal



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

end of thread, other threads:[~2023-11-11 22:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-11 13:21 what is the best way to include code snippets in plain mail body Uwe Brauer
2023-11-11 13:39 ` Emanuel Berg
2023-11-11 15:47   ` Uwe Brauer
2023-11-11 18:41     ` Arash Esbati
2023-11-11 19:44       ` Emanuel Berg
2023-11-11 19:23     ` Uwe Brauer
2023-11-11 19:32       ` Emanuel Berg
2023-11-11 22:22         ` Emanuel Berg

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