severity 36219 minor tags 36219 + patch quit writes: > Since commit a90d5e6309c0306d931d398506b242c3eb4f40d7 which fixes bug #23159 > the `--eval' command line option signals (error "Trailing garbage following > expression: %s") on more than one expression recevied. > This causes some old shell script snippets which has trailing newline for > formatting no longer works, such as the follow script from > https://orgmode.org/manual/Batch-Execution.html#Batch-Execution > Since `eval-expression' accepts additional white space and newlines after a > single expression, this mismatch behavior of `--eval' should be considered as a > bug. > > My proposed fix is apply `string-trim-right` to received string of expression. > I think I'd prefer checking the trailing garbage for whitespace, which is what eval-expression does. See following patch: