Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fill-paragraph) missing it wonderful behavior #1284

Open
walmes opened this issue Mar 5, 2024 · 0 comments
Open

(fill-paragraph) missing it wonderful behavior #1284

walmes opened this issue Mar 5, 2024 · 0 comments

Comments

@walmes
Copy link

walmes commented Mar 5, 2024

Hi everyone,

I like very much the behavior of (fill-paragraph) because it helps me keep one argument per line saving me lots of time breaking lines. I just must call (fill-paragraph) with the point before a comma to the magic happens. It cycles among these 3 states.

# State 1. Long line with code after fill-column.
c("one" = 1, "two" = 2, "three" = 3, "four" = 4, "five" = 5, "six" = 6, "seven" = 7, "eight" = 8, "nine" = 9, "ten" = 10)

# State 2. Break lines to keep the code inside fill-column.
c("one" = 1, "two" = 2, "three" = 3, "four" = 4, "five" = 5, "six" = 6,
  "seven" = 7, "eight" = 8, "nine" = 9, "ten" = 10)

# State 3. Break lines to have one line with comma at the end.
c(
    "one" = 1,
    "two" = 2,
    "three" = 3,
    "four" = 4,
    "five" = 5,
    "six" = 6,
    "seven" = 7,
    "eight" = 8,
    "nine" = 9,
    "ten" = 10
)

But this behavior is missing now. It still cycles among states. But the 2 state is returned without no proper indentation. The 3 state has only a break line after the first comma. I suspect that is something related to some regular expression applied.

# Wrong result of 3 state.
c("one" = 1,
 "two" = 2, "three" = 3, "four" = 4, "five" = 5, "six" = 6, "seven" = 7, "eight" = 8, "nine" = 9, "ten" = 10)

I'am using Doom-Emacs with ESS (https://github.com/walmes/doom-emacs/blob/master/config.el#L601). My version is

Archive: melpa
Version: 20240229.2054
Commit: cf237253049583a547bafc16edb9eb9a52e1ebf6

I inspect the code and I saw that (ess-r--fill-paragraph) is an advice to (fill-paragraph). #288 reports and infinite loop, but was before the advice. I think that this behavior was affected by 126d344 because new line indentation and (fill-paragraph) broke together.

I appreciate any direction or providence. My LISP programming is still in a basic level but any direction would be of great value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant