From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#754: Can't cancel dabbrev-expand (M-/) with C-g Date: Thu, 21 Aug 2008 11:48:34 -0400 Message-ID: <87abf61i99.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 754@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219335028 30645 80.91.229.12 (21 Aug 2008 16:10:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2008 16:10:28 +0000 (UTC) Cc: 754@emacsbugs.donarmstrong.com To: David Caldwell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 21 18:11:18 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KWCkG-0002qk-EB for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 18:10:44 +0200 Original-Received: from localhost ([127.0.0.1]:36611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWCjJ-0002br-1C for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 12:09:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWChA-0008Iw-Iw for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2008 12:07:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWCh8-0008HA-UL for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2008 12:07:32 -0400 Original-Received: from [199.232.76.173] (port=39613 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWCh8-0008Gu-Ji for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2008 12:07:30 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:59415) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KWCh8-0000U9-5Q for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2008 12:07:30 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7LG7Ros019673; Thu, 21 Aug 2008 09:07:28 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7LFt5HR014635; Thu, 21 Aug 2008 08:55:05 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 21 Aug 2008 15:55:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 754 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 754-submit@emacsbugs.donarmstrong.com id=B754.121933364012706 (code B ref 754); Thu, 21 Aug 2008 15:55:04 +0000 Original-Received: (at 754) by emacsbugs.donarmstrong.com; 21 Aug 2008 15:47:20 +0000 Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7LFlGqU012700 for <754@emacsbugs.donarmstrong.com>; Thu, 21 Aug 2008 08:47:18 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 1486757E2B5; Thu, 21 Aug 2008 11:48:34 -0400 (EDT) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Thu, 21 Aug 2008 12:07:32 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19606 Archived-At: > If I have many buffers open (284 at the moment) and if I run > dabbrev-expand (M-/) to expand the word under my buffers then it > searches through every buffer and takes an understandably long > time. If I mispelled the word fragment then it never has a hope of > finding it and I'd like to cancel the operation. But C-g does not work > for some reason and so I have to wait a good 5 to 10 seconds for it to > finish scanning all my buffers. This gets very frustrating after the > third or fourth time. I don't see why C-g wouldn't work here. Could you apply the following patch and see if the problem persists? (This is not a fix; it's an attempt to diagnose the problem. As far as I know, quitting should not be inhibited here.) *** emacs/lisp/dabbrev.el.~1.83.2.3.~ 2008-01-06 21:44:58.000000000 -0500 --- emacs/lisp/dabbrev.el 2008-08-21 11:43:59.000000000 -0400 *************** *** 777,783 **** (setq dabbrev--friend-buffer-list (dabbrev--make-friend-buffer-list)))) ;; Walk through the buffers till we find a match. ! (let (expansion) (while (and (not expansion) dabbrev--friend-buffer-list) (setq dabbrev--last-buffer (pop dabbrev--friend-buffer-list)) (set-buffer dabbrev--last-buffer) --- 777,784 ---- (setq dabbrev--friend-buffer-list (dabbrev--make-friend-buffer-list)))) ;; Walk through the buffers till we find a match. ! (let ((inhibit-quit nil) ! expansion) (while (and (not expansion) dabbrev--friend-buffer-list) (setq dabbrev--last-buffer (pop dabbrev--friend-buffer-list)) (set-buffer dabbrev--last-buffer)