Gnus development mailing list
 help / color / mirror / Atom feed
* Email formatting in gnus
@ 2019-07-23  9:50 Thomas Vauclair
  2019-07-23 14:54 ` Adam Sjøgren
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Vauclair @ 2019-07-23  9:50 UTC (permalink / raw)
  To: ding

Hello

In plain text emails, what is the mechanism in gnus that makes _italic_
be displayed in italic and *bold* in bold?
Is it a standard behavior shared by other mail clients or a gnus
specific one?
Is there a list of all the codes that can be used?

Cheers
Thomas




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

* Re: Email formatting in gnus
  2019-07-23  9:50 Email formatting in gnus Thomas Vauclair
@ 2019-07-23 14:54 ` Adam Sjøgren
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Sjøgren @ 2019-07-23 14:54 UTC (permalink / raw)
  To: ding

Thomas writes:

> In plain text emails, what is the mechanism in gnus that makes
> _italic_ be displayed in italic and *bold* in bold?

The mechanism is the "wash" called "emphasis".

 · Slashes are used to indicate /italics/
 · Underscores are used to _underline_
 · Asterisks are used to indicate *bold*

> Is it a standard behavior shared by other mail clients or a gnus
> specific one?

It's tradition in plain text formatting.

I think some other clients support it as well; Thunderbird at least
does:

 · https://koldfront.dk/pics/thunderbird-emphasis.png

> Is there a list of all the codes that can be used?

I couldn't find one in the manual doing a quick search.

The relevant defcustom is this one, however:

,----[ C-h v gnus-emphasis-alist RET ]
| gnus-emphasis-alist is a variable defined in ‘gnus-art.el’.
| Its value is
| (("\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(\\*\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)\\*\\)\\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)" 2 2 gnus-emphasis-bold)
|  ("\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(_\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)_\\)\\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)" 2 3 gnus-emphasis-underline)
|  ("\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(/\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)/\\)\\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)" 2 3 gnus-emphasis-italic)
|  ("\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(_/\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)/_\\)\\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)" 2 3 gnus-emphasis-underline-italic)
|  ("\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(_\\*\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)\\*_\\)\\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)" 2 3 gnus-emphasis-underline-bold)
|  ("\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(\\*/\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)/\\*\\)\\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)" 2 3 gnus-emphasis-bold-italic)
|  ("\\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(_\\*/\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)/\\*_\\)\\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)" 2 3 gnus-emphasis-underline-bold-italic)
|  ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" 2 3 gnus-emphasis-underline))
| 
| Documentation:
| Alist that says how to fontify certain phrases.
| Each item looks like this:
| 
|   ("_\\(\\w+\\)_" 0 1 'underline)
| 
| The first element is a regular expression to be matched.  The second
| is a number that says what regular expression grouping used to find
| the entire emphasized word.  The third is a number that says what
| regexp grouping should be displayed and highlighted.  The fourth
| is the face used for highlighting.
| 
| You can customize this variable.
`----


  Hope this helps,

    Adam

-- 
 "Nånting börjar nåt tar slut                                 Adam Sjøgren
  I mitt liv står det still                              asjo@koldfront.dk
  Hur jag än springer"




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

end of thread, other threads:[~2019-07-23 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23  9:50 Email formatting in gnus Thomas Vauclair
2019-07-23 14:54 ` Adam Sjøgren

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