unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: "Renaud Casenave-Péré" <renaud@casenave-pere.fr>
Cc: emacs-devel@gnu.org
Subject: Re: Interrupting an emacs server from outside emacs
Date: Thu, 16 May 2013 14:49:22 +0200	[thread overview]
Message-ID: <87sj1nytrh.fsf@dex.adm.naquadah.org> (raw)
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")

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

On Thu, May 16 2013, Renaud Casenave-Péré 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 like 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 emacsclient
> 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.

-- 
Julien Danjou
// Free Software hacker / freelance consultant
// http://julien.danjou.info

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2013-05-16 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 12:04 Interrupting an emacs server from outside emacs Renaud Casenave-Péré
2013-05-16 12:49 ` Julien Danjou [this message]
2013-05-16 13:10   ` Renaud Casenave-Péré

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sj1nytrh.fsf@dex.adm.naquadah.org \
    --to=julien@danjou.info \
    --cc=emacs-devel@gnu.org \
    --cc=renaud@casenave-pere.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).