2

I'm attempting to write a rule for align-current for Robot Framework tests. Columns are delimited by multiple spaces in a row (I know, what an awful choice) and each row can have a varying number of columns (essentially each column is a function argument). Can this be implemented with align-current?

Here's some example input:

Log  fooooooooooooooooooooooooooo 123 456
Log differently  something else  bazzzzzz

Desired output:

Log                fooooooooooooooooooooooooooo 123 456
Log differently    something else                          bazzzzzz

What I have at the moment is:

(add-to-list 'align-rules-list '(robot-mode-align-test-data
                                 (regexp  . "\\(  +\\)")
                                 (modes   . '(robot-mode))
                                 (repeat  . t)
                                 (spacing . 4))

which works except for the final column on the second line in the example above.

I've tried including \n in the align regex, but I think emacs ends up in an infinite loop (until it hits line length 256 when presumably it gives up).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.