emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
620 stars 162 forks source link

Syntax highlighting for backticks for tibbles in command line #1086

Open markgdawson opened 3 years ago

markgdawson commented 3 years ago

Displaying a tibble in iESS mode with long column names which have backticks (e.g. due to spaces) can cause formatting issues due to the second backtick being hidden in the output.

tibble_highlight

lionel- commented 3 years ago

Do you think it'd be reasonable to preserve trailing backticks @krlmlr?

lionel- commented 3 years ago

Can you please open an issue in tibble's repo to see if the above suggestion would be reasonable @markgdawson?

krlmlr commented 3 years ago

tibble/pillar already apply color and highlighting to column headers and data, why does ESS need to format the output again? Is there a way to ask ESS to pass the output unchanged?

lionel- commented 3 years ago

There is no way to do that. But even if there were, the unmatched backticks would still cause trouble for Emacs generic parser and the features that depend on it like delimiter-based navigation, which interferes with typing R code in the REPL window. Also for me the unmatched backticks look weird to my human eyes but that may just be me.

lionel- commented 3 years ago

Relevant thread about the same problem in python-mode: https://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00378.html