In emacs when I scroll right and beginning of lines are truncated emacs inserts dollar sign same as it insert \ at the end of truncated line. I wish it would not insert these two signs. Can I disable this behavior?
Are you asking how to turn off such line truncation? If so, the answer is
You can also set variable
nil in any given buffer. And you can set its default, global value using
See the Emacs manual, node Line Truncation.
See also user option
You could discover this using command
apropos with keyword
If you instead are asking how to change the chars used,
\, or how to have no chars indicate that truncation is in effect, I think the answer is that you cannot - that's coded in C source code.
What you're referring to is described in the manual:
As an alternative to continuation (*note Continuation Lines::), Emacs can display long lines by “truncation”. This means that all the characters that do not fit in the width of the screen or window do not appear at all. On graphical displays, a small straight arrow in the fringe indicates truncation at either end of the line. On text terminals, this is indicated with ‘$’ signs in the rightmost and/or leftmost columns.
It turns out this can be customized through the use of variable
buffer-display-table whose docstring includes:
Display table that controls display of the contents of current buffer.
If this variable is nil, the value of ‘standard-display-table’ is used.
In addition, a char-table has six extra slots to control the display of:
the end of a truncated screen line (extra-slot 0, a single character);
the end of a continued line (extra-slot 1, a single character);
the escape character used to display character codes in octal (extra-slot 2, a single character);
See also the functions ‘display-table-slot’ and ‘set-display-table-slot’.
We follow the trail to the docstring of
(set-display-table-slot DISPLAY-TABLE SLOT VALUE)
Set the value of the extra slot in DISPLAY-TABLE named SLOT to VALUE. SLOT may be a number from 0 to 5 inclusive, or a name (symbol). Valid symbols are ‘truncation’, ‘wrap’, ‘escape’, ‘control’, ‘selective-display’, and ‘vertical-border’.
So finally... If you haven't defined
buffer-display-table you should set the
truncation slot of
standard-display-table to the wanted char, eg 32 for a space. To do so, you can add the following to your init file:
(set-display-table-slot standard-display-table 'truncation 32)