public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Joost Kremers <joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: In-paragraph code between backticks and spaces
Date: Mon, 14 Oct 2013 16:59:36 +0200	[thread overview]
Message-ID: <87bo2rj3tz.fsf@fastmail.fm> (raw)
In-Reply-To: <20131014142109.GA9935-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>

On Mon, Oct 14 2013, fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> +++ Václav Zeman [Oct 14 13 16:08 ]:
>> Hi.
>> 
>> I am seeing extra spaces in output when the text between backticks
>> spans multiple lines. E.g., the following text is wrapped (by Emacs)
>> inside the backticks block:
>> 
>> - To configure Digest authentication, use the following lines. Put
>>   them below other `auth_param` blocks but before `acl password
>>   proxy_auth REQUIRED`.
>> 
>> The result (DOCX and HTML at least) then contains three spaces between
>> "password" and "proxy_auth". Is there a way to let Pandoc contract 3
>> spaces into one?
>
> No, nor would this be desirable.  It's important to preserve the ability
> to put multiple consecutive spaces in a code span.
>
> IN your example, the spaces are clearly indentation.  But since markdown
> doesn't require the list content to be indented, it's hard for the
> program to tell.
>
> Best approach would be to set up emacs so that it doesn't break code
> spans when wrapping.  (Maybe something for pandoc-mode if it doesn't
> already work this way?)

It doesn't, and since this is something that's particular to Markdown
(at least, the `code` markup is), I would argue markdown-mode would be a
better place for it.

However, I'm sceptical that it'll be possible to configure Emacs to
behave this way. I've never heard or seen anything that would make it
possible to disable auto-fill in stretches of text. I believe the OP has
three (four) options:

- use no-break spaces (U+00A0) in code spans (not practical, most
  likely).
- check out the adaptive filling section in the Emacs manual and see if
  any of the options discussed there help.
- use longlines-mode, which soft-wraps lines longer than the value
  specified by `fill-column'.
- use visual-line-mode, which soft-wraps at window edges.

visual-line-mode is set to replace longlines-mode, which AFAIK has been
deprecated in the development version of Emacs. In order to get the same
visual effect that adaptive-fill-mode produces with auto-fill-mode,
visual-line-mode can be combined with adaptive-wrap-mode, which,
however, is an external package (can be installed through Melpa,
though). If you have a wide Emacs window (frame), the automargin package
might be useful (also Melpa).

I personally use the fourth option and have to complaints.

HTH


-- 
Joost Kremers
Life has its moments

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87bo2rj3tz.fsf%40fastmail.fm.
For more options, visit https://groups.google.com/groups/opt_out.


      parent reply	other threads:[~2013-10-14 14:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14 14:08 Václav Zeman
     [not found] ` <CAKw7uVgJABVunxbkUKMZf0z=n8z41TsuEbKGohuNNkHdLS8kmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-14 14:21   ` John MacFarlane
     [not found]     ` <20131014142109.GA9935-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2013-10-14 14:42       ` Václav Zeman
2013-10-14 14:59       ` Joost Kremers [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=87bo2rj3tz.fsf@fastmail.fm \
    --to=joostkremers-97jfqw80gc6171pxa8y+qa@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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).