cstby / fixed-pitch-mode

Use a proportional typeface globally while keeping a monospaced typeface for code in Emacs
GNU General Public License v3.0
48 stars 0 forks source link

fundamental mode should use fixed-pitch-mode? #3

Closed ParetoOptimalDev closed 2 years ago

ParetoOptimalDev commented 2 years ago

This one's tricky since fundamental mode isn't supposed to have anything.

This affects the *Agenda Commands* buffer that comes up after calling org-agenda because it's in fundamental-mode. Perhaps it shouldn't be though.

ParetoOptimalDev commented 2 years ago

Tried this, but doesn't work:

(add-hook 'change-major-mode-hook
      (lambda () (if (and (equal major-mode 'fundamental-mode) (equal (buffer-name (current-buffer)) "*Agenda Commands*"))
              (fixed-pitch-mode))))
cstby commented 2 years ago

Since we can't assume that everything in fundamental mode is needs fixed pitch, I won't add it to the default list in the package.

Normally in these cases, I'd advise adding the major mode hook to the fixed pitch mode whitelist (as described in the README). However, Emacs doesn't provide any fundamental-mode-hook! As far as I can tell, not including a hook for fundamental mode was an intentional choice. I'd agree with you that the *Agenda Commands* buffer shouldn't use fundamental mode for that reason.

I'd suggest using advice around the org-agenda function to call fixed-pitch-mode.