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

Dieses Issue hat noch niemand übernommen.

Bewertung

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

Rechercherichtung

Suche nach dem Einstiegspunkt clojure-fill-paragraph und der im Issue gezeigten Anpassung von paragraph-start. Reproduziere das dokumentierte Beispiel einer Clojure-Funktion und überprüfe anschließend, dass das Füllen am Leerzeichen in word :word umbrechen kann, ohne dass die anderen aufgeführten Trennzeichen beeinträchtigt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

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

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
Vorherrschende Sprache
Emacs Lisp
Sterne
1k
Forks
249
Ø Merge
1 T. 6 Std.
Gemergte PRs (30 T.)
6

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus clojure-emacs/clojure-mode

Alle Issues in clojure-emacs/clojure-mode

Ähnliche Issues

Weitere Issues zu DevTools

Neue Issues direkt in Ihr Postfach

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