P
pglpm
[ESS version: 20240803.1733, Emacs version: 29.4]
I would like to indent R code without alignment to open brackets of any kind (no matter whether they are associated with functions, if-statements, and similar). In other words, I'd like to indent simply by increasing the indentation by 4 spaces with respect to the previous indentation.
As an example, instead of
I'd like to have
In order to achieve this I've set
trying to understand the description of the individual variables and reading answers to related questions such as this. Yet the first, parenthesis-aligned form of indentation persists – note that I've re-opened the buffer, restarded Emacs, and also called
Which of my customized settings above is wrong? Or is there some kind of bug?
(It should be noted that ESS changed many internal variable names in recent years, so many similar questions & answers on StackExchange are somewhat outdated.)
Cheers!
I would like to indent R code without alignment to open brackets of any kind (no matter whether they are associated with functions, if-statements, and similar). In other words, I'd like to indent simply by increasing the indentation by 4 spaces with respect to the previous indentation.
As an example, instead of
Code:
} else if (a >= 1 &&
b <= 2) {
I'd like to have
Code:
} else if (a >= 1 &&
b <= 2) {
In order to achieve this I've set
ess-style
to 'OWN
and customized ess-own-style-list
to the following (as seen in the customization buffer):
Code:
Alist:
INS DEL Key: ess-indent-offset
Value: 4
INS DEL Key: ess-offset-arguments
Value: prev-line
INS DEL Key: ess-offset-arguments-newline
Value: prev-line
INS DEL Key: ess-offset-block
Value: prev-line
INS DEL Key: ess-offset-continued
Value: straight
INS DEL Key: ess-align-continuations-in-calls
Value: t
INS DEL Key: ess-align-blocks
Value: nil
INS DEL Key: ess-indent-from-lhs
Value: nil
INS DEL Key: ess-indent-from-chain-start
Value: t
INS DEL Key: ess-indent-with-fancy-comments
Value: t
trying to understand the description of the individual variables and reading answers to related questions such as this. Yet the first, parenthesis-aligned form of indentation persists – note that I've re-opened the buffer, restarded Emacs, and also called
(ess-set-style 'OWN)
, but to no avail.Which of my customized settings above is wrong? Or is there some kind of bug?
(It should be noted that ESS changed many internal variable names in recent years, so many similar questions & answers on StackExchange are somewhat outdated.)
Cheers!