Hide / modify Emacs fringed bent arrows due to word wrapping?

I would like to change (or completely hide) the bent arrow symbol that appears at the edge of Emacs (both left and right). I am using Emacs 24 on a Mac, installed via homebrew. I find it visually distracting. A smaller symbol like a center point might work well.

For context, this is the official description of the little bent arrows (from http://www.gnu.org/software/emacs/manual/html_node/emacs/Continuation-Lines.html ):

Sometimes a line of text in a buffer — a logical line — is too long to fit into a window, and Emacs displays it as two or more lines of screen. This is called a line break or continuation, and a long logical line is called a continuous line. On a graphics display, Emacs indicates line breaks with small curved arrows in the left and right windows. On a text terminal, Emacs indicates a line break by displaying a "\" in the right margin.

The Emacs LineWrap Wiki page does not address my question.

The best information I've found so far is contained in qaru.site/questions/2176526 / ... :

When word-wrap is set to nil in an Emacs text terminal (-nw), the backslash character appears in the right margin.

When word-wrap is set to t in an Emacs text terminal, the backslash character is not displayed. Setting the visual linear mode also sets word wrap to true.

This does not apply when Emacs is running as a GUI window: a small curved arrow appears in the right margin regardless of the meaning of the wrapper word.

Hides or changes bent arrows? If not, then an answer that more or less says, "I looked at X and came to the conclusion that it is impossible" is also good.

Update: While not a terrible job, changing fringes is not what I'm looking for: I want to customize the bent arrow symbol or bitmap.

+3


source to share


1 answer


First, some quick context. From Emacs Fringe Bitmaps : "Fringe indicators are small icons displayed in a window window to indicate truncated or extended lines, buffer boundaries, and so on."

You cannot replace curly arrows with free text. According to lunaryorn, the answer to the question, "Can you replace bitmaps with text in Emacs?" :

No, it is not. Bitmap slices are truly bitmaps, that is, 0/1 bit vectors superimposed on top of the fringe. There is no way to directly render arbitrary unicode characters on fringe. [...] What you can do is make the unicode character into a 0/1 bitmap.

That being said, you can change the bitmap. Fringe Bitmaps contains a list of fringe bitmaps; left-curly-arrow

and right-curly-arrow

are relevant to this question.



Here's what I drew. Tune to your liking. Put this in your Emacs init file.

(define-fringe-bitmap 'right-curly-arrow
  [#b00000000
   #b00000000
   #b00000000
   #b00000000
   #b01110000
   #b00010000
   #b00010000
   #b00000000])
(define-fringe-bitmap 'left-curly-arrow
  [#b00000000
   #b00001000
   #b00001000
   #b00001110
   #b00000000
   #b00000000
   #b00000000
   #b00000000])

      

Additional documentation is available in Setting up bitmaps , including set-fringe-bitmap-face

which "sets the edge for the fringe. If face is zero, selects the face of the face. The face of the bitmap controls the color to draw in."

+5


source







All Articles