From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.devel Subject: Re: Interrupting an emacs server from outside emacs Date: Thu, 16 May 2013 14:49:22 +0200 Message-ID: <87sj1nytrh.fsf@dex.adm.naquadah.org> References: <87vc6j2ks6.fsf@sandalphon.hinata3.co.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1368708583 15998 80.91.229.3 (16 May 2013 12:49:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 May 2013 12:49:43 +0000 (UTC) Cc: emacs-devel@gnu.org To: Renaud =?utf-8?Q?Casenave-P=C3=A9r=C3=A9?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 16 14:49:38 2013 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 1Ucxcn-0005wM-91 for ged-emacs-devel@m.gmane.org; Thu, 16 May 2013 14:49:37 +0200 Original-Received: from localhost ([::1]:34490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ucxcm-0001Pg-Un for ged-emacs-devel@m.gmane.org; Thu, 16 May 2013 08:49:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ucxcg-0001PY-3z for emacs-devel@gnu.org; Thu, 16 May 2013 08:49:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ucxcb-0007ZU-D1 for emacs-devel@gnu.org; Thu, 16 May 2013 08:49:30 -0400 Original-Received: from prometheus.naquadah.org ([91.121.37.122]:58911 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ucxcb-0007ZH-7o for emacs-devel@gnu.org; Thu, 16 May 2013 08:49:25 -0400 Original-Received: from dex.adm.naquadah.org (fes75-2-78-192-50-146.fbxo.proxad.net [78.192.50.146]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id 03EC0E0201; Thu, 16 May 2013 14:49:23 +0200 (CEST) Mail-Followup-To: Renaud =?utf-8?Q?Casenave-P=C3=A9r=C3=A9?= , emacs-devel@gnu.org In-Reply-To: <87vc6j2ks6.fsf@sandalphon.hinata3.co.jp> ("Renaud \=\?utf-8\?Q\?Casenave-P\=C3\=A9r\=C3\=A9\=22's\?\= message of "Thu, 16 May 2013 21:04:25 +0900") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.121.37.122 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:159616 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, May 16 2013, Renaud Casenave-P=C3=A9r=C3=A9 wrote: > I am trying to control emacs from outside, and while it is quite easy to = execute > a command using emacsclient --eval, if that command is stuck for whatever > reason, I would like to be able to interrupt it, as I would type C-g from= emacs, > but remotely. > > for example, if I execute this from a terminal: > > emacsclient -e "(sleep-for 50)" > > I would like to be able to cancel the sleep command from the terminal lik= e this: > > emacsclient -e "(keyboard-quit)" > > or something. Being called keyboard-quit, I know it wasn't designed to be= used > from the terminal, but this being emacs, surely there is way? Using emacs= client > or with unix signals, or something else. > > Does anybody know such a trick? IIRC, it has already been discussed on this list. I think you're looking for `debug-on-event' which by default allow you to send SIGUSR2 to emacs to get a debug backtrace. =2D-=20 Julien Danjou // Free Software hacker / freelance consultant // http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJRlNXSAAoJEGEbqVCLeKXCL8IQALF8Jw3JrJzno5+f17HhhXys MqGPUoqAtFMuwuGVKZIeOxsBDUAEWm1XSqeUR0xIu6UymCUySMVHnE5GZCDHl4eV idepnQP127HTX0J/p4AKR8R2PPx7vW8wnqmNccRv6i6tZusaIPsqrMeeAWlXpsu8 ywCAp365wZ03tcFapewXgq1VjMy9grDkx3LIrHgWj6HYsS378pGSwuh/cNKZTUux vBfCoI6lnJG7vSWpsQuP49RvTeGm2aa+fx3zgMmjcTSFwMDHT3AXSzUgGtq8Wt1t HhwiMh6bjtgkmrrNuszLAojbnFsGC/schpLvP+bKy5EM2r7V+k8TDjBGTyj5iP6y eLqZTROwr2x2rY0js3mar0jx6HC+EKOISYNic3P9tv+p8g17WYHt9eKfRfyNwA8h rlgHaVKf9zeqVvuY0alFzrxfKoU4oxDlRM7YXjVHW09zei4ek11qJwV8zowC6tDm jETLA5OQ0iSMZHyprzH4nwIXM/4rtyTR99YE4woyKkUYLl8Tp6St2CXApyXM/f8c 8fzsw3WMoTDwYSybj/J5JhXyToHtCqanAZTiHa01fLjyyvMFCbjg0tqsMk01Zj+g VYu+YiELd7JeDBsntYGsEndXHK7sDb/y7/t3yG5gBdNivICeod3LjpZT2Z9fbXI2 Y5nnWPPWroioitWgTuC6 =UrWW -----END PGP SIGNATURE----- --=-=-=--