From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: emacs-module.c and signaling errors Date: Fri, 27 Nov 2015 19:38:02 +0200 Message-ID: <831tbbs5qd.fsf@gnu.org> References: <83k2p7xk13.fsf@gnu.org> <87wpt7p369.fsf@tromey.com> <83d1uzxgvw.fsf@gnu.org> <5654D7CF.90001@cs.ucla.edu> <87si3vox7j.fsf@tromey.com> <56555B52.3030703@cs.ucla.edu> <837fl6xa02.fsf@gnu.org> <5655F10D.9080805@cs.ucla.edu> <83vb8ovkc5.fsf@gnu.org> <83a8q0vgb9.fsf@gnu.org> <83si3stuzn.fsf@gnu.org> <83poywtsxl.fsf@gnu.org> <838u5ju9tu.fsf@gnu.org> <8337vrsae8.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448645923 19252 80.91.229.3 (27 Nov 2015 17:38:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Nov 2015 17:38:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 27 18:38:25 2015 Return-path: Envelope-to: ged-emacs-devel@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 1a2MyT-0006vP-TV for ged-emacs-devel@m.gmane.org; Fri, 27 Nov 2015 18:38:22 +0100 Original-Received: from localhost ([::1]:57896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2MyW-0003u2-NP for ged-emacs-devel@m.gmane.org; Fri, 27 Nov 2015 12:38:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2MyS-0003pv-MF for emacs-devel@gnu.org; Fri, 27 Nov 2015 12:38:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2MyP-0003xN-5Z for emacs-devel@gnu.org; Fri, 27 Nov 2015 12:38:20 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:43579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2MyO-0003xB-Ni for emacs-devel@gnu.org; Fri, 27 Nov 2015 12:38:17 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NYH00100HY19000@mtaout24.012.net.il> for emacs-devel@gnu.org; Fri, 27 Nov 2015 19:31:04 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYH00FE8HZRAR90@mtaout24.012.net.il>; Fri, 27 Nov 2015 19:31:04 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.180 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195395 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Fri, 27 Nov 2015 11:29:31 -0500 > > > emacs -Q > > M-x load-file RET modules/mod-test/mod-test.dll > > M-: (mod-test-string-a-to-b (string-match "a" nil) "b") RET > > => > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > > string-match("a" nil) > > (mod-test-string-a-to-b (string-match "a" nil) "b") > > eval((mod-test-string-a-to-b (string-match "a" nil) "b") nil) > > elisp--eval-last-sexp(nil) > > eval-last-sexp(nil) > > funcall-interactively(eval-last-sexp nil) > > call-interactively(eval-last-sexp nil nil) > > command-execute(eval-last-sexp) > > Hmm... that's not the case I'm talking about: here the string-match is > called before even entering the module's code, so the module code is not > involved at all. Then maybe you could show the case you were talking about. > >> >> The core provides naturally a plain raw non-catching funcall, but with > >> >> the current design a module author who wants this behavior can't have it > >> > Why would a module author want a non-catching funcall? > >> Why not? > > Sorry, "why not" is not an answer. > > Given then 271-vs-15 rather of non-catching funcalls vs catching > funcalls in Emacs's C code, I think it's pretty clear that it can be > very useful. The count should be based on modules, not on what we have in core. > So really the question is the other way around: what makes > you think that the modules's code will be so vastly different that it > won't want a non-catching funcall, contrary to the experience so far? I think module authors won't (and shouldn't) care.