Questions tagged [display]

is for Emacs display features, which includes scrolling, fonts, colors, and placement of text or images.

Filter by
Sorted by
Tagged with
82
votes
7answers
26k views

How can I get a ruler at column 80?

As a programmer, I want to see a ruler at a specific column (usually 80), both so I see when I cross that column, but also to see how close I am getting to it so I can reformat my code early. The ...
46
votes
2answers
6k views

OTF ligature support in Emacs

PragmataPro is a typeface that comes with a number of programming ligatures. My understanding is that these are OpenType face (OTF) ligatures. I am aware that Emacs supports programmatic replacement ...
16
votes
2answers
1k views

How do I set up font fallback in a robust way?

TL;DR: What's a simple way to reliably say: use Consolas as the default font, FreeMono for the characters unsupported by Consolas, and Symbola for characters unsupported by both? Since my main ...
14
votes
2answers
1k views

How can I split paragraph into one-line-per-sentence but still keep it wrapped visually?

This is similar to Editing files with one-sentence-per-line (in function as well as motive), but I wish to have a full, flowing paragraph rather than visual breaks at every sentence. I would like to ...
12
votes
1answer
684 views

Align columns in Org mode table with Japanese fonts

How can I mix Japanese and English in the same org-mode table (that uses fixed-width fonts)? Something like: | m m m m m m | | | はどう デシウ | | | ハーフ | ハーフ | won't align. ...
11
votes
2answers
615 views

How can I suppress emacs' display of the final newline in a file?

One of vim's quirks is that it doesn't show an empty line at the end of a file if the file ends with the newline character. This way, if the file doesn't end with a newline, the display is the same, ...
10
votes
2answers
658 views

Hide long GPL copyright notice at top of file

I am working with a lot of *cpp and *h files which contain a lengthy copyright notice at the beginning. I would like emacs to show these files as if this was not there, without actually removing the ...
8
votes
4answers
1k views

Show math formula in emacs when coding

Is it possible that emacs shows real formulas in the editor if they are written in Latex or similiar? I am asking because it would be much more readable if you are coding (in lets say python or C++) ...
7
votes
4answers
1k views

Showing bytes as hexadecimal escapes rather than octal escapes

Short version: Can I make Emacs show \ff or \xff instead of \377? Long version: Suppose you open a file that is not entirely text and has some binary data (say a PostScript or PDF file). For example, ...
7
votes
3answers
940 views

Distinguish between blank lines at end of buffer and bottom of window?

Q: how can I get a visual indicator distinguishing between the end of the buffer and the bottom of the window? Use case: I've got a buffer with some blank lines at the bottom. However, the bottom of ...
7
votes
1answer
6k views

installing emacs: which x-toolkit?

I am installing Emacs 24.5.0, and I want to install it with X. I am on Fedora. the configuration script cannot find any x-toolkit. How do I find out which one is good for me, and in which folder do I ...
7
votes
1answer
706 views

How to set up Emacs to never split windows?

I want to try a new workflow where split windows only happen if I request them, otherwise Emacs simply changes windows. I tried putting this command in my init.el: (setq pop-up-windows nil) And it ...
7
votes
2answers
1k views

Indent with 4 spaces, but display 2

At work, we have a policy which states that we have to use 4 spaces for indentation, and in my opinion it makes the code harder to read. Is it possible to indent with 4 spaces, but display it as 2 ...
6
votes
2answers
270 views

How to display whole words as a different symbol?

In this video (time-linked, only a few seconds) the word function is displayed as f, but can still be edited so the underlying text remains as-is. How can this be done in emacs? (using plugins or ...
6
votes
1answer
496 views

Org mode: is it possible to display ONLINE images?

Assuming I want to have an org buffer in which I can preview images from url which I don't want to store on my hard drive - is there a possibility to use a solution similar to org links and display ...
6
votes
2answers
305 views

How to set the glyph of a unicode character?

I would like to set the glyph of a certain unicode character. Specifically, I would like the glyph § (SECTION SIGN) to represent the unicode character U+202A (LEFT-TO-RIGHT EMBEDDING), a normally non-...
6
votes
1answer
162 views

How can I prevent large characters from breaking alignment?

How can I ask Emacs to scale or truncate wide characters (resp. pad narrow characters), so that falling back to a variable-width font does not cause alignment to be broken? I'm thinking of cases like ...
6
votes
1answer
511 views

Determine whether a frame is shown on primary display

I have a multi-monitor setup, in which a specific monitor has a dedicated Emacs frame in full screen which shows compiler errors (from Compilation Mode or SBT Mode). I'd like to preserve the setup ...
6
votes
1answer
46 views

Find the last selected frame on a given display

I want to know which frame on a given X11 display was most recently selected. In fact, I want to know which frame that is mapped on the current desktop was most recently selected. I can tell what ...
5
votes
1answer
119 views

Increasing the frequency of modeline redisplay

Q: Is there a way to (temporarily) increase the rate at which the mode line is redisplayed? I was trying to write a package that adds a spinner to the mode line (to indicate ongoing operations), but ...
5
votes
0answers
76 views

How to replace a character display only for the `italic` face?

I am using a font that does not include italic characters. However, it does include characters like mathematical italic small a, which I would like to use instead. I can set up a display-table that ...
4
votes
2answers
112 views

What's the best API to use to interrogate the size of the underlying window system?

I'm currently working on using the crouton xiwi X windows target to run an Emacs session on a Chromebook. I've done this by starting Emacs as the last entry in .xinitrc making it effectively the ...
4
votes
2answers
465 views

Change fill-column-indicator rule color immediately

How can I change the color of the fill-column-indicator and have the changes visible immediately? (defun my:change-fci-color (color) (setq fci-rule-color color) (fci-redraw-frame)) The previous ...
4
votes
1answer
3k views

your emacs does not come with xwidget support… (Windows 10)

Just unzipped and started using Emacs 25.1, hoping to get a browser running in emacs. The instructions I found had me enter "M-x xwidget-webkit-browse-url" And then I'm asked to complete a command ...
4
votes
2answers
238 views

How can I find non-displayable unicode characters in a buffer?

I mean these: I'd like to remove them, so I'm looking for a function which can find all these characters in the buffer which cannot be displayed properly with the current font and therefore show up ...
4
votes
2answers
82 views

Prevent TTY fallback when X fails

I frequently forget to start my X server before I fire up emacs. Obviously emacs will attempt to open an X window and fail. In older versions of emacs (I forget when this changed) the behavior was ...
4
votes
1answer
87 views

Width of string as if it were displayed

From the documentation of string-width string: This function returns the width in columns of the string string, if it were displayed in the current buffer and the selected window. For me this ...
4
votes
1answer
185 views

Everytime I open emacs with -nw my file is prepended with 0;276;0c. My screen realestate is also being cut in half

How can I reset the default behavior of no prepending (but still being able to use -nw) and not having the bottom half of my terminal be black space. Having emacs test.py -nw -Q doesn't solve the ...
4
votes
1answer
2k views

How to force the current line to be always in the middle of the screen

I am editing a large file. I would like the current line where the cursor is at to be always in the middle of the screen. Is this possible?
4
votes
1answer
120 views

Certain symbols resulting in really tall line (and cursor)

This one is honestly a bit of a mystery for me. The strange behavior is caused by the lambda symbol: the line goes to normal height if I remove the lambda. How can I get Emacs to display such ...
3
votes
1answer
699 views

Emacs doesn't display JPEG files correctly

PNG images displays well on my computer, but the JPEG images are displayed incorrectly as small boxes as shown in the following image: I'm running Emacs 24.4 under Windows 7. And I compiled libpng16....
3
votes
1answer
434 views

Display max line in bottom line (nox) (aka mode-line)

How can I display the max line of a file in the bar at the bottom? So, how could it say "L1/L1300" instead of just "Top L1", if the respective happens to have 1300 lines?
3
votes
1answer
245 views

How to change line-number gutter width using display-line-numbers mode?

I am using (global-display-line-numbers-mode 1) in my init.el file and everything is working as expected. The only problem is that I find the gutter width to be too wide and would prefer it to match ...
3
votes
1answer
2k views

Getting the full list of colors available in Emacs

When I run list-colors-display I get the following: which I think is a very small subset of colors that my Emacs supports, isn't it? For example, I know Emacs supports other colors (gray20, blue15, ...
3
votes
1answer
747 views

Pop-up documentation with pos-tip or popup?

Is there a package to get a popup of the documentation for the thing at the point? Here's an example that flycheck uses.
3
votes
1answer
370 views

prettify-symbols-mode and multi-character replacements?

With prettify-symbols-mode it is possible to replace strings by a character, or a character composition, e.g. ;; \lambda → λ (push '("\\lambda" . ?λ) prettify-symbols-alist) Optionally, it allows ...
3
votes
1answer
411 views

Prevent Emacs from resizing windows

After building a two column, 3 window layout with one tall column and two stacked equal sized shorter columns next to it, when I run commands like magit or ag that bring up a new buffer, often one of ...
3
votes
3answers
583 views

Increase line-spacing on top

line-spacing adds space at the bottom. Here is what I mean - Image link. The docs say that the space is added below lines of graphic displays. I want the space to be added at the top. How do I do that?...
3
votes
2answers
528 views

Truncate only certain lines and use continuation lines elsewhere?

Q: how can I use truncate-lines in only part of a buffer? As a general rule, I prefer continuation lines to truncating lines. However, it would be nice to truncate only certain kinds of lines in a ...
3
votes
0answers
135 views

Adding Purpose to Layout Of Emacs

The rigidity to which emacs adheres to its layout is annoying at times. How can i get a layout like this when I shift to the particular modes? +------------------+-----------+ | | ...
3
votes
1answer
311 views

How can I eliminate the side effect of left margin?

I've set a left margin like this: (set-window-margins (get-buffer-window) 20 0) (let ((gutter-sep (concat (make-string (- (car (window-margins (get-buffer-window))) 2) ? ) "+"))) (propertize "." '...
3
votes
0answers
182 views

Emacs not displaying some Devanagari characters correctly

I am using Emacs for OSX 24.4 on El Capitan. I am writing a text in Devanagari in LaTeX mode, which I compile using the XeTeX engine. I have changed the font set for Devanagari to Sanskrit 2003 in ...
3
votes
0answers
104 views

How would one fake kerning adjustments in propertized text?

I've successfully managed adjusting the displayed size of spaces and raising/lowering propertized text by making use of the display property, however I cannot find anything that would allow me to fake ...
2
votes
1answer
1k views

How do I reduce spacing between lines to less than zero?

Using the Emacs GUI, I get a certain amount of spacing between each line of text. By default this spacing seems to be zero, but can be increased by customizing line spacing. This is the default of ...
2
votes
3answers
659 views

Hide mouse pointer while typing

Some programs, like many terminal emulators and gVim, hide the mouse pointer as soon as the keyboard is in use. Obviously, this is helpful when the mouse pointer happens to obscure some text behind it....
2
votes
2answers
849 views

Disable color highlighting

Background: I use gnus under emacs -nw (so this question is about text-based usage, not the GUI). Depending on the value of the $TERM environment variable, gnus will, for example, highlight quoted ...
2
votes
1answer
530 views

how to modify the active region highlighting color

Gray text highlighting no longer works on my Debian/stretch system. While this is particularly annoying in Emacs, it's not a specific Emacs problem; gray background is also gone from other ...
2
votes
2answers
61 views

Move point inside of image overlay

I'm trying to create a realtime/WYSIWYG editor for LaTeX fragments -- the general idea is that at each move of point / edit of the fragment, the overlay should update to reflect the newly changed ...
2
votes
2answers
490 views

Detect/specify the monitor a frame is on?

Q: how do I detect/specify the monitor a frame is on? I'm working off of a laptop that has an external monitor connected to it. I therefore have two monitors (call them INTERNAL and EXTERNAL). On ...
2
votes
1answer
66 views

Fastest way to draw pixels in Emacs

I'm currently working on a CHIP-8 emulator. This platform requires me to draw 64x32 black/white pixels, ideally at a speed between 30 and 60 frames per second. There's an extension to it that ...