all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Silencing Emacs Warning about Fira
@ 2022-07-08 14:00 Lorenzo Isella
  2022-07-08 17:26 ` Emanuel Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Isella @ 2022-07-08 14:00 UTC (permalink / raw)
  To: help-gnu-emacs

Dear All,
I run emacs on Debian stable. I use it both for writing code and to
compose emails (I use mutt which invokes emacs when I want to reply
and/or write an email).
So far so good, but I have recently added a new part to my .emacs file
(see below).


#########################################################################
;; (require 'fira-code-mode)
;; (custom-set-variable 'fira-code-mode-disabled-ligatures '("[]" "#{" "#(" "#_" "#_(" "x")) ;; List of ligatures to turn off

;; ;; Enable fira-code-mode automatically for programming major modes
;; (add-hook 'prog-mode-hook 'fira-code-mode)
;; ;; Or, you can use the global mode instead of adding a hook:
;; (global-fira-code-mode)


;; (require 'fira-code-mode)

;; install use-package from melpa and also fira

;; See https://github.com/jming422/fira-code-mode

(use-package fira-code-mode
   :custom (fira-code-mode-disabled-ligatures '("[]" "www" "<-" "#{" "#(" "#_" "#_(" "x")) ;; List of ligatures to turn off
   :hook prog-mode) ;; Enables fira-code-mode automatically for programming major modes

;; (set-frame-font "FiraCode-Regular-Symbol")

##############################################################

Once again, no issues here and I have some nice ligatures as intended.
However, when I try to reply to an email via mutt and emacs is
invoked, I always get this warning

#################################################################
Warning (fira-code-ligatures): fira-code-mode probably won't work for non-graphical displays!               
###################################################################

and the buffer is split. It is not the end of the world, but it is
just annoying. Since everything then works fine when I compose and
send the email, how can I silence/get rid of this warning?
Many thanks!

Lorenzo



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Silencing Emacs Warning about Fira
  2022-07-08 14:00 Silencing Emacs Warning about Fira Lorenzo Isella
@ 2022-07-08 17:26 ` Emanuel Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Emanuel Berg @ 2022-07-08 17:26 UTC (permalink / raw)
  To: help-gnu-emacs

Lorenzo Isella wrote:

> ;; See https://github.com/jming422/fira-code-mode

Grep that for "non-graphical" and you get this:

(unless (display-graphic-p)
  (display-warning '(fira-code-ligatures) "fira-code-mode
  probably won't work for non-graphical displays!"))

So `display-graphic-p' returns nil for you, and truthfully so
I take it?

If so, read the help for `display-warning' ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-08 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-08 14:00 Silencing Emacs Warning about Fira Lorenzo Isella
2022-07-08 17:26 ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.