clojure-emacs / clojure-emacs/clojure-mode

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

オープン
#613 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Emacs Lisp
スター
1k
フォーク
249
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
clojure, emacs-lisp
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。