all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Jim Porter <jporterbugs@gmail.com>
Cc: Philip Kaludercic <philipk@posteo.net>, 69647@debbugs.gnu.org
Subject: bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation
Date: Fri, 8 Mar 2024 21:02:26 +0000	[thread overview]
Message-ID: <CALDnm50gADLH=0CBoiUntig81QBOqoY58B=R4RPyJy2SE9SwPA@mail.gmail.com> (raw)
In-Reply-To: <ff5887ca-15e5-0136-8ffe-d56afc32106a@gmail.com>

On Fri, Mar 8, 2024 at 8:54 PM Jim Porter <jporterbugs@gmail.com> wrote:
>
> On 3/8/2024 7:48 AM, Philip Kaludercic wrote:
> > Tags: patch
> >
> > LSP servers like clangd generate trailing whitespace, that when rendered
> > as markdown causes parts of the buffer to be underlined.  Unless there
> > is a reason for this, I'd suggest helping out by deleting trailing
> > whitespace before continuing to process the documentation.
>
> In Markdown, two trailing spaces at the end of a line means "insert a
> line break here". I'm not sure we should remove that; instead,

That's precisely what I was fearing in the other thread.

> markdown-mode should handle this as appropriate in its view modes when
> 'markdown-hide-markup-in-view-modes' is non-nil (the default).

And that's probably the ideal solution too.  But as far as I remember,
markdown-view-mode (or whatever it's called) is not used for viewing the
documentation.  it is used somewhere in the pipeline to render the text in a
buffer which is then yanked using `buffer-substring` (with properties).

So I don't know how that'd work.  Maybe Philip's patch can be tweaked to leave
those specific bits of trailing whitespace alone?  And do we really want to
preserve the LSP server's notion of a line break anyway?  It has no
concept of how wide
the  Emacs window is.  I'd say paragraphs yes, line breaks no.  But
I'm probably
mistaken there too,





  reply	other threads:[~2024-03-08 21:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 15:48 bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation Philip Kaludercic
2024-03-08 20:41 ` João Távora
2024-03-08 20:54 ` Jim Porter
2024-03-08 21:02   ` João Távora [this message]
2024-03-08 21:36     ` Jim Porter
2024-03-09  3:08       ` Jim Porter
2024-03-09  9:02         ` Philip Kaludercic
2024-03-09 18:28           ` Jim Porter
2024-03-09 18:46             ` Philip Kaludercic
2024-03-11  3:50             ` Jim Porter
2024-03-22  8:49               ` Philip Kaludercic

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='CALDnm50gADLH=0CBoiUntig81QBOqoY58B=R4RPyJy2SE9SwPA@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=69647@debbugs.gnu.org \
    --cc=jporterbugs@gmail.com \
    --cc=philipk@posteo.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.