From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24616: 26.0.50; No backtrace when emacsclient --eval fails Date: Sat, 22 Oct 2016 11:35:49 -0400 Message-ID: <877f90tmzu.fsf@users.sourceforge.net> References: <831szvmh6j.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1477150585 8130 195.159.176.226 (22 Oct 2016 15:36:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 15:36:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 24616@debbugs.gnu.org, clement.pit@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 22 17:36:21 2016 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 1bxyLE-0000lL-MA for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 17:36:12 +0200 Original-Received: from localhost ([::1]:37750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxyLG-000528-Ne for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 11:36:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxyL7-00051n-RL for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 11:36:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxyL4-0001JV-N7 for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 11:36:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59330) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bxyL4-0001JN-Ju for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 11:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bxyL4-0000h4-Dh for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 11:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Oct 2016 15:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24616 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 24616-submit@debbugs.gnu.org id=B24616.14771505192613 (code B ref 24616); Sat, 22 Oct 2016 15:36:02 +0000 Original-Received: (at 24616) by debbugs.gnu.org; 22 Oct 2016 15:35:19 +0000 Original-Received: from localhost ([127.0.0.1]:46496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxyKN-0000g4-6e for submit@debbugs.gnu.org; Sat, 22 Oct 2016 11:35:19 -0400 Original-Received: from mail-it0-f54.google.com ([209.85.214.54]:38820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxyKL-0000fr-2a for 24616@debbugs.gnu.org; Sat, 22 Oct 2016 11:35:17 -0400 Original-Received: by mail-it0-f54.google.com with SMTP id 66so56223971itl.1 for <24616@debbugs.gnu.org>; Sat, 22 Oct 2016 08:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KllSsMOcwKhWqvxwKGHo7a7tDNNKGN/Uyha4jkaBY84=; b=C79ftvi/4HzV4iQgIgJRnYKAvXZNAQpeuwfsMNpg1U526aXOgUlTj3+pyOabesY1Uc 4bePD7gfngk9X/YYjG1EOjZIsn3bCq7d9zAzZuX/IDAXSk5QB9EEqtbdiYgUf3A08RKZ sPzFrz1+MmUFwLHa3egYU9zdYtGmlraKwTP6DvPVkteKKdv8JHdopDbdv358Ysp0NfTe /wcyEMlCn2DLk5lLZcoeZnagKUwIX2tmMWaGGW1Y936SGvIu1ez5QNSnvl4Gh/Cp2kDb dCpwmUEdtqJX7S34X423u3iRQ+VJemRPDs6WbQG15j6IzbTNDqpSlOa6a8mfGNNm7Z2W 5sgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=KllSsMOcwKhWqvxwKGHo7a7tDNNKGN/Uyha4jkaBY84=; b=LjnMrrhPwoAzhiFxkz3twLirhN/J5oRX2u8Fw1qhHaFDOHHD9BrE+oHfrZVmggMsDc 859jbvXZwETEcL0JKFm9UnC6qrlXEiCWhkAaKj/0bRdNDZxk6ozsMnYkipel3elUqepa ZFJelGaHFGPV0yl+JZmHUno8UWxmLEDzGjFoSpnMmaf4xjaI3Q/g60z8ZzVlLFycuRrJ CrHmTGtPvny6On4b51PmjuP4xhp4Wrt4onrFU6W4v66Wrlw5DJnlD0pMdoyxp/gNYRnP sy6/TOPp7LD/AcMXP1l+niYjrZuM9V5nT9Xr9ZAAeCR/TNY8li5GpwQqBq9AnKrDGWpu xJeQ== X-Gm-Message-State: ABUngvfReHh2EPXiMeN6BGszAEKQrtdDcq1hgnsJsZhJpAmunlIET3L0hpZmyGyzMdBAyA== X-Received: by 10.107.138.204 with SMTP id c73mr7456047ioj.192.1477150511211; Sat, 22 Oct 2016 08:35:11 -0700 (PDT) Original-Received: from zony ([45.2.7.130]) by smtp.googlemail.com with ESMTPSA id t141sm1430302ita.0.2016.10.22.08.35.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Oct 2016 08:35:10 -0700 (PDT) In-Reply-To: <831szvmh6j.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Oct 2016 09:41:08 +0300") 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:124837 Archived-At: Eli Zaretskii writes: >> >> Just a note: you can get a backtrace by setting debug-on-signal >> >> instead of debug-on-error. >> > >> > Really? >> > >> > $ emacsclient --eval '(progn (defun f () (error "foo")) (setq debug-on-signal t debug-on-error t) (f))' >> > *ERROR*: foo >> > >> > Am I missing something obvious? >> >> The backtrace shows up in Emacs, where the server is running. > > How about adding this to debugging.texi? Something like this? diff --git i/doc/lispref/debugging.texi w/doc/lispref/debugging.texi index c88a2fa..bb3ced4 100644 --- i/doc/lispref/debugging.texi +++ w/doc/lispref/debugging.texi @@ -152,6 +152,11 @@ Error Debugging must still fulfill the criteria specified by @code{debug-on-error} and @code{debug-ignored-errors}.) +For example, setting this variable is useful to get a backtrace from +code evaluated by emacsclient. If elisp code evaluated by emacsclient +signals an error while this variable is non-@code{nil}, the backtrace +will popup in the running Emacs. + @strong{Warning:} Setting this variable to non-@code{nil} may have annoying effects. Various parts of Emacs catch errors in the normal course of affairs, and you may not even realize that errors happen