When using ESS under emacs for writing R code, is useful to have the default behavior os having '_' substituted by '<-' (inserting two consecutive '_' would insert the underscore itself). But when pasting code to any buffer in ESS-mode, this substituion also happens and any '_' gets substituted by '<-' and this is not a desired behavior by me.
Is there a way of preventing the substitution only when pasting text?
At the moment I have fully disabled the substitution adding this code to my .emacs
(ess-toggle-underscore nil)
But I would like to recover the '_' to '<-' substitution only when writing not when pasting.
Any idea?
Now if we want to underline a word, we abandon the underscore key completely and click on the underline button in the menu bar. Rumor has it that some word processing programs (none that I can seem to find) can automatically convert a word into an underlined word if formatted with an underscore before and after the word, like this: _underscore_
In fact, it’s only a two-step process that can happen in less than a second (if you’re skilled at typing): Hold down the SHIFT key Press the hyphen/underscore key located to the right of the zero key on the number line of your keyboard That’s it—you now have an underscore!
However, if you still have old files on file, chances are there are underscores within the name. Just as the underscore was used back in the typewriter days to create an outline, the modern keyboard lets you create a fill-in-the-blank spot within a document by holding down the underscore key a few times without interruption.
The underscore is one of the few punctuation marks with many names. Sometimes it’s called the understrike, the underbar, the underdash, the low dash, the low line. And way back in the day, it was called the underline. Whatever you want to call it, the underscore looks like a dash that lives below the letters, like this:
This should not happen. Please report a bug with more details to ess-help or with M-x ess-submit-bug-report
. You are pasting in a terminal session right?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With