From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32169: 27.0.50; Wishlist: cleanup of thread-last-error Date: Mon, 16 Jul 2018 18:28:07 +0300 Message-ID: <83sh4j8ak8.fsf@gnu.org> References: <87pnzn1wdj.fsf@gmx.de> <83wotv8d1y.fsf@gnu.org> <87a7qrkzg9.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1531754833 31568 195.159.176.226 (16 Jul 2018 15:27:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2018 15:27:13 +0000 (UTC) Cc: 32169@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 16 17:27:09 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 1ff5P2-00084X-Au for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jul 2018 17:27:08 +0200 Original-Received: from localhost ([::1]:52398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5R7-00021Y-JF for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jul 2018 11:29:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5Qv-0001yV-HS for bug-gnu-emacs@gnu.org; Mon, 16 Jul 2018 11:29:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ff5Qs-0006dG-93 for bug-gnu-emacs@gnu.org; Mon, 16 Jul 2018 11:29:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38917) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ff5Qs-0006dC-55 for bug-gnu-emacs@gnu.org; Mon, 16 Jul 2018 11:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ff5Qr-0000IK-Sw for bug-gnu-emacs@gnu.org; Mon, 16 Jul 2018 11:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Jul 2018 15:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32169 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32169-submit@debbugs.gnu.org id=B32169.15317548901057 (code B ref 32169); Mon, 16 Jul 2018 15:29:01 +0000 Original-Received: (at 32169) by debbugs.gnu.org; 16 Jul 2018 15:28:10 +0000 Original-Received: from localhost ([127.0.0.1]:43935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ff5Q2-0000Gy-AQ for submit@debbugs.gnu.org; Mon, 16 Jul 2018 11:28:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ff5Q0-0000GU-HM for 32169@debbugs.gnu.org; Mon, 16 Jul 2018 11:28:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ff5Ps-0006H6-4Q for 32169@debbugs.gnu.org; Mon, 16 Jul 2018 11:28:03 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5Pr-0006Gs-Pt; Mon, 16 Jul 2018 11:27:59 -0400 Original-Received: from [176.228.60.248] (port=3624 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ff5Pr-00018k-3v; Mon, 16 Jul 2018 11:27:59 -0400 In-reply-to: <87a7qrkzg9.fsf@gmx.de> (message from Michael Albinus on Mon, 16 Jul 2018 16:49:42 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:148576 Archived-At: > From: Michael Albinus > Cc: 32169@debbugs.gnu.org > Date: Mon, 16 Jul 2018 16:49:42 +0200 > > > How about having thread-last-error clear the error as a side effect, > > perhaps when called with an optional argument? > > I'd be happy with either variant. Should be easy to do, I think. > While working on making Tramp threadsafe, I use the following instead of > `signal': > > (defsubst tramp-compat-signal (error-symbol data) > "Signal an error to the main thread." > (when tramp-compat-main-thread > (tramp-compat-funcall > 'thread-signal tramp-compat-main-thread error-symbol data)) > (signal error-symbol data)) > > Works sufficient so far. `tramp-compat-main-thread' is a defconst, which > has as value (car (all-threads)). I was certain we had on master a function ti return the main thread, but I guess I was dreaming. We could easily add it, though. In any case, I think it could be a good idea to describe this technique in the ELisp manual. > PS: Maybe I shall push this to a git branch, giving people a chance for > early tests. `find-file-noselect' survives already in simple cases, w/o > an Emacs crash. SGTM, thanks.