From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Klaus Zeitler Newsgroups: gmane.emacs.bugs Subject: Re: dabbrev in minibuffer Date: 10 Jul 2002 09:51:30 +0200 Organization: Lucent Technologies Sender: bug-gnu-emacs-admin@gnu.org Message-ID: References: <200207091541.g69FfF416701@zrc2s0jx.nortelnetworks.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1026287486 14453 127.0.0.1 (10 Jul 2002 07:51:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 10 Jul 2002 07:51:26 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17SCFy-0003kz-00 for ; Wed, 10 Jul 2002 09:51:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17SCGh-00046t-00; Wed, 10 Jul 2002 03:52:11 -0400 Original-Received: from dfw7-1.relay.mail.uu.net ([199.171.54.106]) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17SCGA-00045D-00 for ; Wed, 10 Jul 2002 03:51:38 -0400 Original-Received: from auemail1.firewall.lucent.com by dfw7sosrv11.alter.net with ESMTP (peer crosschecked as: auemail1.lucent.com [192.11.223.161]) id QQmwwl20948 for ; Wed, 10 Jul 2002 07:51:42 GMT Original-Received: from ssbunews.ih.lucent.com (h135-1-218-31.lucent.com [135.1.218.31]) by auemail1.firewall.lucent.com (Switch-2.2.2/Switch-2.2.0) with SMTP id g6A7pYN13839 for ; Wed, 10 Jul 2002 03:51:34 -0400 (EDT) Original-Received: by ssbunews.ih.lucent.com (SMI-8.6/EMS-1.5 sol2) id DAA17457; Wed, 10 Jul 2002 03:51:32 -0400 Original-Received: by ssbunews.ih.lucent.com (SMI-8.6/EMS-1.5 sol2) id DAA17454; Wed, 10 Jul 2002 03:51:32 -0400 Original-To: gnu-emacs-bug@uunet.uu.net Original-Path: news Original-Newsgroups: gnu.emacs.bug Original-Lines: 104 Original-NNTP-Posting-Host: sfsw51.de.lucent.com X-Uboat-Death-Message: BLOWN UP BY THREE ATOMIC BOMBS. SINKING. U-902. User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:2574 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:2574 >>>>> "Miles" == Miles Bader writes: Miles> Miles> TBABIN@nortelnetworks.com (Tim Babin) writes: >> Running dabbrev-expand in the minibuffer starts an infinite loop. Miles> Miles> Not for me; please give a precise test-case. Miles> I've reported this problem in February and RMS sent me the following patch that IMHO only partially fixed it (the problem only occurred with the inviolable option set for the minibuffer). -------------------- snip ------------------------ *** dabbrev.el.~1.61.~ Thu Nov 8 12:56:42 2001 --- dabbrev.el Sat Feb 2 20:09:49 2002 *************** *** 599,605 **** (progn (forward-char -1) (while (and (looking-at dabbrev--abbrev-char-regexp) ! (not (bobp))) (forward-char -1)) (or (looking-at dabbrev--abbrev-char-regexp) (forward-char 1)))) --- 599,605 ---- (progn (forward-char -1) (while (and (looking-at dabbrev--abbrev-char-regexp) ! (not (= (point) (field-beginning (point))))) (forward-char -1)) (or (looking-at dabbrev--abbrev-char-regexp) (forward-char 1)))) -------------------- snip ------------------------ Here's what I wrote in one of my mails to RMS: -------------------- snip ------------------------ Originally I ran in to this problem cause I wanted to change a set-face-background call to a set-face-foreground in one of my el files (and I'm an avid user of dynamic abbrev). So here's how I reproduce this bug. 1. start emacs with -q --no-site-file 2. (the original dabbrev package that comes with 21.1 is used) 3. M-x customize-variable minibuffer-prompt-properties turn on the Inviolable option and set for current session 4. load a file with e.g. the following contents ----- cut ----- (set-face-background 'trailing-whitespace "Gray25") ----- cut ----- 5. M-x query-replace and now enter as regexp "s" followed by "M-/" => emacs loops on HP-UX 10.20, Solaris 5.8 and GNU/Linux but - on HP-UX 10.20 C-g does not work - on Solaris 5.8 C-g does work (most of the time), but when I open a 2nd frame (C-x 5 2) before I try the query replace, C-g doesn't interrupt anymore - on GNU/Linux C-g always works now I perform the same steps but first I load your patched dabbrev file 1. start emacs with -q --no-site-file 2. load-library 3. M-x customize-variable minibuffer-prompt-properties turn on the Inviolable option and set for current session 4. load a file with e.g. the following contents ----- cut ----- (set-face-background 'trailing-whitespace "Gray25") ----- cut ----- 5a. M-x query-replace and now enter as regexp "s" followed by "M-/", this works 5b. press return and now try to enter as replacement string again "s" followed by "M-/" => emacs loops on HP-UX 10.20 and Solaris 5.8 but not on GNU/Linux as I said in one of my previous posts XTread_socket never gets called once emacs loops. Could it be that one of the lisp functions/macros, e.g. save-match-data or unwind-protect disables/postpones interrupts? -------------------- snip ------------------------ ever since then it's been on my low priority todo list to investigate, but haven't had time yet. I think it gets stuck in the while loop in dabbrev--search. But what worries me more is that I can't interrupt it on Solaris and HP. Klaus -- ------------------------------------------ | Klaus Zeitler Lucent Technologies | | Email: kzeitler@lucent.com | ------------------------------------------ --- What garlic is to food, insanity is to art.