all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 39865@debbugs.gnu.org, viniciusjl@gmail.com
Subject: bug#39865: 28.0.50; Emacs crash
Date: Tue, 10 Mar 2020 16:15:09 +0100	[thread overview]
Message-ID: <m2k13sckci.fsf@gmail.com> (raw)
In-Reply-To: <83tv2w9sa3.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 10 Mar 2020 16:52:04 +0200")

>>>>> On Tue, 10 Mar 2020 16:52:04 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: Vinicius José Latorre <viniciusjl@gmail.com>,
    >> 39865@debbugs.gnu.org
    >> Date: Tue, 10 Mar 2020 15:29:44 +0100
    >> 
    >> >> I think that emacs should be more robust about this and do not crash for any bad value.
    >> 
    Eli> I agree.  It is not a bad value, we just couldn't yet find a way of
    Eli> switching the font-backend.
    >> 
    >> Eli, would you accept a patch for emacs-27 that signals a user-error
    >> if trying to set a font-backend thatʼs not supported by the running
    >> emacs? Or that ignores it (with a message)?

    Eli> In general, yes; but I'd need to see the patch.

diff --git a/src/frame.c b/src/frame.c
index 51fc78ab70..3b0174cea9 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4090,6 +4090,21 @@ gui_set_frame_parameters (struct frame *f, Lisp_Object alist)
 	}
       else
 	{
+          if (EQ (prop, Qfont_backend))
+            {
+              Lisp_Object tail = val;
+              Lisp_Object backend;
+              FOR_EACH_TAIL_SAFE (tail)
+                {
+                  backend = XCAR (tail);
+                  if (! c_symbol_p (XSYMBOL (backend)))
+                    {
+                      AUTO_STRING (format, "Unsupported font-backend: \"%s\"");
+                      xsignal1 (Quser_error, CALLN (Fformat, format, backend));
+                    }
+                }
+            }
+
 	  register Lisp_Object param_index, old_value;
 
 	  old_value = get_frame_param (f, prop);

    Eli> AFAIU, the problem in this case wasn't that the backend wasn't
    Eli> supported, it was that it was changed in the middle of a session.

Setting font-backend to a supported value with default-frame-alist
in .emacs should work, and does for me in master, at least switching
from 'ftcrhb' to 'ftcr'. Switching from 'ftcrhb' to 'xft' crashes.

Hmm, switching to 'x' also crashes. But I can create a new frame with
'x' as font-backend.

Robert





  parent reply	other threads:[~2020-03-10 15:15 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02  1:39 bug#39865: 28.0.50; Emacs crash Vinicius José Latorre
2020-03-02  8:11 ` Eli Zaretskii
2020-03-05  1:03   ` Vinicius José Latorre
2020-03-05 22:21     ` Vinicius José Latorre
2020-03-06  7:18       ` Eli Zaretskii
2020-03-06 17:20         ` Vinicius José Latorre
2020-03-06 17:24           ` Vinicius José Latorre
2020-03-06 17:53           ` Eli Zaretskii
2020-03-10 14:29             ` Robert Pluim
2020-03-10 14:52               ` Eli Zaretskii
2020-03-10 14:54                 ` Vinicius José Latorre
2020-03-10 15:20                   ` Robert Pluim
2020-03-10 19:03                     ` Vinicius José Latorre
2020-03-11  7:33                       ` Robert Pluim
2020-03-11 20:45                         ` Vinicius José Latorre
2020-03-12  9:39                           ` Robert Pluim
2020-03-10 15:15                 ` Robert Pluim [this message]
2020-03-11 16:58                   ` Eli Zaretskii
2020-03-12  9:33                     ` Robert Pluim
2020-03-12 10:25                       ` Robert Pluim
2020-03-13  0:44                         ` Vinicius José Latorre
2020-03-13  9:35                           ` Robert Pluim
2020-03-13 14:09                             ` Eli Zaretskii
2020-03-13 15:09                               ` Robert Pluim
2020-03-17 10:16                                 ` Robert Pluim
2020-03-17 15:15                                   ` Eli Zaretskii
2020-03-17 16:06                                     ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2k13sckci.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=39865@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=viniciusjl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.