From: "Adam Sjøgren" <asjo@koldfront.dk>
To: ding@gnus.org
Subject: Re: Email formatting in gnus
Date: Tue, 23 Jul 2019 16:54:10 +0200 [thread overview]
Message-ID: <87sgqwajjh.fsf@tullinup.koldfront.dk> (raw)
In-Reply-To: <875zntaxlw.fsf@josueunhuit.com>
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"
prev parent reply other threads:[~2019-07-23 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 9:50 Thomas Vauclair
2019-07-23 14:54 ` Adam Sjøgren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgqwajjh.fsf@tullinup.koldfront.dk \
--to=asjo@koldfront.dk \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).