reddit / emacs

Tables look different in org-mode on Emacs 28 / M1

[deleted] · 2022-04-07 17:16
[deleted]
amiralul · 2022-04-07 17:17
The table in the above image was properly aligned in previous Emacs version, on the same machine (MBA with M1 Silicon). Does anyone know why no, in 28.1, after upgrade, it looks like this? (same machine, same font).
weevyl · 2022-04-07 17:36
I had the same issue on an Intel Mac. I upgraded all my packages and the problem went away.
amiralul · 2022-04-07 17:37
No packages to upgrade :(
weevyl · 2022-04-07 17:55
Bummer. The only other thing I can think of is restarting the emacs server, if you were running it in client / server mode. Don't know if it helps, but my org-mode version is 9.5.2 and emacs is 28.1 installed via brew
yep808 · 2022-04-07 18:17
It looks like you're not using a monospace font, or maybe the app messed up the rendering?
amiralul · 2022-04-07 18:21
It’s a monospaced font (Cousine) and I did mentioned that the font is the same I used before, never touched the font. What “app” are you referring to?
rpluim · 2022-04-07 18:26
Does `emacs -Q` give the same result? Does `C-u C-x =` on the table contents confirm that it's using Cousine for the table?
electricity-wizard · 2022-04-07 19:04
Things like this happen to me when I have line numbers enabled
yep808 · 2022-04-07 19:11
The font does not look like cousine to me. Especially the lowercase "a".
worthless-trash · 2022-04-07 22:14
Can you attach before and after for confirmation ?
worthless-trash · 2022-04-07 22:14
The only cousine i know of is this one ( see a [https://fonts.google.com/specimen/Cousine?preview.text=a&preview.text\_type=custom](https://fonts.google.com/specimen/Cousine?preview.text=a&preview.text_type=custom) ) maybe there is another ?
yep808 · 2022-04-07 22:48
That's the one I meant. The lowercase A's tail don't match up.
FrozenOnPluto · 2022-04-08 01:52
Wipe your elc files to force recompile?
patchikin · 2022-04-08 02:19
Omg, that is hideous. Put an NSFW tag on it or something at least. 🤢
Alternative-Fold-66 · 2022-04-08 05:24
Can you check how it looks when whitespace-mode is enabled?
TeMPOraL_PL · 2022-04-08 09:37
Did you "upgrade in place"? Maybe the new Emacs is using packages compiled by the previous one? If you didn't clear out your `~/.emacs.d/elpa` / `~/.emacs.d/straight` / whatever folder stores your third-party packages, it shouldn't hurt to remove all `.elc` files and restart Emacs. Same applies to `~/.emacs.d/eln-cache`, if you're running nativecomp.
Farsyte · 2022-04-08 12:47
Double check exactly what fonts are being used. M-x customize-faces My money is on "wow, somehow org mode is getting its hands wrapped around a different and not-monospaced font" ... ;) edit to add: M-x list-faces-display any faces currently in use that are not monospace will be obvious.
rmurri · 2022-04-08 15:36
For me this is caused by the org-table face inheriting from fixed-pitch. I don't know why that causes it, but if I disable that, the alignment is corrected.
amiralul · 2022-04-08 16:38
It's actually fixing itself when enabling whitespace-mode, looking nice when the mode is active, but falls back to the situation in the photo when the mode is deactivated.
amiralul · 2022-04-08 16:44
You're right, it wasn't Cousine, but SF Mono and that somehow messed it up. Switched to Cousine and the issues seemed resolved.
Alternative-Fold-66 · 2022-04-08 17:06
I had the same issue. I solved it by setting fixed-pitch in custom-set-faces. '(fixed-pitch ((t (:family "JetBrains Mono"))))
yep808 · 2022-04-08 17:44
Cool. Though SF Mono technically should work as well, since it's a monospace font, unless you're not using it on macOS.
worthless-trash · 2022-04-13 08:23
Guess we'll never know what the fix or problem was.