From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18573: 24.3.93; set-face-attribute crashes Emacs when started with -nw Date: Wed, 01 Oct 2014 20:49:28 +0300 Message-ID: <838ukzk7dj.fsf@gnu.org> References: <5426E238.6060301@vsm.in> <5CAB16D6-ECC8-4D23-A0E2-FCEADF48C1B0@swipnet.se> <8361g6mjl8.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1412185823 19400 80.91.229.3 (1 Oct 2014 17:50:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Oct 2014 17:50:23 +0000 (UTC) Cc: enquiries@vsm.in, 18573@debbugs.gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 01 19:50:16 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XZO2Z-0006VQ-M9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Oct 2014 19:50:15 +0200 Original-Received: from localhost ([::1]:57387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZO2Z-0004so-6R for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Oct 2014 13:50:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZO2S-0004p5-Kx for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2014 13:50:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZO2M-0002kb-RV for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2014 13:50:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZO2M-0002ji-Op for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2014 13:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XZO2M-0007Cj-0l for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2014 13:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Oct 2014 17:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18573 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18573-submit@debbugs.gnu.org id=B18573.141218577727660 (code B ref 18573); Wed, 01 Oct 2014 17:50:01 +0000 Original-Received: (at 18573) by debbugs.gnu.org; 1 Oct 2014 17:49:37 +0000 Original-Received: from localhost ([127.0.0.1]:57643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZO1w-0007C3-VW for submit@debbugs.gnu.org; Wed, 01 Oct 2014 13:49:37 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:38653) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZO1u-0007Br-28 for 18573@debbugs.gnu.org; Wed, 01 Oct 2014 13:49:35 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NCS002001IBLM00@a-mtaout23.012.net.il> for 18573@debbugs.gnu.org; Wed, 01 Oct 2014 20:49:32 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCS002JQ1IJFJA0@a-mtaout23.012.net.il>; Wed, 01 Oct 2014 20:49:32 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93981 Archived-At: > From: Jan Djärv > Date: Wed, 1 Oct 2014 19:43:11 +0200 > Cc: enquiries@vsm.in, > 18573@debbugs.gnu.org > > > But if this doesn't work, then what are our alternatives? We could > > loop over all the frames looking for a GUI frame, and use that. But > > what if there's no such frame? Signal an error? > > There is a fundamental error here. Emacs allows specifying face attributes for future GUI frames when only non-GUI frames exists. But those attributes requires GUI frames to be realized. > We are missing a "lazy" realization that only saves the text version of the attribute and realizes only when an apropriate frame is available. > > For now I comitted the "wont crash" solution (don't execute the code for tty frames) in the emacs 24 branch. No error is signalled and no looping is done to find a GUI frame. I'm not sure if we should do that. If the frame argument is t, we could try looking for a GUI frame; that way, we would signal an error in fewer cases. After all, using the selected frame is arbitrary. At the very least, I think we should have a FIXME comment there describing the problem. Thanks.