clojure-emacs / clojure-emacs/clojure-mode

clojure-fill-paragraph won't break lines at the space in `word :word`

Offen
#613 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Emacs Lisp
Sterne
1k
Forks
249
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I noticed a, to me, weird behavior of `clojure-fill-paragraph`. I was listing keyword arguments in a docstrsing, and when I tried to fill it I ended up with something similar to the screenshot below. I tracked it down to the extra stuff that it is adding to `paragraph-start`, i.e. this code:
```
(let ((paragraph-start
(concat paragraph-start
"\\|\\s-*\\([(:\"[]\\|~@\\|`(\\|#'(\\)"))
```
I don't understand why the regexp is like that, but I don't like the current result.

## Expected behavior

`clojure-fill-paragraph` can break lines at the space in `word :word`.

## Actual behavior

![image](https://user-images.githubusercontent.com/861064/161857445-655eab40-0c11-43b6-b177-cc70b37c00cc.png)

## Steps to reproduce the problem

Try to fill the docstring in
```
(defn some-function
"word word word word word word word word word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word :word word word word word word word word word word word word word word word word word word word word word word word word"
[])
```
## Environment & Version information

### clojure-mode version 5.13

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Search for the clojure-fill-paragraph entry point and the paragraph-start customization shown in the issue. Reproduce the documented Clojure function example, then verify that filling can break at the space in `word :word` without regressing the other listed delimiters.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
clojure, emacs-lisp
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.