From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#33294: xwidget-insert crashes Emacs Date: Fri, 09 Nov 2018 08:29:48 -0500 Message-ID: References: <838t25cxft.fsf@gnu.org> <8336sccgob.fsf@gnu.org> <83wopnbp5s.fsf@gnu.org> <877ehntu92.fsf@gmail.com> <83sh0bbe52.fsf@gnu.org> <83r2fubsq1.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541770092 5372 195.159.176.226 (9 Nov 2018 13:28:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Nov 2018 13:28:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: gazally@runbox.com, rpluim@gmail.com, lg.zevlg@gmail.com, 33294@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 09 14:28:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gL6pP-00019b-5Y for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Nov 2018 14:28:03 +0100 Original-Received: from localhost ([::1]:34100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL6rU-0004hm-Vf for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Nov 2018 08:30:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL6rO-0004hN-UZ for bug-gnu-emacs@gnu.org; Fri, 09 Nov 2018 08:30:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gL6rK-0004Ks-Ve for bug-gnu-emacs@gnu.org; Fri, 09 Nov 2018 08:30:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38060) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gL6rK-0004Ki-Rl for bug-gnu-emacs@gnu.org; Fri, 09 Nov 2018 08:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gL6rK-0004p0-Nf for bug-gnu-emacs@gnu.org; Fri, 09 Nov 2018 08:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Nov 2018 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33294 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33294-submit@debbugs.gnu.org id=B33294.154177019118490 (code B ref 33294); Fri, 09 Nov 2018 13:30:02 +0000 Original-Received: (at 33294) by debbugs.gnu.org; 9 Nov 2018 13:29:51 +0000 Original-Received: from localhost ([127.0.0.1]:42318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gL6r9-0004oA-A1 for submit@debbugs.gnu.org; Fri, 09 Nov 2018 08:29:51 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:35866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gL6r7-0004o1-PF for 33294@debbugs.gnu.org; Fri, 09 Nov 2018 08:29:50 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id wA9DTmgO013605; Fri, 9 Nov 2018 08:29:48 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 1D89C6A50D; Fri, 9 Nov 2018 08:29:48 -0500 (EST) In-Reply-To: <83r2fubsq1.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 09 Nov 2018 09:44:22 +0200") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6415=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6415> : inlines <6958> : streams <1803767> : uri <2746801> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:152217 Archived-At: >> > I admit I don't understand why PVEC_XWIDGET and PVEC_XWIDGET_VIEW are >> > in the "impossible" cases. They are first-class Lisp objects, AFAICT. >> If you say so, then they most likely are, indeed. I personally didn't >> (and still don't) know enough about those to know what to do with them. > Can you tell what are the guidelines for putting a PVEC object into > the "impossible" category in the context of type-of? The "impossible" category is for when such objects can never be passed to `type-of`, typically because they are not available to Elisp. But there's no harm/risk to "allow" a particular kind of object even if it's actually impossible for it to be passed to type-of. Accordingly, I just installed the patch below into emacs-26. Stefan diff --git a/src/data.c b/src/data.c index 8d58cbd941..eea9ccedbb 100644 --- a/src/data.c +++ b/src/data.c @@ -276,10 +276,12 @@ for example, (type-of 1) returns `integer'. */) } case PVEC_MODULE_FUNCTION: return Qmodule_function; - /* "Impossible" cases. */ case PVEC_XWIDGET: - case PVEC_OTHER: + return Qxwidget; case PVEC_XWIDGET_VIEW: + return Qxwidget_view; + /* "Impossible" cases. */ + case PVEC_OTHER: case PVEC_SUB_CHAR_TABLE: case PVEC_FREE: ; } @@ -3756,6 +3758,8 @@ syms_of_data (void) DEFSYM (Qfont_entity, "font-entity"); DEFSYM (Qfont_object, "font-object"); DEFSYM (Qterminal, "terminal"); + DEFSYM (Qxwidget, "xwidget"); + DEFSYM (Qxwidget_view, "xwidget-view"); DEFSYM (Qdefun, "defun");