Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* cut here markers for code snippets in mail
@ 2021-08-26 18:23 Andreas Reuleaux
  2021-08-26 21:41 ` Eric Abrahamsen
  2021-09-19 16:35 ` Wayne Harris via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  0 siblings, 2 replies; 7+ messages in thread
From: Andreas Reuleaux @ 2021-08-26 18:23 UTC (permalink / raw)
  To: info-gnus-english

Hi,

I have seen people highlighting code snippets in mail
with "cut here markers": some ascii art for scissors, "cut here",
"start", "end", ..., like so:


--8<---------------cut here---------------start------------->8---
rm -f /etc/fonts/conf.d/70-no-bitmaps.conf
ln -f -s /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf  /etc/fonts/conf.d
--8<---------------cut here---------------end--------------->8---


which is kind of nice, and simple (as I don't want to get into
composing html mails with org-mime or the like).

I get to see them "green on yellow" in gnus (once I have received
such mails), or when in draft status (in my drafts folder).

Two questions (at least):

For one thing, I wonder if this behaviour is anywhere
documented/specified/explained in more detail?

And then: I would like to see my code green-on-yellow snippets in
message mode as well (when composing mail), or at least as a toggle:
see how my mail would look to the recipient.

And how are people actually using these "cut here markers":
insert them by hand, as I did above? Or is there some automatic support
for this hidden somewhere? - Or any other mechanisms for
such code snippets highlighting - in org mode nevertheless perhaps [?]:
I don't want to send html mails, but maybe org-mime / orgmsg / etc.
are useful for composing mails?

I only use gnus - nothing else (TM).


Thanks in advance,
  -A


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

* Re: cut here markers for code snippets in mail
  2021-08-26 18:23 cut here markers for code snippets in mail Andreas Reuleaux
@ 2021-08-26 21:41 ` Eric Abrahamsen
  2021-08-27  0:22   ` Andreas Reuleaux
  2021-08-27  5:23   ` Enrico Schumann
  2021-09-19 16:35 ` Wayne Harris via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  1 sibling, 2 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2021-08-26 21:41 UTC (permalink / raw)
  To: Andreas Reuleaux; +Cc: info-gnus-english

Andreas Reuleaux <rx@a-rx.info> writes:

> Hi,
>
> I have seen people highlighting code snippets in mail
> with "cut here markers": some ascii art for scissors, "cut here",
> "start", "end", ..., like so:
>
> rm -f /etc/fonts/conf.d/70-no-bitmaps.conf
> ln -f -s /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf  /etc/fonts/conf.d
>
>
> which is kind of nice, and simple (as I don't want to get into
> composing html mails with org-mime or the like).
>
> I get to see them "green on yellow" in gnus (once I have received
> such mails), or when in draft status (in my drafts folder).
>
> Two questions (at least):
>
> For one thing, I wonder if this behaviour is anywhere
> documented/specified/explained in more detail?
>
> And then: I would like to see my code green-on-yellow snippets in
> message mode as well (when composing mail), or at least as a toggle:
> see how my mail would look to the recipient.
>
> And how are people actually using these "cut here markers":
> insert them by hand, as I did above? Or is there some automatic support
> for this hidden somewhere? - Or any other mechanisms for
> such code snippets highlighting - in org mode nevertheless perhaps [?]:
> I don't want to send html mails, but maybe org-mime / orgmsg / etc.
> are useful for composing mails?

The command to run is `message-mark-inserted-region', bound to "C-c M-m"
by default in message-mode. It's not terribly discoverable, but it is
there in the "Message" menu.

I don't believe there's currently any way to get a "preview" in
message-mode, of how your outgoing message will look to the recipient.


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

* Re: cut here markers for code snippets in mail
  2021-08-26 21:41 ` Eric Abrahamsen
@ 2021-08-27  0:22   ` Andreas Reuleaux
  2021-08-27  5:23   ` Enrico Schumann
  1 sibling, 0 replies; 7+ messages in thread
From: Andreas Reuleaux @ 2021-08-27  0:22 UTC (permalink / raw)
  To: info-gnus-english

Ah, OK, I see, thanks a lot.

And doing it w/ C-c M-m is definitely faster than
cut & paste by hand.

-A


Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Andreas Reuleaux <rx@a-rx.info> writes:
>
>> Hi,
>>
>> I have seen people highlighting code snippets in mail
>> with "cut here markers": some ascii art for scissors, "cut here",
>> "start", "end", ..., like so:
>>
>> rm -f /etc/fonts/conf.d/70-no-bitmaps.conf
>> ln -f -s /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf  /etc/fonts/conf.d
>>
>>
>> which is kind of nice, and simple (as I don't want to get into
>> composing html mails with org-mime or the like).
>>
>> I get to see them "green on yellow" in gnus (once I have received
>> such mails), or when in draft status (in my drafts folder).
>>
>> Two questions (at least):
>>
>> For one thing, I wonder if this behaviour is anywhere
>> documented/specified/explained in more detail?
>>
>> And then: I would like to see my code green-on-yellow snippets in
>> message mode as well (when composing mail), or at least as a toggle:
>> see how my mail would look to the recipient.
>>
>> And how are people actually using these "cut here markers":
>> insert them by hand, as I did above? Or is there some automatic support
>> for this hidden somewhere? - Or any other mechanisms for
>> such code snippets highlighting - in org mode nevertheless perhaps [?]:
>> I don't want to send html mails, but maybe org-mime / orgmsg / etc.
>> are useful for composing mails?
>
> The command to run is `message-mark-inserted-region', bound to "C-c M-m"
> by default in message-mode. It's not terribly discoverable, but it is
> there in the "Message" menu.
>
> I don't believe there's currently any way to get a "preview" in
> message-mode, of how your outgoing message will look to the recipient.


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

* Re: cut here markers for code snippets in mail
  2021-08-26 21:41 ` Eric Abrahamsen
  2021-08-27  0:22   ` Andreas Reuleaux
@ 2021-08-27  5:23   ` Enrico Schumann
  2021-08-27 11:28     ` Andreas Reuleaux
  1 sibling, 1 reply; 7+ messages in thread
From: Enrico Schumann @ 2021-08-27  5:23 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: info-gnus-english

On Thu, 26 Aug 2021, Eric Abrahamsen writes:

> Andreas Reuleaux <rx@a-rx.info> writes:
>
>> Hi,
>>
>> I have seen people highlighting code snippets in mail
>> with "cut here markers": some ascii art for scissors, "cut here",
>> "start", "end", ..., like so:
>>
>> rm -f /etc/fonts/conf.d/70-no-bitmaps.conf
>> ln -f -s /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf  /etc/fonts/conf.d
>>
>>
>> which is kind of nice, and simple (as I don't want to get into
>> composing html mails with org-mime or the like).
>>
>> I get to see them "green on yellow" in gnus (once I have received
>> such mails), or when in draft status (in my drafts folder).
>>
>> Two questions (at least):
>>
>> For one thing, I wonder if this behaviour is anywhere
>> documented/specified/explained in more detail?
>>
>> And then: I would like to see my code green-on-yellow snippets in
>> message mode as well (when composing mail), or at least as a toggle:
>> see how my mail would look to the recipient.
>>
>> And how are people actually using these "cut here markers":
>> insert them by hand, as I did above? Or is there some automatic support
>> for this hidden somewhere? - Or any other mechanisms for
>> such code snippets highlighting - in org mode nevertheless perhaps [?]:
>> I don't want to send html mails, but maybe org-mime / orgmsg / etc.
>> are useful for composing mails?
>
> The command to run is `message-mark-inserted-region', bound to "C-c M-m"
> by default in message-mode. It's not terribly discoverable, but it is
> there in the "Message" menu.
>
> I don't believe there's currently any way to get a "preview" in
> message-mode, of how your outgoing message will look to the recipient.
>

It seems that 'mml-preview' (C-c RET P) shows the highlighting.


-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net


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

* Re: cut here markers for code snippets in mail
  2021-08-27  5:23   ` Enrico Schumann
@ 2021-08-27 11:28     ` Andreas Reuleaux
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Reuleaux @ 2021-08-27 11:28 UTC (permalink / raw)
  To: info-gnus-english


OK, works fine for me, and thanks for sharing.

-A


(and sorry if you get this message twice now: I meant to send this
to the list)

Enrico Schumann <es@enricoschumann.net> writes:

> On Thu, 26 Aug 2021, Eric Abrahamsen writes:
>
>> Andreas Reuleaux <rx@a-rx.info> writes:
>>
>>> Hi,
>>>
>>> I have seen people highlighting code snippets in mail
>>> with "cut here markers": some ascii art for scissors, "cut here",
>>> "start", "end", ..., like so:
>>>
>>> rm -f /etc/fonts/conf.d/70-no-bitmaps.conf
>>> ln -f -s /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf  /etc/fonts/conf.d
>>>
>>>
>>> which is kind of nice, and simple (as I don't want to get into
>>> composing html mails with org-mime or the like).
>>>
>>> I get to see them "green on yellow" in gnus (once I have received
>>> such mails), or when in draft status (in my drafts folder).
>>>
>>> Two questions (at least):
>>>
>>> For one thing, I wonder if this behaviour is anywhere
>>> documented/specified/explained in more detail?
>>>
>>> And then: I would like to see my code green-on-yellow snippets in
>>> message mode as well (when composing mail), or at least as a toggle:
>>> see how my mail would look to the recipient.
>>>
>>> And how are people actually using these "cut here markers":
>>> insert them by hand, as I did above? Or is there some automatic support
>>> for this hidden somewhere? - Or any other mechanisms for
>>> such code snippets highlighting - in org mode nevertheless perhaps [?]:
>>> I don't want to send html mails, but maybe org-mime / orgmsg / etc.
>>> are useful for composing mails?
>>
>> The command to run is `message-mark-inserted-region', bound to "C-c M-m"
>> by default in message-mode. It's not terribly discoverable, but it is
>> there in the "Message" menu.
>>
>> I don't believe there's currently any way to get a "preview" in
>> message-mode, of how your outgoing message will look to the recipient.
>>
>
> It seems that 'mml-preview' (C-c RET P) shows the highlighting.


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

* Re: cut here markers for code snippets in mail
  2021-08-26 18:23 cut here markers for code snippets in mail Andreas Reuleaux
  2021-08-26 21:41 ` Eric Abrahamsen
@ 2021-09-19 16:35 ` Wayne Harris via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  2021-09-20  7:20   ` Alexandre Duret-Lutz
  1 sibling, 1 reply; 7+ messages in thread
From: Wayne Harris via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English) @ 2021-09-19 16:35 UTC (permalink / raw)
  To: info-gnus-english

Andreas Reuleaux <rx@a-rx.info> writes:

[...]

> I have seen people highlighting code snippets in mail
> with "cut here markers": some ascii art for scissors, "cut here",
> "start", "end", ..., like so:
>
> rm -f /etc/fonts/conf.d/70-no-bitmaps.conf
> ln -f -s /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf  /etc/fonts/conf.d
>
>
> which is kind of nice, and simple (as I don't want to get into
> composing html mails with org-mime or the like).

By the way, notice how we end up with a double blank line.  That's how I
saw your message rendered on my screen too --- with Gnus v5.13.  This
was not the behavior in some older version.  (Perhaps one from 2013.)  I
would like to fix that.  Is everyone getting the same result?



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

* Re: cut here markers for code snippets in mail
  2021-09-19 16:35 ` Wayne Harris via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
@ 2021-09-20  7:20   ` Alexandre Duret-Lutz
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Duret-Lutz @ 2021-09-20  7:20 UTC (permalink / raw)
  To: info-gnus-english

Wayne Harris writes:
[...]
> By the way, notice how we end up with a double blank line.  That's how I
> saw your message rendered on my screen too --- with Gnus v5.13.  This
> was not the behavior in some older version.  (Perhaps one from 2013.)  I
> would like to fix that.  Is everyone getting the same result?

I see the same thing.  The original had two blank lines before the start
of the verbatim section, and two blank line after the end.  When
displayed I only see one blank line before, and two blank lines after.



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

end of thread, other threads:[~2021-09-20  8:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 18:23 cut here markers for code snippets in mail Andreas Reuleaux
2021-08-26 21:41 ` Eric Abrahamsen
2021-08-27  0:22   ` Andreas Reuleaux
2021-08-27  5:23   ` Enrico Schumann
2021-08-27 11:28     ` Andreas Reuleaux
2021-09-19 16:35 ` Wayne Harris via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
2021-09-20  7:20   ` Alexandre Duret-Lutz

Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/info-gnus-english

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 info-gnus-english info-gnus-english/ https://inbox.vuxu.org/info-gnus-english \
		info-gnus-english@inbox.vuxu.org
	public-inbox-index info-gnus-english

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.emacs.gnus.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git