19

I've noticed a few screenshots of terminal windows online which show thin highlighted edges around status bars or highlighted lines. In the following example, note the light grey edging around lines 1, 5, and 389:

enter image description here

In this example, notice the yellow edging around the Emacs mode line (status bar):

enter image description here

What is the name of this effect, and is it possible with iTerm 2 under OS X 10.10?

Update

After doing some research and digging into Emacs Customize interface theme code, I found some code that defined the edges. In Emacs parlance, it's called :box, and one of its attributes is line-width. Here's an example of a box line being defined in a theme:

'(modeline ((t (:background "Gray10" :foreground "SteelBlue" :box (:line-width 1 :style none) :width condensed))))

The documentation for :box can be found in the Emacs manual's face attributes documentation, though it doesn't mention how it works, or which terminals are supported.

I started to think that this might be a special feature of GUI versions of Emacs (such as Aquamacs, but I am pretty sure that I have seen screenshots of what appear to be Ubuntu Unity terminal windows with similar box highlights.

1
  • those screenshots are emacs running in X, not in a terminal.
    – casey
    Aug 13, 2015 at 18:18

2 Answers 2

3

The effect you are seeing isn't a terminal window graphical trick, it is gui emacs running in X. You correctly identify the customization to get emacs to draw that, but these are only rendered when emacs is run in X.

To illustrate, I have my mode-line themed with:

 '(mode-line ((t (:background "gray10" :foreground "green" :box (:line-width -1 :style released-button)))))

and when emacs is run graphically (e.g. emacs) it is rendered like:

enter image description here

and when emacs is run in a terminal (e.g. emacs -nw) it is rendered as:

enter image description here

You can see the pixel border effects that give the raised look defined by the box only render in the gui mode. In terminal mode it is just a flat effect.

Similarly, the pictures you have posted are from gui emacs and the effect is not a property of any terminal emulator, nor is any terminal emulator involved in that rendering.

2
  • 1
    Yes, i also suspected the screenshots to be from the GUI-Version. I recently modified my answer to include lists of available character renditions available to Terminal Emulators. And those did not include what the OP asked for. Aug 13, 2015 at 18:41
  • To me, it looks as if the "released-button"-style box only puts a line on the top edge, whereas in the OP's screenshot(s), the line appears on all sides of the mode line. Have I misunderstood the question?
    – Stan
    Jun 8, 2018 at 19:59
3

The way I understand this Wikipedia Page (though I would very much like to be proven wrong on this specific issue):

  • Style Underline exists, not limited to cursor. They call it code 4.
  • Style Framed exists, as in 4 borders around each character, they call it code 51.

Note: That does not enable framing a string of characters without borders between the character. like Lisa in the first screenshot.

So, my answer (as of Mid-2015) stays:

(Current) Terminal Emulators cannot show optional-per-side, colored borders around characters in the way you want.

Here you can see, what the ANSI-Codes look like applied.

Gui Applications like gvim and xemacs, not based on a Terminal Emulator, are not bound to the limitations of current Terminal Emulators. I think, the screenshots are from GUI applications.

Again, I would like to be proven wrong on this, since I would happily incorporate such formatting into my own dotfile customizations.

1
  • 1
    note that xemacs is a fork of emacs (it is not "emacs in X") and regular emacs can run graphically in X.
    – casey
    Aug 13, 2015 at 18:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .