unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] doc: Disable SmartyPants in generated manual pages
@ 2017-08-14  6:36 Vladimir Panteleev
  2017-08-19 18:04 ` Tomi Ollila
  2017-08-20 12:11 ` David Bremner
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Panteleev @ 2017-08-14  6:36 UTC (permalink / raw)
  To: notmuch; +Cc: Vladimir Panteleev

By default, Sphinx tries to pre-process text through SmartyPants,
which attempts to convert ASCII quotes and dashes to Unicode
characters. Unfortunately, this mangles technical text such as command
lines. For instance, this excerpt from notmuch-tag.rst:

  **notmuch** **tag** **--batch** [--input=<*filename*>]

got turned into:

  notmuch tag –batch [–input=<filename>]

That's an en-dash and an em-dash respectively.

Not only are these characters visually confusing and could easily be
mistaken for a single dash, copying and pasting such command lines
into a terminal is doomed to result in incomprehensible error
messages.

* doc/conf.py: Disable SmartyPants.
---
 doc/conf.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/conf.py b/doc/conf.py
index aa864b3c..0e65413d 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -47,6 +47,10 @@ html_static_path = []
 # Output file base name for HTML help builder.
 htmlhelp_basename = 'notmuchdoc'
 
+# Disable SmartyPants, as it mangles command lines.
+# Despite the name, this actually affects manual pages as well.
+html_use_smartypants = False
+
 # -- Options for manual page output ---------------------------------------
 
 # One entry per manual page. List of tuples
-- 
2.13.3

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

* Re: [PATCH] doc: Disable SmartyPants in generated manual pages
  2017-08-14  6:36 [PATCH] doc: Disable SmartyPants in generated manual pages Vladimir Panteleev
@ 2017-08-19 18:04 ` Tomi Ollila
  2017-08-20 12:11 ` David Bremner
  1 sibling, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2017-08-19 18:04 UTC (permalink / raw)
  To: Vladimir Panteleev, notmuch

On Mon, Aug 14 2017, Vladimir Panteleev wrote:

> By default, Sphinx tries to pre-process text through SmartyPants,
> which attempts to convert ASCII quotes and dashes to Unicode
> characters. Unfortunately, this mangles technical text such as command
> lines. For instance, this excerpt from notmuch-tag.rst:
>
>   **notmuch** **tag** **--batch** [--input=<*filename*>]
>
> got turned into:
>
>   notmuch tag –batch [–input=<filename>]
>
> That's an en-dash and an em-dash respectively.
>
> Not only are these characters visually confusing and could easily be
> mistaken for a single dash, copying and pasting such command lines
> into a terminal is doomed to result in incomprehensible error
> messages.

I agree. LGTM. works as advertised.

Tomi

>
> * doc/conf.py: Disable SmartyPants.
> ---
>  doc/conf.py | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/doc/conf.py b/doc/conf.py
> index aa864b3c..0e65413d 100644
> --- a/doc/conf.py
> +++ b/doc/conf.py
> @@ -47,6 +47,10 @@ html_static_path = []
>  # Output file base name for HTML help builder.
>  htmlhelp_basename = 'notmuchdoc'
>  
> +# Disable SmartyPants, as it mangles command lines.
> +# Despite the name, this actually affects manual pages as well.
> +html_use_smartypants = False
> +
>  # -- Options for manual page output ---------------------------------------
>  
>  # One entry per manual page. List of tuples
> -- 
> 2.13.3
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

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

* Re: [PATCH] doc: Disable SmartyPants in generated manual pages
  2017-08-14  6:36 [PATCH] doc: Disable SmartyPants in generated manual pages Vladimir Panteleev
  2017-08-19 18:04 ` Tomi Ollila
@ 2017-08-20 12:11 ` David Bremner
  1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2017-08-20 12:11 UTC (permalink / raw)
  To: Vladimir Panteleev, notmuch; +Cc: Vladimir Panteleev

Vladimir Panteleev <git@thecybershadow.net> writes:

> * doc/conf.py: Disable SmartyPants.

pushed.

d

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

end of thread, other threads:[~2017-08-20 12:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-14  6:36 [PATCH] doc: Disable SmartyPants in generated manual pages Vladimir Panteleev
2017-08-19 18:04 ` Tomi Ollila
2017-08-20 12:11 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).