all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: How to stop find-grep-dired?
Date: Sat, 19 Aug 2006 10:09:32 +0200	[thread overview]
Message-ID: <44E6C73C.7030302@student.lu.se> (raw)
In-Reply-To: <85hd09mao0.fsf@lola.goethe.zz>

David Kastrup wrote:
> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>   
>> Richard Stallman wrote:
>>     
>>>     How do you stop a command like `find-grep-dired'? I tried C-g
>>> and     M-ESC-ESC but none of them worked. I looked in the menus,
>>> but I found     nothing obvious there. (I did this on w32.)
>>>
>>> Since the buffer fills asynchronously, C-g won't stop it.
>>> Killing the buffer should do so.  Does that work?
>>>   
>>>       
>> It does, but suppose you want the information that is already there?
>> That could be the case for `grep-find' for example. Why not bind C-g
>> to something like this in those buffers (or globally)?
>>
>> (defun keyboard-process-quit()
>>  "Delete buffer process if there is one or signal a `quit' condition."
>>  (interactive)
>>  (if (get-buffer-process (current-buffer))
>>      (delete-process (current-buffer))
>>    (keyboard-quit)))
>>     
>
> Because C-g is used to abort a lot of actions, like searching,
> incomplete key sequences and so on.  When we are doing M-!, Emacs
> stays busy and so C-g is an unambiguous way of stopping a program.
> But in comint buffers, I'd want something more explicit like C-c C-c
> (incidentally, isn't that the way to kill already?).
>   
In the *grep* buffer C-c C-c runs `compile-goto-error'.

I would like it very simple and always beeing able to use C-g for 
stopping seems desireable to me. How about asking before deleting the 
process? Something like this:

  (defun keyboard-process-quit()
    "Delete buffer process if there is one or signal a `quit' condition."
    (interactive)
    (let* ((buf-proc (get-buffer-process (current-buffer)))
           (del-proc
            (when buf-proc
              (y-or-n-p
               (format "Delete process %s in current buffer? " buf-proc)))))
      (if del-proc
          (progn
            (delete-process (current-buffer))
            (goto-char (point-max)))
        (keyboard-quit))))


BTW, how do you see if a process is asynchronous?

  reply	other threads:[~2006-08-19  8:09 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18 15:20 How to stop find-grep-dired? Lennart Borgman
2006-08-19  4:35 ` Richard Stallman
2006-08-19  7:40   ` Lennart Borgman
2006-08-19  7:45     ` David Kastrup
2006-08-19  8:09       ` Lennart Borgman [this message]
2006-08-19  8:28         ` David Kastrup
2006-08-19  8:36           ` Lennart Borgman
2006-08-19  8:49             ` David Kastrup
2006-08-19 10:40               ` Lennart Borgman
2006-08-19 10:47                 ` David Kastrup
2006-08-19 14:53                   ` Lennart Borgman
2006-08-19 15:04                     ` David Kastrup
2006-08-19 15:18                       ` Lennart Borgman
2006-08-20  4:32                 ` Richard Stallman
2006-08-21 18:40             ` Stuart D. Herring
2006-08-21 23:40               ` Lennart Borgman
2006-08-20  4:32     ` Richard Stallman
2006-08-21  8:56       ` Ehud Karni
2006-08-21  9:14         ` Lennart Borgman
2006-08-22  3:09         ` Richard Stallman
2006-08-22  5:44           ` Lennart Borgman
2006-08-22  5:59             ` Drew Adams
2006-08-22  7:21               ` Lennart Borgman
2006-08-22 15:41             ` Richard Stallman
2006-08-22 15:52               ` Andreas Schwab
2006-08-22 16:31                 ` Lennart Borgman
2006-08-24  6:12                   ` Lennart Borgman
2006-08-23  4:06                 ` Richard Stallman
2006-08-29 22:04                   ` Juri Linkov
2006-08-30 17:58                     ` Richard Stallman
2006-08-30 21:16                       ` Stefan Monnier
2006-08-31  7:43                         ` Kim F. Storm
2006-08-31 18:16                         ` Richard Stallman
2006-08-31 18:49                           ` David Kastrup
2006-08-31 23:34                             ` Juri Linkov
2006-09-01  2:10                               ` Miles Bader
2006-09-01 23:47                                 ` Juri Linkov
2006-08-30 22:46                       ` Juri Linkov
2006-08-21  9:15       ` Lennart Borgman
2006-08-22  3:09         ` Richard Stallman
2006-08-19  8:44 ` Andreas Schwab
2006-08-19 10:33   ` Lennart Borgman

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

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

  git send-email \
    --in-reply-to=44E6C73C.7030302@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.