Addendum added to respond to the answer and subsequent comments of db48x
A few months ago, I migrated from Fedora to Linux Mint 20 (Cinnamon), and then installed Emacs v26.3 in Mint. As shown in the Emacs screenshot below, this caused two display problems that were not present under Fedora. I request advice on attacking each of these problems.
The mode line is too short to fully display the information.
I tried :
Options - Customize Emacs - Top Level Customization Group -
Environment - Mode Line
.
However, I didn't see any option that would allow me to make the mode line taller.The leftmost digit of the line numbers are not visible.
After doing some research, I added the following line to my Emacs initialization, and then stopped and re-started Emacs:
(setq-default display-line-numbers-width 5)
It had no effect on the problem.
Addendum
Responding to the answer and subsequent comments of db48x.
...The easiest way to fix the problem is to choose a different font, since that designer will have made a different set of mistakes.
First of all, thanks to db48x for going the extra mile to spend time and attention on my problems. Personally, my research and resolutions (described below) suggest that the problem is not in the fonts themselves, but rather in the way that Emacs is interacting with Linux Mint (Cinnamon), as opposed to Fedora (Cinnamon).
In summary I have two problems:
The height of the mode line is too short.
The width of the line-number gutter is too narrow.
Both of these problems surfaced after switching from Fedora to Linux Mint. Long term, I construe these problems as in the middle ground between Emacs and Linux Mint. I can't really regard these problems as either an Emacs problem or a Linux Mint problem. So, it isn't really reasonable to ask either Linux Mint support or Emacs support to investigate the problems.
At the same time, while I did upvote the answer of db48x, I did not accept it. This is my way of signaling that I still suspect that there is a problem with the underlying interaction between Emacs and Linux Mint Cinnamon.
Research/experimenting:
On my Linux Mint Desktop, I have specified large text via
menu : accessibility : visual : visual aids : large text
.
I temporarily disabled this feature, and verified that both problems persisted. I then restored this feature, and researched/experimented further.describe-face
indicates thatMonospace Regular
is an alias forDejaVu Sans Mono
.Because of vision problems that I have, I use a default font size of (16).
Also, I have to preserve that font size, even when investigating.At random, I tried each of the following fonts. No joy with either of the two problems: [aaker medium], [Accanthis ADF STD Regular], [Free Mono Regular], [Free Sans Regular], [Meera Regular].
At random, I tried each of the following additional fonts. These two fonts both (seemed to) fixed the problem of the mode line height, but had no effect on the problem of the line-number gutter width: [Latin Modern Sans 17 Regular], [Tex Gyre Heros Regular].
Solutions:
I then solved the mode line height problem, without disturbing the default font, as follows:
I temporarily changed the default buffer to [Tex Gyre Heros Regular], size 16.
I then executeddescribe-face
and copied all of the information to a separate text editor.I then restored my default font to Monospace Regular.
I then executed:
Menu - Options - Customize Emacs - Top-Level Customization Group -
Environment - Mode Line - Subgroup: Mode Line Faces - Mode Line Face
Within this menu option, I pasted in all of the information that I had copied from the
describe-face
command.This altered the mode line font, without disturbing the default font. This alteration (inelegantly) solved the problem of the height of the mode line.
After doing some research on the line-number gutter width problem, I adopted the
(extremely inelegant) solution of
'(linum-format "%5d")
.
I have not (yet) ever needed to repeatedly deal with a file of greater than 9999 lines. I can live with the wasted space in the line number gutter, on shorter files.
Note
I also use emacs code folding.
I specifically rejected (for example) '(linum-format " %d")
because it created
confusing results in folded code.