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

Possible bug indenting arguments and if-conditions with prev-line? #1300

Open
pglpm opened this issue Aug 10, 2024 · 0 comments
Open

Possible bug indenting arguments and if-conditions with prev-line? #1300

pglpm opened this issue Aug 10, 2024 · 0 comments

Comments

@pglpm
Copy link

pglpm commented Aug 10, 2024

ess-version: [elpa: 20240803.1733]

GNU Emacs 29.4 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2024-07-28

The value of my custom-defined ess-own-style-list is as follows:

((ess-indent-offset . 4)
 (ess-offset-arguments . prev-line)
 (ess-offset-arguments-newline . prev-line)
 (ess-offset-block . prev-line)
 (ess-offset-continued . straight)
 (ess-align-continuations-in-calls . t)
 (ess-align-blocks)
 (ess-indent-from-lhs)
 (ess-indent-from-chain-start . t)
 (ess-indent-with-fancy-comments . t))

With this setup I would like to obtain a simple nested indentation of 4 spaces, without special vertical indentation of function arguments, if-else conditions, and similar.

The value above seems to produce exactly the indentation I wish for – except for function arguments and if-conditions containing binary operators. Here is an example of indentations I obtain:

a23456 <- function(a23456,
    a23456) {a23456,
    a23456
}

a23456 <- function(a23456 +
                   a23456) {a23456 +
                                a23456
}

I would expect the second to be indented similarly to the first.

After trying several changes in the various ess-own-style-list subarguments, to no avail, I wonder whether there might be a bug somewhere. Happy to receive advice!

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